Melfa Basic Iv: Main Main Characteristics of Characteristics of RV-2AJ
Melfa Basic Iv: Main Main Characteristics of Characteristics of RV-2AJ
Melfa Basic Iv: Main Main Characteristics of Characteristics of RV-2AJ
MELFA BASIC IV
Mitsubishi robots use their own programming
language for the robot controller, MELFA Basic IV.
The robot programming language MELFA BASIC IV
is powerful yet easy to learn, ensuring that users
can start producing their own powerful and efficient
robot programs in a very short time.
characteristics of RV-2AJ
Manufacturer Mitsubishi-Electric
θ3 No DOF 5
Robot weight 17 [kg]
Multitasking function for parallel execution of multiple tasks. A 64-bit RISC processor with
DSP provides ample power for 3-D circular and linear interpolation, and for multitasking with
up to 32 programs running in parallel.
Mitsubishi robots has multitasking operating system that can perform other tasks at the same
time as executing the robot’s movement sequences. For example, the robot can simultaneously
control peripheral equipment, read in position data from a camera system and control additional
robot DOF, significantly enhancing the overall efficiency of applications.
1
Robot controller CR-1 Controller CR-1 – Teaching Pendant
The robot controller has a 64-bit RISC processor and can be programmed
quickly and easily in MELFA BASIC IV.
Robot
TeachBox
Controller CR1
7 8
2
TOOL jog CYLINDER jog
Adjusts the coordinates of each axes along the direction of the hand tip. Adjusting the X-axis coordinate
The X, Y, and Z axis coordinates are adjusted in mm units. moves the hand in the radial
The A, B, and C axis coordinates are adjusted in angle units. direction away from the robot's
origin. Adjusting the Y-axis
coordinate rotates the arm
around the J1 axis. Adjusting the
Z-axis coordinate moves the
hand in the Z direction of the
robot coordinate system.
Programming
15
3
Declaration of variables Positions variables
Names for variables of the type position, joint, arithmetic, and character string begin Variables whose names begin with character P are considered position
with a certain character. variables. If it is defined by the DEF POS instruction, it is possible to specify a
name beginning with a character other than P.
The rule is:
It is possible to reference individual coordinate data of position variables.
In this case, add "." and the name of a coordinate axis, e.g. "X," after the
P = Positional variable variable name.
J = Joint variable
P1.X, P1.Y, P1.Z, P1.A, P1.B P1.C, P1.L1, P1.L2
M = Arithmetic variable
The unit of the angular coordinate axes A, B, and C is radians. Use the DEG
C = Character string function to convert it to degrees.
Example)
P1=(110,-227,-148,45,180,0,0)
M1 = P1. X (Unit : mm)
M2 = DEG(P1. A) (Unit : degree)
DEG POS L10
MOV L10
The unit of the angular coordinate axes A, B, and C is radians. Use the DEG
function to convert it to degrees.
Joint
The syntax for the joint is the following: Programming: MELFA BASIC IV
SYNTAX
1. 2. 3. 4.
1. - Line Nos. can be any integer from 1 to 32767. One line can have up to 127 characters
2. - Command statement
3. - Command parameter
4. - Appended statement (MOV, MVS, MVR, MVR2, MVR3, MVC)
Example)
6 axis robot J1 = ( 0, 10, 80, 10, 90, 0 )
6 axis + Additional axis J1 = ( 0, 10, 80, 10, 90, 0, 10, 10 )
5 axis robot J1 = ( 0, 10, 80, 0, 90)
5 axis + Additional axis J1 = ( 0, 10, 80, 0, 90, 0, 10, 10 )
24
4
Joint interpolation movement(MOV)
MOV P1+P2 ' Moves to the position obtained by adding the P1 and P2 coordinate elements.
MOV P1,-50 ‘ Moves from P1 to a position retracted 50mm in the hand direction.
10 MOV P1
Program Explanation
‘ (1) Moves to P1 with joint interpolation.
Linear interpolation movement(MVS)
20 MOV P2, -50 ' (2) Moves from P2 to a position retracted 50 mm in the hand
direction The end of the hand is moved with linear interpolation to the designated position.
30 MOV P2 ' (3) Moves to P2 with joint interpolation MVS - The robot moves to the designated position with linear interpolation. An appended
40 MOV P3, -100 WTH M_OUT(17) = 1 ' (4) Starts movement form P3 to a position retracted 100 mm statement WTH or WTHIF can be designated.
in the hand direction and turns ON output signal bit (at
the same time) .
MVS - The robot moves to the designated position with linear interpolation. An appended
50 MOV P3 ' (5) Moves to P3 statement WTH or WTHIF can be designated.
60 MOV P3 ,-100 ' (6) Returns from P3 to a position retracted 100mm in the
Statement example
hand direction
70 END ‘ Ends the program MVS P1. ' Moves to P1
MVS P1+P2 ' Moves to the position obtained by adding the P1 and P2 coordinate elements.
MVS P1,-50 ' Moves from P1 to a position retracted 50mm in the hand direction.
Program Explanation
10 MVS P1, -50 ‘ (1) Moves with linear interpolation from P1 to a position Circular interpolation movement (MVR)
retracted 50mm in the hand direct.
30 MVS P1 ,-50 ' (3). Moves with linear interpolation from the current position Circular interpolation movement
(P1) to a position retracted 50 mm in the hand direction
The robot moves along an arc designated with three points using 3D circular
40 MVS P2, -100 WTH M_OUT(17) = 1 ' (4) Outout signal bit 17 is turned on at the same time as the
robot starts moving interpolation. If the current position is separated from the start point when
starting circular movement, the robot will move to the start point with linear
50 MVS P2 ' (5) Moves to P2 with linear interpolation
operation and then begin circular interpolation.
60 MVS P2 ,-100 ' Moves with linear interpolation from the current position (P2)
to a position retracted 100 mm in the hand direction
5
Command Explanation
MVR3 Designates the start point, end point and center point, and moves the robot with
MVR Designates the start point, transit point and end point, and moves the robot with circular interpolation from the start point to the end point. The fan angle from the
circular interpolation in order of the start point→transit point → end point An start point to the end point is 0 deg. < fan angle < 180 deg. An appended statement
appended statement WTH or WTHIF can be designated WTH or WTHIF can be designated
MVR P1,P2,P3 MVR3 P1, P3, P2
P1 P2
P1
P3
P2 P3
MVC Designates the start point (end point), transit point 1 and transit point 2, and moves
the robot with circular interpolation in order of the start point → transit point 1 →
MVR2 Designates the start point, end point and reference point, and moves the robot with transit point 2 → end point. An appended statement WTH or WTHIF can be
circular interpolation from the start point → end point without passing through the designated.
reference point. An appended statement WTH or WTHIF can be designated
MVC P1,P2,P3
MVR2 P1,P3,P2 P3
P1 P2
P1
P2
P3
Program Explanation
10 MVR P1, P2, P3
WTH M_OUT(18) = 1
‘ (1) Moves between P1 . P2 . P3 as an arc. The robot current position before movement is
separated from the start point, so first the robot will move with linear operation to the start
point. (P1) output signal bit 18 turns ON simultaneously with the start of circular movement.
Motion types: Continuous movement (CNT)
20 MVR P3,P4,P5 ' (2) Moves between P3 . P4 . P5 as an arc.
30 MVR2 P5,P7,P6 ' (3) Moves as an arc over the circumference on which the start point (P5), reference point Continuous movement (CNT)
(P6) and end point (P7) in the direction that the reference point is not passed between the
start point and end point. The robot continuously moves to multiple movement positions without stopping at each
40 MVR3 P7,P9,P8 ' (4) Moves as an arc from the start point to the end point along the circumference on which movement position. The start and end of the continuous movement are designated with the
the center point (P8), start point (P7) and end point (P9) are designated. command statement. The speed can be changed even during continuous movement.
50 MVC P9,P10,P11 ' (5) Moves between P9 . P10 . P11 . P9 as an arc. The robot current position before CNT denotes the start and end of the continuous movement.
movement is separated from the start point, so first the robot will move with linear operation
to the start point.(1 cycle operation) CNT 1 denotes the start and end of the continuous movement.
6
ACCEL. Sets both the acceleration and deceleration to 100%. SPEED evaluation:
ACCELL 60,80 Sets the acceleration to 60% and the deceleration to 80
50
OVRD 50 Sets the joint interpolation, linear interpolation and circular interpolation to
50% of the maximum speed.
JOVRD 70 Set the joint interpolation operation to 70% of the maximum speed.
SPD 30 Sets the linear interpolation and circular interpolation speed to 30mm/s.
OADL ON This instruction enables the optimum acceleration/deceleration function. For joint interpolated movement
Command Explanation
The program can be delayed by the designated time, and the output
HOPEN x Opens the designated hand x
signal can be output with pulses at a designated time width
HCLOSE x Close the designated hand x
Syntax:
DLY xxx Wait for the xxx seconds for the completion a previous task DLY value where value - time value (from 0.01s)
Ex
100 DLY 1 -’ Waits for only 1 second
110 M_OUT(4)=1 DLY 0.5 – ’Turns on output signal bit 10 for only
Command Explanation 0.5 seconds.
HOPEN 1 Opens hand No1
HOPEN 2 Opens hand No1
120 HOPEN 1
HCLOSE 1 Closes hand No1
130 DLY 0.5 - -’ Waits for only 0.5 seconds
Command Describtion
Output signals
M_IN(xx) returns the value of the input signal
M_OUT –writes or references external output signal
M_OUT(xx) writes or references external output signal M_OUT(18) = 1 Turns ON output signal bit 18 .
WAIT Waits for the input signal to reach the designated state CLR 1 Clears based on the output reset pattern.
CLR Clears the general-purpose output signal according to the M_OUT(1)=1 Turns the output signal bit 1 ON.
output signal reset pattern in the parameter
7
'ABSTRACT: The following MELFA BASIC IV program is used to:
'1) Pick up object from location Pos1 and place it to the conveyor (location Pos4)
'ABSTRACT: The '2) Start conveyor
following MELFA BASIC conveyor
'3) Pick up new part from the conveyor
IV program is used to:
'1) Pick up object from
location Pos1 and place it
to the conveyor (location Sensor : Input sig#6
Pos4) Conveyor Sensor; Input sig #7
Output singals:
M_OUT(5)= 1
Pos1
M_OUT(4)= 1