RCX3 PGM e V2.09
RCX3 PGM e V2.09
RCX3 PGM e V2.09
RCX340/RCX320
EGR9224209
Introduction
Safety precautions
2 Characters 1-1
5 Identifiers 1-4
7 Comment 1-5
Chapter 2 Constants
1 Outline 2-1
Chapter 3 Variables
1 Outline 3-1
T-1
CONTENTS RCX 3 Series
Programming Manual
T-2
CONTENTS RCX 3 Series
Programming Manual
Chapter 6 Multi-tasking
1 Outline 6-1
T-3
CONTENTS RCX 3 Series
Programming Manual
2 ABSRPOS Acquires the machine reference value (axes: mark method) 8-8
7 ARMTYP Sets/acquires the hand system selection during program reset 8-14
18 CORRECTXY Acquires the target position corrected for workpiece gripping position
misalignment. 8-25
20 CREWRK Creates the work data from the offset; difference between 2 point data
8-27
T-4
CONTENTS RCX 3 Series
Programming Manual
21 CURTQST Acquires the ratio of the current torque (current) value of axis
against the rated torque (current) value 8-28
22 CURTRQ Acquires the ratio of the current torque (current) value of axis
against the maximum torque (current) value 8-29
37 ERR / ERL Acquires the error code / error line number 8-52
40 EXIT SUB Terminates the sub-procedure defined by the SUB to END SUB
statement 8-55
42 FOR to NEXT Performs loop processing until the variable exceeds the specified value
8-57
T-5
CONTENTS RCX 3 Series
Programming Manual
57 LEFTY Sets the SCARA robot hand system as a left-handed system 8-78
69 MOVET Performs relative movement of all robot axes in tool coordinates 8-111
70 MTRDUTY Acquires the motor load factor of the specified axis 8-112
75 ONLINE Sets the specified communication port to the "online" mode 8-117
T-6
CONTENTS RCX 3 Series
Programming Manual
81 OUTPOS Specifies/acquires the OUT enable position parameter of the robot 8-123
88 PGN Acquires the program number from a specified program name 8-137
92 PRINT Displays the specified expression value at the programming box 8-146
103 RESET Turns OFF the bits of specified ports, or clears variables 8-161
105 RESUME Resumes program execution after error recovery processing 8-163
106 RETURN Processing which was branched by GOSUB, is returned to the next line
after GOSUB 8-164
107 RIGHT$ Extracts a character string from the right end of another character string
8-165
108 RIGHTY Sets the SCARA robot hand system as a right-handed system 8-166
T-7
CONTENTS RCX 3 Series
Programming Manual
111 SELECT CASE to END SELECT Executes the specified command block in accordance with the
<expression> value 8-169
112 SEND Sends readout file data to the write file 8-170
114 SET Turns the bit at the specified output port ON 8-173
116 SGI Assigns /acquires the value to a specified integer type static variable
8-175
117 SGR Assigns /acquires the value to a specified real type static variable 8-176
122 SIN Acquires the sine value for a specified value 8-181
125 SO Outputs a specified value to serial port or acquires the output status
8-184
127 SOW Outputs a specified serial output's word information or acquires the
output status 8-187
133 SUSPEND Temporarily stops another task which is being executed 8-194
135 TAN Acquires the tangent value for a specified value 8-196
139 TO Outputs a specified value to the TO port or acquires the output status
8-200
T-8
CONTENTS RCX 3 Series
Programming Manual
142 TSKPGM Acquires the program number which is registered in a specified task
number 8-204
145 WAIT ARM Waits until the robot axis operation is completed 8-207
149 WHERE Acquires the arm's current position (pulse coordinates) 8-211
150 WHILE to WEND Repeats an operation for as long as a condition is met 8-212
151 WHRXY Acquires the arm's current position in Cartesian coordinates 8-213
152 WRKDEF Defines the work data (creates the work data of the specified number)
8-214
2 Features 9-1
T-9
CONTENTS RCX 3 Series
Programming Manual
29 DI file 10-62
30 DO file 10-64
T-10
CONTENTS RCX 3 Series
Programming Manual
31 MO file 10-66
32 LO file 10-68
33 TO file 10-70
34 SI file 10-72
35 SO file 10-74
2 Application 11-8
2.1 Pick and place between 2 points 11-8
2.2 Palletizing 11-10
2.3 Pick and place of stacked parts 11-12
2.4 Parts inspection (Multi-tasking example) 11-14
2.5 Sealing 11-17
2.6 Connection to an external device through RS-232C (example 1) 11-18
2.7 Connection to an external device through RS-232C (example 2) 11-19
T-11
CONTENTS RCX 3 Series
Programming Manual
Chapter 13 Appendix
1 Reserved word list 13-1
Variable name usage examples 13-2
T-12
Introduction
Our sincere thanks for your purchase of this YAMAHA RCX 3 series robot controller.
This manual describes robot program commands and related information for using YAMAHA RCX 3 series robot
controllers. Be sure to read this manual carefully as well as related manuals and comply with their instructions for
using the YAMAHA robot controllers safely and correctly.
For details on how to operate YAMAHA robot controllers, refer to the separate controller user's manual that comes
with the YAMAHA robot controller.
c CAUTION
"CAUTION" indicates a potentially hazardous situation which, if not avoided, could result in minor or moderate
injury or damage to the equipment or software.
n NOTE
Primarily explains function differences, etc., between software versions.
Note that the items classified into “CAUTION” might result in serious injury depending on the situation or
environmental conditions.
Keep this manual carefully so that the operator can refer to it when needed. Also make sure that this manual reaches
the end user.
Chapter 1
Writing Programs
2 Characters 3
The characters and symbols used in the YAMAHA robot language are shown below.
Only 1-byte characters can be used.
• Alphabetic characters 4
A to Z, a to z
• Numbers
0 to 9
• Symbols 5
( ) [ ] + - * / ^ = < > & | ~ _ % ! # $ : ; , . " ' { }@ ?
• katakana (Japanese phonetic characters)
6
• Katakana (Japanese phonetic characters) cannot be entered from a programming box. Katakana can be used
when communicating with a host computer (if it handles katakana).
• Spaces are also counted as characters (1 space = 1 character).
3 Program Basics
Programs are written in a "1 line = 1 command" format, and every line must contain a command. Blank lines (lines
with no command) will cause an error when the program is executed. A line-feed on the program's final line creates a
blank line, so be careful not to do so.
To increase the program's efficiency, processes which are repeated within the program should be written as
subroutines or sub-procedures which can be called from the main routine. Moreover, same processing items which
occurs in multiple programs should be written as common routines within a program named [COMMON], allowing
those processing items to be called from multiple programs.
User functions can be defined for specific calculations. Defined user functions are easily called, allowing even
complex calculations to be easily performed.
Multi-task programs can also be used to execute multiple command statements simultaneously in a parallel processing
manner.
Using the above functions allows easy creation of programs which perform complex processing.
Reference • For details regarding sub-procedure, refer to "11 CALL" and "127 SUB to END SUB" in Chapter 8.
• For details regarding user defined functions, refer to "24 DEF FN" in Chapter 8.
2 • Program names may contain no more than 32 characters, comprising a combination of alphanumeric characters and
underscores (_).
• Each program must have a unique name (no duplications).
3 The 2 program names shown below are reserved for system operations, and programs with these names have a special
meaning.
A) SEQUENCE
4 B) COMMON
5 A) SEQUENCE
Functions Unlike standard robot programs, the RCX340/RCX320 Controller allow the execution of high-speed
processing programs (sequence programs) in response to robot inputs and outputs (DI, DO, MO, LO, TO,
6 SI, SO). Specify a program name of "SEQUENCE" to use this function, thus creating a pseudo PLC within
the controller.
When the controller is in the AUTO or MANUAL mode, a SEQUENCE program can be executed in fixed
cycles (regardless of the program execution status) in response to dedicated DI10 (sequence control input)
input signals, with the cycle being determined by the program capacity. For details, refer to "4.6 Sequence
program specifications" in Chapter 7.
This allows sensors, push-button switches, and solenoid valves, etc., to be monitored and operated by
input/output signals.
Moreover, because the sequence programs are written in robot language, they can easily be created
without having to use a new and unfamiliar language.
Sample
DO(20)=~DI(20)
DO(25)=DI(21) AND DI(22)
MO(26)=DO(26) OR DO(25)
:
Functions A separate "COMMON" program can be created to perform the same processing in multiple robot 1
programs. The common processing routine which has been written in the COMMON program can be
called and executed as required from multiple programs. This enables efficient use of the programming
space.
2
The sample COMMON program shown below contains two processing items (obtaining the distance
between 2 points (SUB *DISTANCE), and obtaining the area (*AREA)) which are written as common
routines, and these are called from separate programs (SAMPLE 1 and SAMPLE 2).
When SAMPLE1 or SAMPLE2 is executed, the SUB *DISTANCE (A!,B!,C!) and the *AREA routine are 3
executed.
Sample Description
Reference For details, refer to the command explanations given in this manual.
2 • Identifiers must consist only of alphanumeric characters and underscores (_). Special symbols cannot be used, and the
identifier must not begin with an underscore (_).
• The identifier length must not exceed 32 characters (all characters beyond the 32th character are ignored).
• The maximum number of usable identifiers varies depending on the length of the identifiers. When all identifier length
3 is 32 characters, the number is at the maximum. Local variables can be used up to 128 (in one program task) and
global variables can be used up to 512.
• Variable names must not be the same as a reserved word, or the same as a name defined as a system variable.
Moreover, variable name character strings must begin with an alphabetic character. For label names, however, the "*"
4 mark may be immediately followed by a numeric character.
Sample
6 LABEL Statement
Defines a label on a program line.
Format
*label:
A label must always begin with an asterisk (*), and it must be located at the beginning of the line.
Although a colon (:) is required at the end of the label when defining it, this mark is not required when writing a jump
destination in a program.
5
8 Command Statement Format
Format
One robot language command must be written on a single line and arranged in the format shown below:
• The shaded section can be omitted.
• The italic items should be written in the specific format.
• Items surrounded by | | are selectable.
• The label can be omitted. When using a label, it must always be preceded by an asterisk (*), and it must end with a
colon (:) (the colon is unnecessary when a label is written as a branching destination).
For details regarding labels, refer to "6 LABEL Statement" in this Chapter.
Comment 1-5
Chapter 2
Constants
1 1 Outline........................................................ 2-1
2 2 Numeric constants.................................... 2-1
3 3 Character constants................................. 2-2
1 Outline
1
Constants can be divided into two main categories: "numeric types" and "character types". These categories are further
divided as shown below.
Category Type Details/Range
Numeric Integer Decimal constants
2
type type -2,147,483,648 to 2,147,483,647
Binary constants
&B0 to &B11111111
Hexadecimal constants
3
&H80000000 to &H7FFFFFFF
Real type Single-precision real numbers
-999,999.9 to +999,999.9
Exponential format single-precision real numbers
4
-1.0×1038 to +1.0×1038
Character Character Alphabetic, numeric, special character, or katakana (Japanese) character
type string string of 255 bytes or less.
5
2 Numeric constants
6
2.1 Integer constants
• Decimal constants
Integers from -2,147,483,648 to 2,147,483,647 may be used.
• Binary constants
Unsigned binary numbers of 8 bits or less may be used. The prefix "&B" is attached to the number to define it as a
binary number.
Range: &B0 (decimal: 0) to &B11111111 (decimal: 255)
• Hexadecimal constants
Signed hexadecimal numbers of 32 bits or less may be used. The prefix "&H" is attached to the
number to define it as a hexadecimal number.
Range: &H80000000 (decimal: -2,147,483,648) to &H7FFFFFFF (decimal: 2,147,483,647)
Outline 2-1
3 Character constants
1
Character type constants are character string data enclosed in double quotation marks ("). The character string must
not exceed 255 bytes in length, and it may contain upper-case alphabetic characters, numerals, special characters, or
katakana (Japanese) characters.
2 To include a double quotation mark (") in a string, enter two double quotation marks in succession.
Sample Description
3 "YAMAHA ROBOT"
"EXAMPLE OF""A""" ………… Represents EXAMPLE OF "A".
PRINT "COMPLETED"
"YAMAHA ROBOT"
1 1Outline................................................................. 3-1
2 2User Variables & System Variables................... 3-2
3 3Variable Names.................................................. 3-3
4 4Variable Types.................................................... 3-4
5 5Array variables................................................... 3-5
6 6Value Assignments............................................. 3-5
7 7Type Conversions............................................... 3-6
8 7Value Pass-Along & Reference Pass-Along..... 3-6
9 7System Variables................................................ 3-7
10 1Bit Settings......................................................... 3-17
11 1Valid range of variables.................................. 3-18
12 1Clearing variables............................................ 3-19
1 Outline
1
There are "user variables" which can be freely defined, and "system variables" which have pre-defined names and
functions.
User variables consist of "dynamic variables" and "static variables". "Dynamic variables" are cleared at program 2
editing, program resets, and program switching. "Static variables" are not cleared unless the memory is cleared.
The names of dynamic variables can be freely defined, and array variables can also be used.
Variables can be used simply by specifying the variable name and type in the program. 3
A declaration is not necessarily required. However, array variables must be pre-defined by a DIM statement.
5
Real variables (single-precision)
Output variables
Point variables
Shift variables
33301-R9-00
Reference For details regarding array variables, refer to "5 Array variables" in this Chapter.
Outline 3-1
2 User Variables & System Variables
1
2.1 User Variables
Numeric type variables consist of an "integer type" and a "real type", and these two types have different usable numeric
2 value ranges. Moreover, each of these types has different usable variables (character string variables, array variables,
etc.), and different data ranges, as shown below.
n NOTE
Array variables are dynamic variables.
Output variables External signal / status outputs DO, SO, SOW, SOD
Point variables Handles point data Pnnnn
Shift variables Specifies the shift coordinate No. as a Sn
numeric constant or expression
Reference For details regarding reserved words, refer to Chapter 13 "1 Reserved word list".
Static variables are cleared only when initializing is executed by online command.
Reference For details regarding clearing of static variables, refer to "12 Clearing variables" in this Chapter.
3
• If no type declaration character is attached, the variable is viewed as a real type.
• Variables using the same identifier are recognized to be different from each other by the type of each variable.
4 • ASP_DEF%............. Integer variable
• ASP_DEF................ Real variable )→ ASP_DEF% and ASP_DEF are different variables.
)
• ASP_DEF!............... Real variable
• ASP_DEF................ Real variable
→ ASP_DEF! and ASP_DEF are the same variables.
5
4.1 Numeric variables
6 Integer variables
Integer variables and integer array elements can handle an integer from -2,147,483,648 to 2,147,483,647 (in signed
hexadecimal, this range is expressed as &H80000000 to &H7FFFFFFF).
Sample
R1% = 10
R2%(2) = R1% + 10000
n NOTE
When a real number is assigned to an integer type variable, the decimal value is rounded off to the nearest
whole number. For details, refer to Chapter 4 "1.5 Data format conversion".
Real variables
Real variables and real array elements can handle a real number from –1.0×1038 to 1.0×1038.
Sample
R1! = 10.31
R2!(2)= R1% + 1.98E3
n NOTE
The "!" used in real variables may be omitted .
3
• All array variables are dynamic variables. (For details regarding dynamic variables, refer to "11 Valid range of
variables" in this Chapter.)
• The length of an array variable that can be declared with the DIM statement depends on the program size. 4
Format
Sample Description
A%(1) Integer array variable 6
DATA!(1,10,3) Single-precision real array variable (3-dimension array)
6 Value Assignments
Format
Write the value assignment target variable on the left side, and write the assignment value or the expression on the
right side. The expression may be a constant, a variable, or an arithmetic expression, etc.
6 Value pass-along
With this method, the variable's value is passed along to the sub-procedure. Even if this value is changed within the
sub-procedure, the content of the call source variable is not changed.
A value pass-along occurs when the CALL statement's actual argument specifies a constant, an expression, a variable,
or an array element (array name followed by (subscript)).
Reference pass-along
With this method, the variable's reference (address in memory) is passed along to the sub-procedure. If this value is
changed within the sub-procedure, the content of the call source variable is also changed.
A reference pass-along occurs when the CALL statement's actual argument specifies an entire array (an array named
followed by parenthetical content), or when the actual argument is preceded by "REF".
X%=5 X%=5
CALL *TEST( X% ) CALL *TEST( REF X% )
PRINT X% PRINT X%
HALT HALT
’SUB ROUTINE ’SUB ROUTINE
SUB *TEST( A% ) SUB *TEST( A% )
A%=A%*10 A%=A%*10
END SUB END SUB
Execution result: The X% value remains as "5". Execution result: The X% value becomes "50".
33302-R7-00
4
status
Arm lock output variable LO(mb), LOm(b) Axis-specific movement prohibit
Timer output variable TO(mb), TOm(b) For sequence program's timer function
Serial input variable SI(mb), SIm(b) Serial input signal status
Serial output variable SO(mb), SOm(b) Serial output signal setting and status 5
Serial word input SIW(m) Serial input's word information status
Serial double-word input SID(m) Serial input's double-word information status
Format
Pnnnnn or P[expression]
Functions A point data number is expressed with a "P" followed by a number of 5 digits or less, or an expression
surrounded by brackets ([expression])
Point numbers from 0 to 29999 can be specified with point variables.
Sample
P0
P110
P[A]
P[START_POINT]
P[A(10)]
Snn or S[expression]
2
Notation Value Range
n Shift number 0 to 9
Functions A shift number is expressed with an "S" followed by a 2-digit number or an expression surrounded by
3 brackets ([expression]). As a shift number, 0 to 39 can be specified.
Sample
S1
4 S[A]
S[BASE]
S[A(10)]
5
The "shift coordinate range" for each shift number can be changed from the programming box.
6
9.3 Parallel input variable
This variable is used to indicate the status of parallel input signals.
Format 1
DIm(b, ..., b)
Format 2
Sample Description
Input status of ports DI(17) to DI(10) is assigned to variable A%.
A%=DI1()
0 to 255 integer can be assigned to A%.
Input status of DI(57), DI(54) and DI(50) is assigned to variable
A%=DI5(7,4,0)
A%.(If all above signals are 1(ON), then A%=7.)
Input status of DI(27), DI(15) and DI(10) is assigned to variable
A%=DI(27,15,10)
A%.(If all above signals except DI(10) are 1 (ON), then A%=6.)
WAIT DI(21)=1 Waits for DI(21) to change to 1(ON).
• When specifying multiple bits, specify them from left to right in descending order (high to low).
• A "0" is input if an input port does not actually exist.
DOm(b, ..., b)
2
Format 2
DO3()=B%
Example) B% is "123":
"123" is represented as "01111011" in binary number,
DO(37) and DO(32) is "0", and the other bits is "1".
DO4(5,4,0)=&B101 DO(45) and DO(40) become "1", and DO(44) becomes "0".
• When specifying multiple bits, specify them from left to right in descending order (high to low).
• If an output port does not actually exist, the data is not output externally.
Format 1
MOm(b, ..., b)
2
Format 2
4 Functions Internal output variables which are used only in the controller, can set the status and refer.
These variables are used for signal communications, etc., with the sequence program.
Ports 30 to 37 are for dedicated internal output variables which can only be referenced (they cannot be changed).
1. Port 30 indicates the status of origin sensors for axes 1 to 8 (in order from bit 0). Port 1 indicates
5 the status of origin sensors for axes 9 to 16 (in order from bit 0).
Each bit sets to "1" when the origin sensor turns ON, and to "0" when OFF.
2. Port 34 indicates the HOLD status of axes 1 to 8 (in order from bit 0). Port 35 indicates the HOLD
status of axes 9 to 16 (in order from bit 0).
6 Each bit sets to "1" when the axis is in HOLD status, and to "0" when not.
Bit 7 6 5 4 3 2 1 0
Port 30 Axis 8 Axis 7 Axis 6 Axis 5 Axis 4 Axis 3 Axis 2 Axis 1
Port 31 Axis 16 Axis 15 Axis 14 Axis 13 Axis 12 Axis 11 Axis 10 Axis 9
Origin sensor status 0: OFF / 1: ON (Axis 1 is not connected)
Port 34 Axis 8 Axis 7 Axis 6 Axis 5 Axis 4 Axis 3 Axis 2 Axis 1
Port 35 Axis 16 Axis 15 Axis 14 Axis 13 Axis 12 Axis 11 Axis 10 Axis 9
Hold status 0: RELEASE / 1: HOLD (Axis 1 is not connected)
Sample Description
When specifying multiple bits, specify them from left to right in descending order (high to low).
LOm(b, ..., b)
2
Format 2
Sample Description
A%=LO0() Arm lock status of LO(07) to LO(00) is assigned to variable A%.
6
Arm lock status of LO(07), LO(04) and LO(00) is assigned to
A%=LO0(7,4,0) variable A%.
(If all above signals are 1(ON), then A%=7.)
• When specifying multiple bits, specify them from left to right in descending order (high to low).
• Servo OFF to ON switching is disabled if an arm lock is in effect at even 1 axis.
• When performing JOG movement in the MANUAL mode, axis movement is possible at axes where an arm
lock status is not in effect, even if an arm lock status is in effect at another axis.
• When executing movement commands from the program, etc., the "12.401 Arm locked" error will occur if
an arm lock status is in effect at the axis in question.
• Arm locks sequentially correspond to axes in order from the axis with the smallest axis number used by
robot 1.
Example) In the case of a configuration where robot 1 has 5 axes and robot 2 has 4 axes, the status of axes
1 to 5 of robot 1 is set by bits 0 to 4 of port 0, the status of axes 1 to 3 of robot 2 is set by bits 5 to 7 of port 0,
and the prohibition of motion of axis 4 of robot 2 is set by bit 0 of port 1.
Format 1
TOm(b, ..., b)
2
Format 2
Functions The contents of this variable can be changed and referred to as needed.
Timer function can be used only in the sequence program.
5 If this variable is output in a normal program, it is an internal output.
When specifying multiple bits, specify them from left to right in descending order (high to low).
SIm(b, ..., b)
2
Format 2
5
Input status of ports SI(17) to SI(10) is assigned to variable
A%=SI1()
A%.
6
(If all above signals are 1(ON), then A%=7.)
• When specifying multiple bits, specify them from left to right in descending order (high to law).
Format 1
SOm(b, ..., b)
2
Format 2
Sample Description
5
A%=SO2() Output status of SO(27) to SO(20) is assigned to variable A%.
• When specifying multiple bits, specify them from left to right in descending order (high to law).
• If a serial port does not actually exist, the data is not output externally.
SIW(m)
2
Notation Value Range
m port number 2 to 15*
The acquisition range is 0 (&H0000) to 65,535 (&HFFFF).
*W hen SIOW extension is enabled, the range of port number is extended to 2 -15, 24 - 127. 3
For details, refer to RCX3 user's /operator’s manual "Option board related parameters".
Sample Description
A%=SIW(2) The input status from SIW (2) is assigned to variable A%. 4
A%=SIW(15) The input status from SIW (15) is assigned to variable A%.
5
• The information is handled as unsigned word data.
• "0" is input if a serial port does not actually exist.
6
9.11 Serial double word input
This variable indicates the state of the serial input word information as a double word.
Format
SID(m)
Sample Description
The input status from SIW (2) , SIW (3) is assigned to
A%=SID(2)
variable A%.
Format
SOW(m)
2
Notation Value Range
m port number 2 to 15*
The output range is 0 (&H0000) to 65,535 (&HFFFF).
3 Note that if a negative value is output, the low-order word information will be output after being converted to
hexadecimal.
*W hen SIOW extension is enabled, the range of port number is extended to 2 -15, 24 - 127.
For details, refer to RCX3 user's /operator’s manual "Option board related parameters".
4 Sample Description
A%=SOW(2) The output status of SOW (2) is assigned to variable A%.
The contents of variable A% are assigned in SOW (15).
Format
SOD(m)
Sample Description
A%=SOD(2) The output status of SOD (2) is assigned to variable A%.
1. Single bit
2
To specify only 1 of the bits, the target port number and bit number are specified in parentheses.
The port number may also be specified outside the parentheses.
To specify multiple bits at different ports, 2-digit consisting of the port number and the bit number must be specified in
parentheses and must be separated by commas. Up to 8 bits can be written.
To specify all bits of a single port, use parentheses after the port number. Methods 2 and 3 shown above can also be
used.
DO2(7,6,5,4,3,2,1,0)
5
12.2 Clearing static variables
In the cases below, integer variables and real variables are cleared to zero.
6
• When the following is initialized by an initialization operation.
Entire memory
• When any of the following online commands was executed.
@INIT MEM, @INIT ALL
When a "remainder" (MOD) operation involves real numbers, the decimal value is rounded off to the nearest whole 4
number which is then converted to an integer before the calculation is executed. The result represents the remainder
of an integer division operation.
Sample Results 5
A=15 MOD 2 A=1(15/2=7....1)
6
1.2 Relational operators
Relational operators are used to compare 2 values. If the result is "true", a "-1" is obtained. If it is "false", a "0" is
obtained.
Sample Results
A=10>5 Since 10 > 5 is "true", A = -1.
When using equivalence relational operators with real variables and real arrays, the desired result may not be
obtained due to the round-off error.
Sample Description
• Depending on the logic operation performed, the results generated are either 0 or 1.
2 • Logic operations with real numbers convert the values into integers before they are executed.
4 EQV
Logical equivalence
operator
Becomes "1" when both bits are equal.
Logical implication Becomes "0" when the first bit is "1" and the second bit
IMP
operator is "0".
5
Examples: A%=NOT 13.05 → "-14" is assigned to A% (reversed after being rounded off to 13).
Bit 7 6 5 4 3 2 1 0
6 13 0 0 0 0 1 1 0 1
NOT 13=-14 1 1 1 1 0 0 1 0
Bit 7 6 5 4 3 2 1 0
3 0 0 0 0 0 0 1 1
10 0 0 0 0 1 0 1 0
3 AND 10 = 2 0 0 0 0 0 0 1 0
Bit 7 6 5 4 3 2 1 0
3 0 0 0 0 0 0 1 1
10 0 0 0 0 1 0 1 0
3 OR 10 = 11 0 0 0 0 1 0 1 1
Bit 7 6 5 4 3 2 1 0
3 0 0 0 0 0 0 1 1
10 0 0 0 0 1 0 1 0
3 XOR 10 = 9 0 0 0 0 1 0 0 1
When a real number is assigned to an integer, decimal places are rounded off.
Sample Results
A%=125.67 A%=126
When integers and real numbers are involved in the same operation, the result becomes a real number.
Sample Results
A(0)=125 * 0.25 A(0)=31.25
When an integer is divided by an integer, the result is an integer with the remainder
discarded.
Sample Results
A(0)=100/3 A(0)=33
3 C$="LANGUAGE"
D$="MOUNTER" YAMAHA ROBOT LANGUAGE
E$=A$+" "+B$+" "+C$ YAMAHA MOUNTER
F$=A$+" "+D$
PRINT E$
4 PRINT F$
Sample Results
"AA"<"AB"
"DESK"<"DESKS"
4
n NOTE
• The data format is common for axes 1 to 6 for both the joint coordinate format and the Cartesian
coordinate format.
• Plus (+) signs can be omitted.
• The first arm and the second arm rotation information is not available on any robot model except
the YK-TW series.
5
When setting an extended hand system flag for SCARA robots, set either "1" or "2" at the end of the data.
If a value other than "1" or "2" is set, or if no value is designated, "0" will be set to indicate that no hand system flag is 6
set.
On the YK-TW series robot, the first arm and the second arm movement range is extended beyond 360 degrees (The
working envelope for both the first arm and second arm is -225° to +225°).
Therefore, attempts to convert Cartesian coordinate data ("mm" units) to joint coordinate data ("pulse" units) will result
in multiple solutions, making the position impossible to determine.
In order to obtain the correct robot position and arm posture when converting to joint coordinates, the first arm and
the second arm rotation information is added after the "mm" units point data's extended hand system flag.
The Cartesian coordinate data ("mm" units) is then converted to joint coordinate data ("pulse" units) according to the
specified the first arm and the second arm rotation information.
To set extended the first arm and the second arm rotation information at the YK-TW series robot, a "-1", "0", or "1"
value must be specified after the hand system flag. Any other value, or no value, will be processed as "0".
*1: The joint-coordinates-converted pulse data represents each arm's distance (converted to angular
data) from its mechanical origin point.
• Constant
Decimal integer constant, binary integer constant, hexadecimal integer constant
3 • Variables
Global integer type, global real type, input/output type
• Operators
Relational operators, logic operators
4 • Operation priority
1. Relational operators
2. NOT, ~
3. AND, &
5 4. OR, |, XOR
Sample Decsription
6
The program waits until either DI31 or DI34
WAIT DI(31)=1 OR DI(34)=1
turns ON.
1 1 Overview.................................................... 5-1
2 2 Command list with a robot setting........... 5-2
1 Overview
1
RCX340/RCX320 can be used to control multiple robots (up to 4).
The multi-task function also enables multiple robots to move asynchronously.
To use this function, settings for multiple robots or settings for auxiliary axes must be made in the system prior to
shipment. 2
The following settings are possible to the axes of robots.
• Robot 1 (4 axes)
• Robot 1 (1 axis) + robot 2 (1 axis) + robot 3 (1 axis) + robot 4 (1 axis) 3
• Robot 1 (6 axes) + robot 2 (2 axes) (when using the YC-LINK/E option)
• Robot 1 (4 axes) + robot 2 (4 axes) (when using the YC-LINK/E option)
• Robot 1 (2 axes) + robot 2 (2 axes)
• Robot 1 (4 axes) + robot 2 (4 axes) + robot 3 (4 axes) + robot 4 (4 axes) 4
(when a master controller is RCX340 and the YC-LINK/E option is used.)
• Robot 1 (2 axes) + robot 2 (4 axes) + robot 3 (4 axes) + robot 4 (4 axes)
(when a master controller is RCX320 and the YC-LINK/E option is used.)
5
Each robot consists of normal axes and auxiliary axes.
When using one robot without auxiliary axes, the setting is made only to normal axes.
6
Axes configuration
1. For robot 1
Main group
Robot 1 normal axis Robot 1 auxiliary axis
(Number of axes: 1 to 4) (Number of axes: 1 to 4)
Robot 1
Robot 1 normal axis Robot 1 auxiliary axis
(Number of axes: 1 or 2) (Number of axes: 1 or 2)
Robot 2
Robot 2 normal axis Robot 2 auxiliary axis
(Number of axes: 1 or 2) (Number of axes: 1 or 2)
Robot 1
Robot 1 robot Robot 1 auxiliary axis
(Number of axes: 1 to 4) (None)
Robot 1
Robot 1 robot Robot 1 auxiliary axis
(Number of axes: 1 or 2) (None)
Robot 2
Robot 2 robot Robot 2 auxiliary axis
(Number of axes: 1 or 2) (None)
33501-R9-00
Overview 5-1
2 Command list with a robot setting
1
The special commands and functions for robot movements and coordinate control are common for all robots. A robot
can be specified with an option of a command. Main commands are shown below.
• An axis specified as an auxiliary axis cannot be moved with the MOVE, MOVEI, MOVET and PMOVE commands.
Use the DRIVE or DRIVEI command to move it.
1 1 Outline........................................................ 6-1
2 2 Task definition method.............................. 6-1
3 3 Task status and transition.......................... 6-2
4 4 Multi-task program example................... 6-8
5 5 Sharing the data........................................ 6-9
6 6 Cautionary Items....................................... 6-9
1 Outline
1
The multi-task function performs multiple processing simultaneously in a parallel manner, and can be used to create
programs of higher complexity. Before using the multi-task function, read this section thoroughly and make sure that
you fully understand its contents.
Multi-tasking allows executing two or more tasks in parallel. However, this does not mean that multiple tasks are 2
executed simultaneously because the controller has only one CPU to execute the tasks. In multi-tasking, the CPU time
is shared among multiple tasks by assigning a priority to each task so that they can be executed efficiently.
6
• Create one program that describes a command which is to be defined as a task.
• In the START statement of the program that will be a main task, specify the program created at Step 1 above.
Task numbers are then assigned, and the program starts.
Sample Description
’MAIN TASK(TASK1)
START <SUB_PGM>,T2………………………………… <SUB_PGM> is started as Task 2
*ST1:
MOVE P,P1,P0
IF DO(20)= 1 THEN
HALTALL
ENDIF
GOTO *ST
HALTALL
Program name:SUB_TSK2
’SUB TASK(TASK2)
*IOTASK:…………………………………………………………… Task 2 begins here
IF DI(21)=1 THEN
DO(30)=1
ELSE
DO(30)=0
ENDIF
GOTO *IOTASK ……………………………………………… Task 2 processing ends here
EXIT TASK
Outline 6-1
3 Task status and transition
1
There are 6 types of task status.
• STOP status A task is present but the task processing is stopped.
• RUN status A task is present and the task processing is being executed by the CPU.
2 • READY status A task is present and ready to be allocated to the CPU for task processing.
• WAIT status A task is present and waiting for an event to begin the task processing.
• SUSPEND status A task is present but suspended while waiting to begin the task processing.
• NON EXISTENT status No tasks exist in the program. (The START command is used to perform a call.)
3
Task state transition
CPU assignment
4
Restart Cancel waiting Wait condition
STOP
6
Delete Call
NON EXISTENT
Reference For details regarding REFTSK function, refer to Chapter 8 "101 REFTSK".
Reference For details regarding the START command, refer to "123 START" in Chapter 8.
• When the LOAD command is executed, a specified program is registered in the task and placed in a STOP
status. For details of the LOAD command, refer to "1. Register task" of "2.1 Program operations" in Chapter 12.
• If another program is already registered in the task number specified by the START command or the LOAD
command, the "6.215: Task running" error will occur.
• When programs are registered in all task numbers and the START command or the LOAD command is executed
without specifying the task number, the "6.263: Too many Tasks" error will occur.
• When the HALTALL command is executed, all tasks terminate and the task enters the NON EXISTENT (no task
registration) status. When the main program is specified, the HALTALL command registers the main program
in the task 1 and stops at the beginning line. When the main program is not specified, the HALTALL command
registers the program that has been executed last (current program) in the task 1 and stops at the beginning line.
Reference For details regarding the main program, refer to "Setting the main program" of operator's manual.
Priority level
4
The head of the task with the highest priority
Task 1 is put in RUN status.
High
32
Task 1 Task 3 Task 4 Ready queue 1
33 5
Task 5 Ready queue 2
34
Task 2 Ready queue 3
Low
6
Order in which tasks are put in READY status.
A RUN status task will be moved to the end of the ready queue if placed in a READY status by any of the following causes:
• A WAIT status command was executed.
• The CPU occupation time exceeds a specified time.
• A task with a higher priority level is put in READY status.
Ready queue
Execution sequence
n NOTE
When the prescribed CPU occupation time elapses, the active command is ended, and processing moves to
the next task.
However, if there are no other tasks of the same or higher priority (same or higher ready queue), the same
task will be executed again.
When a command causing WAIT status is executed, the following transition happens.
2 • Task for which a command causing WAIT status is executed → WAIT status
• Task at the head of the ready queue with higher priority → RUN status
3 For example, when a MOVE statement (a command that establishes WAIT status) is executed,
the CPU sends a "MOVE" instruction to the driver, and then waits for a "MOVE COMPLETED" reply from the
driver. This is "waiting for an event" status.
4 In this case, WAIT status is established at the task which executed the MOVE command, and that task is moved
to the end of the ready queue. RUN status is then established at the next task.
When an event waited by the task in the WAIT status occurs, the following status transition takes place
by task scheduling.
5 Task in the WAIT status for which the awaited event occurred → READY status
However, if the task put in the READY status was at the head of the ready queue with the highest priority,
the following transition takes place.
• Task that is currently in RUN status → READY status
6 • Task at the head of the ready queue with higher priority → RUN status
In the above MOVE statement example, the task is moved to the end of the ready queue.
Then, when a "MOVE COMPLETED" reply is received, this task is placed in READY status.
n NOTE
If multiple tasks are in WAIT status awaiting the same condition event, or different condition events occur
simultaneously, all tasks for which the waited events occur are put in READY status.
The tasks are not put in WAIT status if the event has been established before the above commands are executed.
SUSPEND
3
Task 1 Task 2 Task 3 Task 1 Task 3
5
3.5 Restarting tasks (RESTART)
Tasks in the SUSPEND status can be restarted with the RESTART command.
When the RESTART command is executed, the status transition takes place as follows. 6
• Task for which the RESTART command was executed → RUN status
• Specified task → READY status
RESTART
Tasks can delete themselves and set to the NON EXISTENT (no task registration) status by using the EXIT TASK
command.
2 When the EXIT TASK command is executed, the status transition takes place as follows.
• Task that executed the EXIT TASK command → NON EXISTENT status
• Task at the head of the ready queue with higher priority → RUN status
3
Task self-delete (EXIT TASK)
EXIT TASK
Tasks can also delete the other tasks and put in the NON EXISTENT (no task registration) status by using the CUT
command.
When the CUT command is executed, the status transition takes place as follows.
CUT
If a SUSPEND command is executed for a WAIT-status task, the commands being executed by that task are ended.
STOP key on the programming box is pressed or the interlock signal is cut off. 4
Just as in the case where the HOLD command is executed, all tasks are put in the STOP status.
When the program is restarted, the tasks in the STOP status set to the READY status (or, the task is placed
the SUSPEND status after being placed in the READY status).
5
When the emergency stop button on the programming box is pressed or the emergency stop signal is cut off.
All tasks are put in the STOP status. At this point, the power to the robot is shut off and the servo sets to the non-hold
state.
After the canceling emergency stop, when the program is restarted, the tasks in the STOP status are set to the READY 6
or SUSPEND status. However, a servo ON is required in order to restart
the robot power supply.
When the program is restarted without being reset after the tasks have been stopped by a cause other than 1., then
each task is processed from the status in which the task stopped. This holds true when the power to the controller
is turned off and then turned on.
2 ’TASK1
START <SUB_TSK2>,T2
TASK1
START <SUB_TSK3>,T3
*ST1:
DO(20) = 1
3 WAIT MO(20) = 1
MOVE P,P1,P2,Z=0
IF MO(21)=1 THEN *FIN
GOTO *ST1
*FIN:
4 CUT T2
HALTALL
Program name:SUB_TSK2
’TASK2 Task 2 begins here.
5 *ST2:
IF DI(20) = 1
MO(20) = 1
DELAY 100
6
ELSE
MO(20) = 0
ENDIF
GOTO *ST2
EXIT TASK Ends here.
Program name:SUB_TSK3
’TASK3 Task 3 begins here.
*ST3:
IF DI(21) = 0 THEN *ST3
IF DI(30) = 0 THEN *ST3
IF DI(33) = 0 THEN *ST3
MO(21) = 1
EXIT TASK Ends here.
In this case, however, use sufficient caution when rewriting the variable and data because improper changes
may cause trouble in the task processing. Take great care when sharing the same variables and data.
3
4
6 Cautionary Items
A freeze may occur if subtasks are continuously started (START command) and ended (EXIT TASK command) by a 5
main task in an alternating manner.
This occurs for the following reason: if the main task and subtask priority levels are the same, a task transition to the
main task occurs during subtask END processing, and an illegal task status then occurs when the main task attempts to
start a subtask. 6
Therefore, in order to properly execute the program, the subtask priority level must be set higher than that of the main
task. This prevents a task transition condition from occurring during execution of the EXIT TASK command.
In the sample program shown below, the priority level of task 1 (main task) is set as 32, and the priority level of task 2
is set as 31 (the lower the value, the higher the priority).
Sample Description
FLAG1 = 0 MAIN_TASK
*MAIN_TASK:
IF FLAG1=0 THEN
FLAG1 = 1
START <SUB_PGM>, T2, 31 <SUB_PGM> is started as task 2 with priority level
ENDIF 31.
GOTO *MAIN_TASK
HALTALL
'=====================
' TASK2 SUB TASK (Program name:SUB_PGM)
'=====================
*TASK2:
DRIVE(1,P1)
WAIT ARM(1)
DRIVE(1,P2)
WAIT ARM(1)
FLAG1 = 0
EXIT TASK
• This function allows to monitor the input/output signals of sensors, push button switches, solenoid valves, etc. and 8
move them. The sequence program starts running simultaneously the controller is turned on.
• The sequence program can be written in the same robot language used for robot programs. (The ladder logic are not
necessary).
• Naming the program "SEQUENCE" makes the controller recognize as sequence program. 9
• For details regarding conditions to execute a sequence program, refer to "3 Executing a sequence program" in this
Chapter.
• General-purpose outputs are not reset by the program reset while the sequence function is running.
10
n NOTE
• While the "DI10" *: sequence control input" is ON, a sequence program runs according to its own cycle,
regardless of robot program starts and stops. * "SI10" instead of "DI10" when an SIO board is inserted.
• The output while a sequence program is running is as follows.
> When a dedicated PIO board is inserted: "DO12: Sequence program running" dedicated signal output
> When an SIO board is inserted: "SO12: Sequence program running" dedicated signal output
11
In the manners shown below, the reset of general-purpose output will be allowed while the sequence program 12
is operating.
• Set a sequence flag value of the controller parameter at "3".
• Select "Output Reset Enable" on the sequence execution flag dialogue in the support software.
13
Item Specification
Commands Logical NOT, AND, OR, XOR, EQV, IMP
Scan time 2 to 8 ms depending on the number of steps (this value changes automatically)
10
2
11
P r e s s t h e F1 k e y ( N E W ) o n t h e " P R O G R A M
SELECTION" screen.
12
13
9
6 I n p u t a p ro g r a m o n " P R O G R A M S E L E C T I O N "
screen.
A l t h o u g h u s a b l e c o m m a n d s a re re s t r i c t e d ,
editing method is same as the standard robot 10
program.
Commands which can be input are explained
at "4 Programming a sequence program" in this
11
Chapter.
12
13
10
2 The confirmation message will appear whether
you execute sequence compile.
Press [OK] to compile the program.
11
12
13
The sequence execution program is erased and the Flag's letter "s" disappears in the following cases. In these cases
the sequence function cannot be used.
10
11
4.1 Sequence program STEP execution
The sequence program may be executed line by line while checking one command line at a time. This step execution
can be executed in the same way as normal programs. 12
For details, refer to the operator’s manual.
When the step is executed, satisfying the conditions described in the previous section is not required.
13
Notation Description
DI(mb)
SI(mb)
TIMmb=time
Meaning The timer definition statement sets the timer value of the timer output variable.
This definition statement may be anywhere in the program.
10 When the timer definition statement is omitted, the timer setting value of the variable is 0.
13
• When DI(23) is ON, after 2.5 seconds, TO(02) is set ON.
• When DI(23) is OFF, TO(02) is also OFF.
• When DI(23) isn’t ON after 2.5 second or more, TO(02) does not change to ON.
DI(23)
1.6sec
2.5sec
TO(02)
12
Example with a ladder statement substitution
Sample
DO(23)=DI(16)&DO(35)
MO(34)=DO(25) | ~DI(24) 13
DO(31)=(DI(20) | DO(31))&~DI(21)
Ladder diagram
DI(16) DO(35) DO(23)
DO(25) MO(34)
~DI(24)
• "NOT" cannot be used prior to the first parenthesis " ( " or on the left of an expression. For example, the
following commands cannot be used.
•DO(21)=~(DI(30) | DI(32))
•~DO(30)=DI(22)&DI(27)
• Numeric values cannot be assigned on the right of an expression.
•MO(35)=1
•DO(26)=0
• There is no need to define a "HALT" or "HOLD" statement at the end of the program.
• The variables used in sequence programs are shared with robot programs, so be careful not to make
improper changes when using the same variables between them.
(1) Name 10
Indicates each robot language (command) name.
(2) Description
Explains the function of the robot language. 11
(3) Online
If "3" is indicated at this item, online commands can be used.
If "-" is indicated at this item, commands containing operands that cannot partially be executed by online command. 12
(4) Type
Indicates the robot language type as "Command" or "Function".
When a command is used as both a "Command" and "Function", this is expressed as follows: Command/Function 13
Name Description Online Type
A
ABS Acquires the absolute value of a specified value. 3 Function
Acquires the machine reference value for specified robot
ABSRPOS axes. (Valid only for axes whose return-to-origin method is 3 Function
set as "mark".)
Specifies/acquires the acceleration coefficient parameter of Command /
ACCEL 3
a specified robot. Function
Specifies/acquires the arch distance 1 parameter of a Command /
ARCHP1 3
specified robot. Function
Specifies/acquires the arch distance 2 parameter of a Command /
ARCHP2 3
specified robot. Function
ARMCND Acquires the current arm status of a specified robot. 3 Function
Specifies/acquires the current "hand system" setting of a Command /
ARMSEL 3
specified robot. Function
Specifies/acquires the "hand system" setting of a specified Command /
ARMTYP 3
robot. Function
Specifies/acquires the AUTO movement speed of a Command /
ASPEED 3
specified robot. Function
ATN Acquires the arctangent of the specified value. 3 Function
ATN2 Acquires the arctangent of the specified X-Y coordinates. 3 Function
Specifies/acquires the axis tip weight parameter of a Command /
AXWGHT 3
specified robot. Function
C
CALL Calls a sub-procedure. - Command
CHANGE Switches the hand data of a specified robot. 3 Command
CHGPRI Changes the priority ranking of a specified task. 3 Command
CHGWRK Switches the work data of a specified robot. 3 Command
CHR$ Acquires a character with the specified character code. 3 Function
D
DATE$ Acquires the date as a "yy/mm/dd" format character string. 3 Function
Specifies/acquires the deceleration rate parameter of a Command /
12 DECEL
specified robot.
3
Function
DEF FN Defines the functions that can be used by the user. - Command
DEGRAD Converts a specified value to radians (↔RADDEG). 3 Function
DELAY Waits for the specified period (units: ms). - Command
13 DI Acquires the specified DI status. 3 Function
DIM Declares the array variable name and the number of elements. - Command
DIST Acquires the distance between 2 specified points. 3 Function
Outputs a specified value to the DO port or acquires the DO Command /
DO 3
status. Function
DRIVE Moves a specified axis of a specified robot to an absolute position. 3 Command
DRIVEI Moves a specified axis of a specified robot to a relative position. 3 Command
E
END SELECT Terminates the SELECT CASE statement. - Command
END SUB Terminates the sub-procedure definition. - Command
Acquires the error code number of an error which has
ERR / ERL 3 Function
occurred / the line number where an error occurred.
ETHSTS Acquires the Ethernet port status. 3 Function
EXIT FOR Terminates the FOR to NEXT statement loop. - Command
Terminates the sub-procedure defined by the SUB to END
EXIT SUB - Command
statement.
EXIT TASK Terminates its own task which is in progress. - Command
F
Executes the FOR to NEXT statement repeatedly until a
FOR to NEXT - Command
specified value is exceeded.
G
GEPSTS Acquires the General Ethernet Port status. 3 Function
GOSUB to Jumps to a subroutine with the label specified by GOSUB
- Command
RETURN statement, and executes that subroutine.
GOTO Unconditionally jumps to the line specified by a label. - Command
H
HALT Stops the program and performs a reset. - Command
HALTALL Stops and resets all programs. - Command
HAND Defines the hand of a specified robot. 3 Command
I
IF Allows control flow to branch according to conditions. Command
9
-
INPUT Assigns a value to a variable specified from the programming box. 3 Command
Command /
INROFST Specifies/acquires R axis inertia offset for SCARA parameter. 3
Function
Acquires an integer for a specified value by truncating all
INT
decimal fractions.
3 Function
10
J
Converts joint coordinate data to Cartesian coordinate data
JTOXY 3 Function
of a specified robot. (↔XYTOJ)
L 11
Extracts a character string comprising a specified number
LEFT$ 3 Function
of digits from the left end of a specified character string.
Sets the hand system of a specified robot to the left-handed
LEFTY
system.
3 Command 12
LEN Acquires the length (byte count) of a specified character string. 3 Function
LET Executes a specified assignment statement. 3 Command
Outputs a specified value to the LO port to enable/disable Command /
LO
axis movement or acquires the LO status.
3
Function 13
Specifies/acquires point data for a specified axis or Command /
LOCx 3
shift/work data for a specified element. Function
LSHIFT Shifts a value to the left by the specified bit count. (↔RSHIFT) 3 Function
M
Acquires the return-to-origin or absolute-search machine
reference value for specified robot axes. (Valid only for axes
MCHREF 3 Function
whose return-to-origin method is set as "sensor" or "stroke-
end".)
Extracts a character string of a desired length from a
MID$ 3 Function
specified character string.
Outputs a specified value to the MO port or acquires the Command /
MO 3
MO status. Function
MOTOR Controls the motor power status. 3 Command
MOVE Performs absolute movement of all axes of a specified robot. 3 Command
MOVEI Performs relative movement of all axes of a specified robot. 3 Command
Performs relative movement of all axes of a specified robot
MOVET 3 Command
when the tool coordinate is selected.
MTRDUTY Acquires the motor load factor of the specified axis. 3 Function
O
OFFLINE Sets a specified communication port to the "offline" mode. 3 Command
This command allows the program to jump to the error
ON ERROR processing routine specified by the label without stopping
- Command
GOTO the program, or it stops the program and displays the error
message.
Jumps to a subroutine with labels specified by a GOSUB
ON to GOSUB statement in accordance with the conditions, and executes - Command
that subroutine.
ON to GOTO Jumps to label-specified lines in accordance with the conditions. - Command
ONLINE Sets the specified communication port to the "online" mode. 3 Command
OPEN Opens the specified General Ethernet Port. 3 Command
8 ORD
Acquires the character code of the first character in a
specified character string.
3 Function
P
PATH Specifies the PATH motion path. - Command
PATH END Ends the path setting for PATH motion. - Command
11 PATH SET Starts the path setting for PATH motion. - Command
PATH START Starts the PATH motion. - Command
PDEF Defines the pallet used to execute pallet movement commands. 3 Command
12
Acquires the task number in which a specified program is
PGMTSK 3 Function
registered.
Acquires the program number from a specified program
PGN 3 Function
name.
PMOVE Executes the pallet movement command of a specified robot. 3 Command
13 Pn Defines points within a program. 3 Command
Creates point data specified by a pallet definition number
PPNT 3 Function
and pallet position number.
PRINT Displays a character string at the programming box screen. - Command
Command /
PSHFRC Specifies/acquires the "Push force" parameter. 3
Function
Specifies/acquires the push judge speed threshold Command /
PSHJGSP 3
parameter. Function
Command /
PSHMTD Specifies/acquires the push method parameter. 3
Function
PSHRSLT Acquires the status at the end of the PUSH statement. 3 Function
Command /
PSHSPD Specifies/acquires the push speed parameter. 3
Function
Command /
PSHTIME Specifies/acquires the push time parameter. 3
Function
PUSH Executes a pushing operation in the axis unit. 3 Command
R
RADDEG Converts a specified value to degrees. (↔DEGRAD) 3 Function
REFTSK Acquires the status of the task. 3 Function
REM Expresses a comment statement. - Command
RESET Turns the bit of a specified output port OFF. 3 Command
RESTART Restarts another task during a temporary stop. 3 Command
RESUME Resumes program execution after error recovery processing. - Command
Returns the processing branching with GOSUB to the next
RETURN - Command
line of GOSUB.
Extracts a character string comprising a specified number
RIGHT$ 3 Function
of digits from the right end of a specified character string.
Sets the hand system of a specified robot to the right-
RIGHTY 3 Command
handed system.
RSHIFT Shifts a value to the right by the specified bit count. (↔LSHIFT) 3 Function
S 8
Command /
SCRINR Specifies/acquires R axis inertia for SCARA parameter. 3
Function
SELECT CASE
Allows control flow to branch according to conditions. - Command
to END SELECT
9
SEND Sends a file. 3 Command
Controls the servo ON/OFF of a specified axis or all axes of
SERVO 3 Command
a specified robot.
SET
SETGEP
Turns the bit at the specified output port ON.
Sets the General Ethernet Port.
-
3
Command
Command
10
Assigns the value to a specified integer type static variable / Command /
SGI 3
acquires the value of a specified integer type static variable. Function
11
Assigns the value to a specified real type static variable / Command /
SGR 3
acquires the value of a specified real type static variable. Function
SHARED Enables reference with a sub-procedure without transferring a variable. - Command
Sets the shift coordinate for a specified robot by using the
SHIFT 3 Command
shift coordinate data specified by a shift variable.
SI Acquires a specified SI status. 3 Function 12
Acquires a specified serial input's double-word information
SID 3 Function
status.
SIN Acquires the sine value for a specified value. 3 Function
SIW Acquires a specified serial input's word information status. 3 Function 13
Sn Defines the shift coordinates within the program. 3 Command
Outputs a specified value to the SO port or acquires the SO Command /
SO 3
status. Function
Outputs a specified serial output's double-word information Command /
SOD 3
or acquires the output status. Function
Outputs a specified serial output's word information or Command /
SOW 3
acquires the output status. Function
SPEED Changes the program movement speed of a specified robot. 3 Command
SQR Acquires the square root of a specified value. 3 Function
Specifies the task number and priority ranking of a specified
START 3 Command
program, and starts that program.
STR$ Converts a specified value to a character string (↔VAL). 3 Function
SUB to END SUB Defines a sub-procedure. - Command
SUSPEND Temporarily stops another task which is being executed. - Command
Switches the program being executed, then begins
SWI - Command
execution from the first line.
T
TAN Acquires the tangent value for a specified value. 3 Function
Outputs count-up values at 1ms intervals starting from the
TCOUNTER 3 Function
point when the TCOUNTER variable is reset.
TIME$ Acquires the current time as an "hh:mm:ss" format character string. 3 Function
TIMER Acquires the current time in seconds, counting from midnight. 3 Function
Outputs a specified value to the TO port or acquires the TO Command /
TO 3
status. Function
Specifies/acquires the tolerance parameter of a specified Command /
TOLE 3
robot. Function
Specifies/acquires the maximum torque command value Command /
TORQUE 3
which can be set for a specified axis of a specified robot. Function
Acquires the program number which is registered in a
TSKPGM 3 Function
specified task.
8 V
Converts the numeric value of a specified character string
VAL 3 Function
to an actual numeric value. (↔STR$)
W
9 WAIT
Waits until the conditions of the DI/DO conditional
- Command
expression are met (with time-out).
WAIT ARM Waits until the axis operation of a specified robot is completed. - Command
Specifies/acquires the tip weight (kg) parameter Command /
10
WEIGHT 3
of a specified robot. Function
Specifies/acquires the tip weight (g) parameter Command /
WEIGHTG 3
of a specified robot. Function
WEND Terminates the command block of the WHILE statement. - Command
11 WHERE
Reads out the current position of the arm of a specified
robot in joint coordinates (pulse).
3 Function
Format
ABS (expression)
A
Explanation Returns a value specified by an <expression> as an absolute value.
B
Sample Description
A=ABS(-362.54)………… The absolute value of -362.54 (=362.54) is assigned to variable A. C
Format
A
Value Range
C
Explanation Acquires the machine reference value (units: %) of axes.
This function is valid only for axes whose return-to-origin method is set as "Mark", not for "Sensor" or
D "Stroke-end".
At axes where return-to-origin method is set to "mark" method, absolute reset is possible when the machine reference
F value is in a 44 to 56% range.
G
Sample Description
A=ABSRPOS(4) ……………
The machine reference value for axis 4 of robot 1 is assigned to
H variable A.
Format
Value Range
B
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Axis Number 1 to 6
Expression 1 to 100 (units: %) C
G
Functions
Format H
ACCEL [robot number] (axis number)
I
Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.) J
Axis Number 1 to 6
K
Explanation Acquires the acceleration coefficient parameter value of axis.
L
Sample Description
A=50
M
ACCEL A ………
The acceleration coefficient of all axes of robot 1 becomes
ACCEL(3)=100 50%.
………Only axis 3 of robot 1 becomes 100%.
’CYCLE WITH INCREASING ACCELERATION
FOR A=10 TO 100 STEP 10 ………
The acceleration coefficient parameter is increased from 10%
to 100% in 10% increments.
ACCEL A
MOVE P,P0
MOVE P,P1
NEXT A
A=ACCEL(3) ………
The acceleration coefficient parameter of axis 3 of robot 1
HALT "END TEST" is assigned to variable A.
Format
Value Range
D
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Axis Number 1 to 6
E Expression 0 to 99999999 (Unit: pulse)
F Explanation ARCHP1 corresponds to the arch distance 1 parameter; ARCHP2 corresponds to the arch distance 2
parameter, respectively.
G Changes the parameter’s arch distance to the value indicated in the <expression>.
[Format 1] changes all axes of specified robot.
[Format 2] changes the only axis specified by <axis number> to the value indicated in the <expression>.
H
J Functions
Format
K
ARCHP1 [robot number] (axis number)
L Format
Explanation ARCHP1 corresponds to the arch distance 1 parameter; ARCHP2 corresponds to the arch distance 2
parameter, respectively.
Acquires the arch distance parameter value of the axis specified at <axis number>.
Format
A
Value Range
C Explanation This function acquires the current arm status of the SCARA robot.
The robot to acquire an arm status is specified by the <robot number>.
The arm status is "1" for a right-handed system and "2" for a left-handed system.
D This function is enabled only when a SCARA robot is used.
E
Sample Description
F A=ARMCND
IF A=1 THEN
………
The current arm status of robot 1 is assigned to variable A.
………
Right-handed system status.
MOVE P, P100, Z=0
G ELSE
MOVE P, P200, Z=0
………
Left-handed system status.
ENDIF
Format
A
Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
B
Expression 1: right hand system, 2: left hand system
C
Explanation This function sets the current hand system selection of the SCARA robot. A robot to set a hand system is
specified by the <robot number>.
This function is enabled only when a SCARA robot is used.
D
Sample Description E
ARMSEL[2] 2 ………
Sets the left-handed system for the hand system selection of
the robot 2.
F
H
Functions
Format I
ARMSEL [robot number]
J
Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
K
L
Explanation This function acquires the hand system currently selected for the SCARA robot. The robot to acquire a
hand system is specified by the <robot number>.
The arm type is "1" for a right-handed system, and "2" for a left-handed system. This function is enabled M
only when a SCARA robot is used.
Sample Description
A=ARMSEL ………
The current hand system selection of robot 1 is assigned to the
variable A.
IF A=1 THEN ………
The hand system selection is a right-handed system.
MOVE P,P100,Z=0
ELSE ………
The hand system selection is a left-handed system.
MOVE P,P200,Z=0
ENDIF
Format
A
Value Range
C
Explanation This function sets the hand system at program reset of the SCARA robot.
A robot to set a hand system selection is specified by the <robot number>.
D This function is enabled only when a SCARA robot is used.
E Sample Description
ARMTYP[2] 2 ………
Sets the left-handed system for the hand system of the robot 2.
H Functions
Format
I
ARMTYP [robot number]
J
Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
K
L Explanation This function provides the hand system at program reset of the SCARA robot.
The robot to acquire a hand system is specified by the <robot number>.
The arm type is "1" for a right-handed system, and "2" for a left-handed system. This function is enabled
M only when a SCARA robot is used.
Sample Description
A=ARMTYP ………
The arm type value of robot 1 is assigned to the variable A.
IF A=1 THEN ………
The arm type is a right-handed system.
MOVE P,P100,Z=0
ELSE ………
The arm type is a left-handed system.
MOVE P,P200,Z=0
ENDIF
HALTALL ………Program reset
Format
Value Range A
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Expression 1 to 100 (units: %)
B
Explanation Changes the automatic movement speed to the <expression> value.
This speed change applies to all axes. C
The operation speed is determined by the product of the automatic movement speed (specified by
programming box operation and by the ASPEED command), and the program movement speed (specified
D
by SPEED command, etc.).
Operation speed = automatic movement speed x program movement speed. E
Example:
Automatic movement speed: 80%
Program movement speed: 50% F
Movement speed = 40% (80% × 50%)
G
n NOTE
This command only defines the maximum speed, and does not guarantee the movement at the specified speed.
• Automatic movement speed: Specified by programming box operation or by the ASPEED command.
• Program movement speed: Specified by SPEED commands or MOVE, DRIVE speed settings. H
I
Functions
Format
J
ASPEED [robot number]
Value Range
K
Robot Number 1 to 4 (If not input, robot 1 is specified.)
L
Explanation Acquires the automatic movement speed value of robot.
M
Sample Description
SPEED 70
ASPEED 100
MOVE P,P0 ………
Movement from the current position to P0 occurs
at 70% speed (= 100 * 70) of the robot 1.
ASPEED 50
MOVE P,P1 ………
Movement from the current position to P1 occurs
at 35% speed (= 50 * 70) of the robot 1.
MOVE P,P2,S=10 ………
Movement from the current position to P2 occurs
at 5% speed (= 50 * 10) of the robot 1.
HALT
Format
ATN (expression)
A Format
E Sample Description
A(0)=A*ATN(Y/X) ………
The product of the expression (Y / X) arctangent value and
variable A is assigned to array A (0).
F A(0)=ATN(0.5) ………
The 0.5 arctangent value is assigned to array A (0).
A(0)=ATN2(B,C)-D ………
The difference between the X-Y coordinates (B,C) arctangent
value and variable D is assigned to array A (0).
G A(1)=RADDEG(ATN2(B,C)) ………
The X-Y coordinates (B,C) arctangent value is converted to
degrees, and is then assigned to array A (1).
H
Related commands COS, DEGRAD, RADDEG, SIN, TAN
I
Format
A
Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.) B
Axis Number 1 to 6
Expression Varies according to the specified robot.
C
Explanation Changes the axis tip weight parameter for the specified axis to the <expression> value.
This statement is valid in systems with "MULTI" axes and auxiliary axes (the robot type and auxiliary
D
axes are factory set prior to shipment).
E
F
Functions
Format
G
AXWGHT [robot number] (axis number)
H
Value Range
I
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Axis Number 1 to 6
J
Explanation Acquires the axis tip weight parameter value for the specified axis.
This statement is valid in systems with "MULTI" axes and auxiliary axes.
K
L
Sample Description
A=5
B=0
M
C=AXWGHT(1) ………
A xis tip weight value of the axis 1 of the robot 1 is acquired
(the current value is saved to variable C).
AXWGHT(1)=A
DRIVE(1,P0)
AXWGHT(1)=B
DRIVE(1,P1)
AXWGHT(1)=C ………
The axis tip weight value of the axis 1 of the robot 1 is set again.
HALT
Format
A
Explanation This statement calls up sub-procedures defined by the SUB to END SUB statements.
The <label> specifies the same name as that defined by the SUB statement.
B
1. When a constant or expression is specified as an actual argument, its value is passed on to the sub-
procedure.
C 2. When a variable or array element is specified as an actual argument, its value is passed on to the sub-
procedure. It will be passed on as a reference if "REF" is added at the head of the actual argument.
3. When an entire array (array name followed by parentheses) is specified as an actual argument, it is
D passed along as a reference.
E n NOTE
• When a value is passed on to a sub-procedure, the original value of the actual argument will not be changed
even if it is changed in the sub-procedure.
• When a reference is passed on to a sub-procedure, the original value of the actual argument will also be
F changed if it is changed in the sub-procedure.
• For details , refer to Chapter 3 "8 Value Pass-Along & Reference Pass-Along".
G
• CALL statements can be used up to 120 times in succession. Note that this number is reduced if commands which
H use stacks such as an FOR or GOSUB statement are used, or depending on the use status of identifiers.
• Always use the END SUB or EXT SUB statement to end a sub-procedure which has been called with the CALL
I statement. If another statement such as GOTO is used to jump out of the sub- routine, a "5.212: Stack overflow"
error, etc., may occur.
J
Sample 1 Sample 2
K X%=4
Y%=5
I = 1
CALL *TEST( I )
CALL *COMPARE ( REF X%, REF Y% ) HALT
L HALT
’SUB ROUTINE: COMPARE
’SUB ROUTINE: TEST
SUB *TEST
SUB *COMPARE ( A%, B% ) X = X + 1
M IF A% < B% THEN
TEMP%=A%
IF X < 15 THEN
CALL *TEST( X )
A%=B% ENDIF
B%=TEMP% END SUB
ENDIF
END SUB
Reference For description of sample program, refer to "132 SUB to END SUB" in this Chapter.
Format
Before switching the hand data, the hands must be defined at the HAND statement, the programming E
box, or the support software.
If the hand data with another robot setting is specified, "6.258: Illegal robot no" error occurs.
F
Reference "HAND"
G
Sample Description
HAND H1= 0 150.000 0.000
H
HAND H2= -5000 20.0000 0.000
P1=150.000 300.000 0.000 0.000 0.000 0.000
I
CHANGE H2 ………
Changes the hand data of the robot 1 to hand 2.
MOVE P,P1 ………
Moves the hand 2 tip of the robot 1 to P1 (1).
CHANGE H1 ………
Changes to hand 1. J
MOVE P,P1 ………
Moves the hand 1 tip to P1 (2).
HALT
K
Format
CHGPRI Tn ,p
<program name>
A
PGm
B
Notation Value Range
C m Program Number 0 to 100
n Task Number 1 to 16
G
Sample Description
MOVE P,P0,P1
I IF DI(20) = 1 THEN
CHGPRI T2,32
………
When DI (20)
………The priority
is
of
ON,
Task 2 is No. 32
ELSE ………
When DI (20) is OFF,
J CHGPRI T2,33
ENDIF
………The priority of Task 2 is No. 33
GOTO *ST
K HALTALL
………Program name: SUB _ PGM (Sub task)
’SUBTASK ROUTINE ………From this line, Task 2
L *SUBTASK:
IF LOC3(WHERE) > 10000 THEN
DO(20) = 1
M GOTO *SUBTASK
ENDIF
DO(20) = 0
GOTO *SUBTASK ………Down to this line, Task 2 processing
EXIT TASK ………Ends Task 2 (own task: SUB _ PGM)
Format
Before switching the work data, always define the work data using the WRKDEF statement, E
the programming box, or the support software.
Reference "WRKDEF" F
Operation Manual "Work definitions"
G
Sample Description
H
CHANGE H1 ………
Changes the hand data of the robot 1 to hand 1.
MOVE P,P1 ………
Moves the hand 1 tip of the robot 1 to P1.
WRKDEF W1 = 115.000 -50.000 0.000 30.000 I
CHGWRK W1 ………
Changes the work data of the robot 1 to work 1.
MOVE P,P2 ………
Moves the work 1 tip of the robot 1 to P2.
HALT J
K
Related commands CREWRK, WRKDEF
L
Format
CHR$ expression
A
Value Range
B Expression 0 to 255
C Explanation Acquires a character with the specified character code. An error occurs if the <expression> value is
outside the 0 to 255 range.
D
Sample Description
E A$=CHR$(65) ………
"A" is assigned to A$.
F
Related commands ORD
G
Format
CLOSE GPm
A
Notation Value Range
m General Ethernet Port number 0 to 7 B
Explanation Closes the communication port of the specified General Ethernet Port. C
Sample Description
D
OPEN GP1 ………
Opens the General Ethernet Port 1.
SEND "123" TO GP1 ………
Sends the character strings "123" from the General Ethernet E
Port 1.
SEND GP1 TO A$ ………
Receives the data from the General Ethernet Port 1 and Saves
the received data in the variable A$. F
CLOSE GP1 ………
Closes the General Ethernet Port 1.
G
Related commands OPEN, SEND, SETGEP, GEPSTS
H
Format
F Functions
Format
G
CONTPLS [robot number] (axis number)
H Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
1 to 6 (If not input, all axes are specified.)
I Axis Number
Sample 3 Description
A% = CONTPLS(3) ……
Acquires the value of the CONTPLS parameter for 3rd
axis of robot 1,
Assigns it to integer variable A%
Format
Explanation Acquires the corrected target position of gripping position misalignment on XY coordinate plane.
D
=> F or the target position, XYR-axes of <Target position before correction> are corrected and acquired.
The axes position except XYR-axes remains the value of <Target position before correction>. E
•T
each <Master position of robot tip>, <Master position of workpiece> and <Target position before
correction> with gripping a workpiece beforehand.
• This command is available as online command. F
I
before correction
Master position
J
of workpiece
Position of workpiece
K
Master position
of robot tip
X X L
c CAUTION
• All of usable point data are "mm" unit.
M
• This command is available only for the robot containing each XYR-axis. If this command is used for other robots,
“2.354 Illegal coordinates for pos. correction" alarm will occur.
Sample Description
P1 = CORRECTXY[1](P2,P3,P4,P5)
…………
The corrected target position is acquired and assigned to P1.
Robot 1, Master position of robot tip P2, Master position of
workpiece P3, Position of workpiece P4, Target position before
correction P5.
Format
COS expression
A
Value Contents
D Sample Description
A(0)=B*COS(C) ………
The product of the C variable's cosine value and variable B is
E assigned to array A (0).
A(1)=COS(DEGRAD(20)) ………
The 20.0° cosine value is assigned to array A (1).
F
Related commands ATN, DEGRAD, RADDEG, SIN, TAN
G
Format
A
Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
B
Point of Difference point in Cartesian coordinate system
Standard Point point in Cartesian coordinate system (If not input, the current position is specified.)
C
Explanation The work data is made of the offset data; the differential value in the coordinates between the standard
point and one of difference.
D
The current position will be treated as the standard point when it is omitted.
An error occurs unless both the standard point and one of difference are Cartesian coordinate system. E
Reference "WRKDEF"
Operation Manual "Work definitions" F
G
If "pulse" is specified as the unit for the point of difference / standard, "6.205: Coordinate type error" may occur.
H
Sample Description
I
CHANGE H1 ………
Changes the hand data of the robot 1 to hand 1.
MOVE P,P1 ………
Moves the hand 1 tip of the robot 1 to P1.
WRKDEF W1= CREWRK (P3) ………
Defines work 1; the difference between the current position J
and P3 as the offset.
CHGWRK W1 ………
Changes the work data of the robot 1 to work 1.
MOVE P,P2 ………
Moves the work 1 tip of the robot 1 to P2. K
HALT
Format
A
Value Range
C
Explanation Acquires the percentage (-1000 to 1000 [%]) of the current torque value against the rated torque value
of axis.
D Plus/minus signs indicate the direction.
E Sample Description
A = CURTQST(3) ………
The ratio of the current torque (current) value against the rated
torque (current)value of the axis 3 of robot 1 is assigned to
F variable A.
Format
A
Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.) B
Axis Number 1 to 6
C
Explanation Acquires the percentage (-100 to 100 [%]) of the current torque value against the maximum torque
command value of axis .
Plus/minus signs indicate the direction.
D
Sample Description E
A = CURTRQ(3) ………
The ratio of the current torque (current) value against
the maximum torque (current)value of the axis 3 of robot 1 is
assigned to variable A. F
Format
CUT Tn
<program name>
A
PGm
B
Notation Value Range
C m Program Number 0 to 100
n Task number 1 to 16
D
Explanation Terminates another task which is currently being executed or which is temporarily stopped.
E A task can be specified by the name or the number of a program in execution.
This statement cannot terminate its own task.
G If a task (program) not active is specified for the execution, an error occurs.
H Sample Description
’TASK1 ROUTINE ………Task 1
I *ST:
MO(20) = 0
START <SUB _ PGM>,T2 ………
Registers SUB _ PGM program in Task No. 2
J MOVE P,P0 and starts it.
MOVE P,P1
WAIT MO(20) = 1
K CUT T2 ………
Forced termination of Task 2 in running.
GOTO *ST
HALTALL
L
’TASK2 ROUTINE ………
Task 2(Program name: SUB _ PGM)
*SUBTASK2:
M P100=JTOXY(WHERE)
IF LOC3(P100) >= 100.0 THEN
MO(20) = 1
ELSE
DELAY 100
ENDIF
GOTO *SUBTASK2
EXIT TASK ………
Ends Task 2 (own task: SUB _ PGM)
Format
DATE$
A
Explanation Acquires the date as a "yyyy/mm/dd" format character string.
"yyyy" indicates the year, "mm" indicates the month, and "dd" indicates the day.
B
Date setting is performed from an operation terminal such as a programming box.
Sample Description C
A$=DATE$ ………
Assigns the date into A as a string in yyyy / mm / dd format.
PRINT DATE$ ………Displays dates in yyyy / mm / dd format.
HALT
D
E
Related commands TIME$
F
Format
B Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Axis Number 1 to 6
C Expression 1 to 100 (units: %)
D Explanation Changes the deceleration ratio parameter of axis to the <expression> value.
In format 1, the change occurs at all axes of a specified robot.
E In format 2, the change occurs at the axis specified in <axis number>.
F
The acceleration parameter can be changed by using the ACCEL statement.
G
Functions
H Format
L Sample Description
A =50
DECEL A ………
Specifies 50 in the deceleration rate parameter for all axes of
M robot 1.
DECEL(3)=100 ………
Specifies 100 as the deceleration rate parameter for the axis 3 of
robot 1.
Format
A
Value Range / Meaning
name Function name. Max. of 16 characters including "FN". B
Dummy Argument Numeric or character string variable
C
Explanation Defines the functions which can be used by the user. Defined functions are called in the FN <name>
(variable) format.
D
E
• The <dummy argument> names are the same as the variable names used in the <function definition <expression>.
The names of these variables are valid only when the <function definition expression> is evaluated. There may be
other variables with the same name in the program.
F
• When calling a function that uses a <dummy argument>, specify the constant, variable, or expression type which
is the same as the <dummy argument> type. The <dummy argument> can be omitted. If <dummy arguments> are G
the same type, the difference of variable names does not affect.
• If a variable used in the <function definition expression> is not included in the <dummy argument> list, the current
value of that particular variable is used for the calculation. H
• A space must be entered between "DEF" and "FN". If no space is entered, DEFFN will be handled as a variable.
• The DEF FN statement cannot be used in sub-procedures.
• Definition by the DEF FN statement must be declared before statements which use functions.
I
J
Sample Description
DEF FNPAI=3.141592
K
DEF FNASIN(X)=ATN(X/SQR(-X^2+1))
. ………
Both the <dummy argument> and <function definition expression>
. use "X". L
.
A=FNASIN(B)*10 ………
"X" is not required for calling.
M
Format
DEGRAD (expression)
A
Value Contents
C
Explanation The <expression> value is converted to radians.
F Sample Description
A=COS(DEGRAD(30)) ………
A cosine value which is converted 30° to radians is
G assigned to variable A.
Format
DELAY expression
A
Value Range
Expression 0 to 3600000 (units: ms) B
Explanation A "program wait" status is established for the period of time specified by the <expression>. C
The minimum wait period is 1ms.
D
Sample Description
DELAY 3500 ………
Waits 3,500 ms (3.5 seconds). E
A-50
DELAY A*10 ………
Waits 500 ms (0,5 seconds). F
Format
B
Notation Value Range / Meaning
C m Port Number 0 to 7, 10 to 17, 20 to 27
0 to 7 (If omitted, all 8 bits are processed.)
D b bit Definition If multiple bits are specified, they are expressed from the left in descending order
(high to low).
F
Explanation Indicates the parallel input signal status.
H Sample Description
A%=DI2() ………
The input status from DI (27) to DI (20) is assigned to variable A%.
I A%=DI5(7,4,0) ………
The DI (57), DI (54), DI (50) input status is assigned to variable A%
(when all the above signals are "1" (ON), A% = 7).
J
A%=DI(37,25,20) ………
The DI (37), DI (25), DI (20) input status is assigned to variable A%
(when all the above signals except DI (20) are "1" (ON), A% = 6).
K
A%=END _ SENSOR ………
The IO Name "END _ SENSOR" input status is assigned to variable A%
(when the "END _ SENSOR" is "1" (ON), A% = 1).
L
Reference Chapter 3 "9.3 Parallel input variable"
M
Format
Format A
name % (constant , constant, constant)
! B
$
C
E
Explanation Declares the name and length (number of elements) of an array variable. A maximum of 3 dimensions
may be used for the array subscripts. Multiple arrays can be declared in a single line by using comma
( , ) breakpoints to separate the arrays. F
G
• The total number of array elements is <constant> + 1.
• A "9.300: Memory full" error may occur depending on the size of each dimension defined in an array.
H
I
Sample Description
DIM A%(10) ………
Defines a integer array variable A% (0) to A% (10). (Number J
of elements: 11).
DIM B(2,3,4) ………
Defines a real array variable B (0, 0, 0) to B (2, 3, 4).
(Number of elements: 60). K
DIM C%(2,2),D!(10) ………
Defines an integer array C% (0,0) to C% (2,2) and a real
array D! (0) to D! (10).
L
Format
A
Value Meaning
C
Explanation Acquires the distance (units: mm) between the 2 points (X,Y,Z) specified by <point expression 1> and
<point expression 2>. An error occurs if the 2 points specified by each <point expression> do not have
D Cartesian coordinates.
E
Sample Description
F A=DIST(P0,P1) ………
The distance between P0 and P1 is assigned to variable A.
Format
1. LET DOm(b,...,b) = expression
2. LET DO(mb,...,mb) = expression
3. LET IO Name = expression
A
B
Notation Value Range / Meaning
m Port Number 0 to 7, 10 to 17, 20 to 27
0 to 7 (If omitted, all 8 bits are processed.)
C
b Bit Definition (*1) If multiple bits are specified, they are expressed from the left in descending order
(high to low).
D
Integer value (If real number is specified, rounds to an integer.)
Bits beyond the number of bit whom an assignment destination is required are
Expression ignored. (If the port number is specified, the lower 8 bits are valid. if the number E
of bit specified on bit definition is 1 to 8, the lower 1 to 8 bit corresponding to the
bits specified on the left side are valid.)
F
Users can name specific bits of DI and DO as they desire.
IO Name Note that it can be added and edited on the support software only
(not with a programming box)
G
J
c CAUTION
Outputs to DO0() and DO1() are not possible. These ports are for reference only.
K
Sample Description
DO2() = &B10111000 ………DO (27, 25, 24, 23) are turned ON, and DO (26, 22, 21, 20) are L
turned OFF.
DO2(6,5,1) = &B010 ………DO (25) are turned ON, and DO (26, 21) are turned OFF.
DO3() = 15 ………
DO (33, 32, 31, 30) are turned ON, and DO (37, 36, 35, 34) are M
turned OFF.
DO(37,35,27,20) = A ………
The contents of the 4 lower bits acquired when variable A
is converted to an integer are output to DO (37, 35, 27, 20)
respectively.
CHUCK = 1 ………
IO name "CHUCK" is turned ON ("1" is output).
Format
LET expression = DOm (b,...,b)
LET expression = DO (mb,...,mb)
A
LET expression = IO Name
B
Notation Value Range / Meaning
m Port Number 0 to 7, 10 to 17, 20 to 27
C 0 to 7 (If omitted, all 8 bits are processed.)
b bit Definition If multiple bits are specified, they are expressed from the left in descending
order (high to low).
D
Integer value (If real number is specified, rounds to an integer.)
Bits beyond the number of bit whom an assignment destination is required
E Expression are ignored. (If the port number is specified, the lower 8 bits are valid. if
the number of bit specified on bit definition is 1 to 8, the lower 1 to 8 bit
corresponding to the bits specified on the left side are valid.)
I Sample Description
A% = DO2() ………
Output status of DO(27) to DO(20) is assigned to variable A%.
J A% = DO0(6, 5, 1) ………
Output status of DO(06), DO(05) and DO(01) is assigned to
variable A%.(If all above signals are 1(ON), then A%=7.)
K A% = DO(37,35,27,10)………
Output status of D0(37), DO(35) , DO(27) and D0(10) is assigned
to variable A%.
(If all above signals except D0(27) are 1 (ON), then A%=13.)
L
A% = CHUCK ………
Output status of IO name "CHUCK" is assigned to variable A%.
(When "CHUCK" is ON, then A% =1.)
M
Format
D Signal output (DO, etc.) Signal is output when axis enters within OUT position range.
DELAY DELAY command is executed and standby starts, when axis enters the OUT position range.
Program stops and is reset when axis enters the OUT position range. Therefore, axis movement
HALT
E also stops.
All programs in execution stop when axis enters the OUT position range, task 1 is reset, and other
HALTALL
tasks terminate. Therefore, the movement also stops.
F HOLD
Program temporarily stops when axis enters the OUT position range. Therefore, axis movement
also stops.
All programs in execution temporarily stop when axis enters the OUT position range. Therefore,
HOLDALL
G the movement also stops.
WAIT WAIT command is executed when axis enters the OUT position range.
H
The WAIT ARM statement is used to execute the next command after the axis enters the tolerance range.
I DRIVE command
J DRIVE(1,P1)
Target position
DRIVE(1,P1)
DO(20)=1 WAIT ARM
DO(20)=1
K
P1
Tolerance
L DO(20) turns ON
OUT position
DO(20) turns ON
M
DRIVE(1,P1) DRIVE(1,P1)
Target position
HOLD WAIT ARM
HOLD
Tolerance
OUT position
HOLD execution HOLD execution
(program temporarily stops) (program temporarily stops)
Sample Description
DRIVE(1,P0) ………
A xis 1 of robot 1 moves from its current position to the
position specified by P0.
Sample Description C
DRIVE(1,10000) ………
A xis 1 of robot 1 moves from its current position to the
10000 pulses position. D
DRIVE[2](2,90.00) ………
A xis 2 of robot 2 moves from its current position to
a position which is 90° in the plus-direction from the
0-pulse position. E
F
● Point definition
Point data is specified in <expressions>. The axis data specified by the <axis number> is used. If the point
G
expression is in "mm/degrees" units, movement for each axis occurs from the 0-pulse position to the pulse-
converted position. However, when using the optional XY setting, movement occurs from the Cartesian
coordinate origin position. H
n NOTE
If point data is specified with both integers and real numbers in the same statement, all values are handled
I
in "mm/degrees" units.
J
Sample Description
DRIVE(1,P1) ………
A xis 1 of robot 1 moves from its current position to the K
position specified by P1.
DRIVE(4,P90) ………
A xis 4 of robot 1 moves from its current position to the
position specified by P90 (deg.) relative to the 0 pulse position. L
(When axis 4 is a rotating axis.)
C ● XY setting
Format
D XY
G 2. This command can be specified at SCARA robots and Cartesian robots with X and Y- axes.
3. Point settings must be in "mm" or "deg." units (real number setting).
H Sample Description
DRIVE(1,P100),(2,P100),(4,P100),XY
I ………
The axis 1, 2 and 4 of robot 1 move from their current positions to
the Cartesian coordinates position specified by P100.
Format
When DRIVEI motion to the original target position is interrupted and then restarted, the target position
H
for the resumed movement can be selected as the "MOVEI/DRIVEI start position" in the controller's parameters.
Reference user's/ operator's manual.) I
1) KEEP (default)...Continues the previous (before interruption) movement. The original target position remains
unchanged.
2) RESET...Relative movement begins anew from the current position. The target position before interruption is reset. J
H
DRIVEI command
WAIT ARM statement
I
DRIVEI(1,P1) DRIVEI(1,P1)
Target position
DO(20)=1 WAIT ARM
J
DO(20)=1
P1
K Tolerance
OUT position
DO(20) turns ON DO(20) turns ON
L
DRIVEI(1,P1) DRIVEI(1,P1)
Target position
M HOLD WAIT ARM
HOLD
Tolerance
OUT position
HOLD execution HOLD execution
(program temporarily stops) (program temporarily stops)
B
Sample Description
C
DRIVEI(1,10000) ………
From its current position, the axis 1 of robot 1 moves a
distance of "+10000 pulses".
DRIVEI(4,90.00) ………
From its current position, the axis 4 of robot 1 moves
D
+90°(when axis 4 is a rotating axis).
● Point definition F
Point data is specified in <expression>. The axis data specified by the <axis number> is used.
From its current position, the axis moves the distance specified by the point in a relative manner.
G
If the point expression is in "mm/ degrees" units, movement for each axis occurs from the 0-pulse position to the
pulse-converted position.
H
n NOTE
If point data is specified with both integers and real numbers in the same statement, all values are handled in
"mm/degrees" units.
I
Sample Description J
DRIVEI(1,P1) ………
The axis 1 of robot 1 moves from its current position the
distance specified by P1. K
DRIVEI(4,P90) ………
The axis 4 of robot 1 moves from its current position the number
of degrees specified by P90 (when axis 4 is a rotating axis).
L
● Speed setting
Format
A 1. SPEED = expression
2. S = expression
B
Value Range
Expression 1 to 100 (units: %)
C
Explanation The program's movement speed is specified as an <expression>.
D The actual speed is determined as shown below.
• Robot's max. speed (mm/sec., or deg./sec.) × automatic movement speed (%) × value of expression (%)
E This option is enabled only for the specified DRIVE statement.
F
n NOTE
This defines the maximum speed, and does not guarantee that all movement will occur at specified speed.
Sample Description
G DRIVEI(1,10000),S=10 ………
The axis 1 of robot 1 moves from its current position to
the +10000 pulses position at 10% of the program movement
speed.
H
J Format
1. DSPEED = expression
K 2. DS = expression
Value Range
L Expression 0.01 to 100.00 (units: %)
n NOTE
SPEED option and DSPEED option cannot be used together.
Sample Description
DRIVEI(1,10000),DS=0.1 ………
The axis 1 of robot 1 moves from its current position
to the +10000 pulses position at 0.1% of the maximum
speed.
Explanation Stops movement when the conditions specified by the <conditional expression> are met. A
Because this is a deceleration type stop, there will be some movement (during deceleration) after the
conditions are satisfied.
B
• the <conditional expression> is specified with input/output signals or the variable.
• If the conditions are not satisfied, a robot moves to the target position.
• If the conditions are already satisfied before movement begins, C
the command is terminated without any movement.
• This option is enabled only by program execution.
D
Sample Description
DRIVEI(1,10000),STOPON DI(20)=1 E
………
A xis 1 of robot 1 moves from its current position toward the "+10000
pulses" position and stops at an intermediate point if the "DI (20) =
1" condition become satisfied. The next step is then executed. F
When the conditional expression used to designate the STOPON condition is a numeric expression, expression value
H
other than "0" indicates a TRUE status, and "0" indicates a FALSE status.
I
Format
SELECT CASE expression
G Sample Description
WHILE 1
SELECT CASE DI3(7,6,5,4,3,2,1,0) ………
Executes each command block according to
H CASE &B00000001 the input status of DI3(8 bits)
MOVE P,P1 ………Command block when DI3(0) is ON
CASE &B00000010 ………When DI3(1) is ON
I MOVE P,P2
CASE &B00000011 ………When DI3(0) and DI3(1) is ON
MOVE P,P3
J CASE ELSE ………Case other than the above
MOVE P,P0
END SELECT ………Ends SELECT CASE statement
K WEND
L
Related commands SELECT CASE
Format
SUB label (dummy argument, dummy argument…)
command block
END SUB
A
B
Explanation Ends the sub-procedure definition which begins at the SUB statement.
For details, refer to section "SUB to END SUB".
C
Sample Description
I=1
D
CALL *TEST ………
Calls sub-procedure *TEST
PRINT I
HALT
E
’SUB ROUTINE: TEST (Comment: Subprocedure name is "TEST")
SUB *TEST ………Defines sub-procedure * TEST
I=50
F
END SUB ………Finishes defining sub procedures
G
Related commands CALL, EXIT SUB, SUB to END SUB
Format
ERR(task number)
ERL(task number)
A
B Value Range
Task Number 1 to 16 (If not input, the task being executed is specified.)
C
Explanation Variables ERR and ERL are used in error processing routines specified by the ON ERROR GOTO
statement.
D ERR gives the error code of the error that has occurred and ERL gives the line number on which the error
has occurred.
E
Sample Description
F
IF ERR(1) <> &H000600CC THEN HALT ………
If "Point doesn't exist" error has occured,
This sample stops and resets the program.
G IF ERL =20 THEN RESUME NEXT ………
If the line on which an error has occurred is 20,
the program jumps to the next line of the error
occurring line and continues the execution.
H
Format
ETHSTS
A
Explanation Acquires the Ethernet port status.
The values below are acquired depending on the status.
B
-2 Ethernet port is not opened yet.
-1 LAN cable is not connected.
C
0 The connection is not established.
1 The connection is established.
2 The connection is established / the data is stored in the reception buffer. D
E
Sample Description
A=ETHSTS ………Assigns the Ethernet port status to the variable A.
F
Format
EXIT FOR
A
Explanation Terminates the FOR to NEXT statement loop, then jumps to the command which follows the NEXT
statement.
B
This statement is valid only between the FOR to NEXT statements.
D The FOR to NEXT statement loop will end when the FOR statement condition is satisfied or when the EXIT FOR
statement is executed. A "5.212: Stack overflow" error, etc., will occur if another statement such as GOTO is used to
jump out of the loop.
E
F Sample Description
*ST:
G WAIT DI(20)=1
FOR A%=101 TO 109
MOVE P,P100,Z=0
H DO(20)=1
MOVE P,P[A%],Z=0
DO(20)=0
I IF DI(20)=0 THEN EXIT FOR ………
If DI(20) = 0 (false), exits between FOR and NEXT.
NEXT A%
GOTO *ST
J HALT
Format
EXIT SUB
A
Explanation The EXIT SUB statement terminates the sub-procedure defined by the SUB to END SUB statements, then
jumps to the next command in the CALL statement that called up the sub-procedure.
B
This statement is valid only within the sub-procedure defined by the SUB to END SUB statements.
o end the sub-procedure defined by the SUB to END SUB statements, use the END SUB statement or EXIT SUB
T
D
statement. A "5.212: Stack overflow" error, etc., will occur if another statement such as GOTO is used to jump out of
the loop.
E
Sample Description F
’MAIN ROUTINE
CALL *SORT2(REF X%,REF Y%) ………
Calls sub-procedure *SORT2 G
HALT
Format
EXIT TASK
A
Explanation Terminates its own task which is currently being executed.
B
Sample Description
C ’TASK1 ROUTINE
*ST:
MO(20)=0
D START <SUB _ PGM>,T2 ………
Registers SUB _ PGM program in Task No. 2 and
MOVE P,P0,P1 starts it.
WAIT MO(20)=1
E GOTO *ST
HALTALL
J
Related commands CUT, RESTART, START, SUSPEND, CHGPRI
Format
FOR control variable = start value TO end value STEP step
command block
NEXT control variable
A
B
Explanation These statements repeatedly execute commands between the FOR to NEXT statements for the <start
value> to <end value> number of times, while changing the <control variable> value in steps specified
by <STEP>. C
• If <STEP> is omitted, its value becomes "1".
• The <STEP> value may be either positive or negative.
• The <control variable> must be a numeric <simple variable> or <array variable>.
D
• The FOR and NEXT statements are always used as a set.
E
Sample
'CYCLE WITH CYCLE NUMBER OUTPUT TO DISPLAY
FOR A=1 TO 10
F
MOVE P,P0
MOVE P,P1
MOVE P,P2
G
PRINT"CYCLE NUMBER=";A
NEXT A
HALT
H
While FOR to NEXT is processed, leaving the loop is disabled by GOTO and so on.
In order to leave FOR to NEXT, use EXIT FOR.
Format
A
Value Range
C
Explanation Acquires the General Ethernet Port status.
The values below are acquired depending on the status.
D
-2 Specified General Ethernet Port is not opened yet.
E -1 LAN cable is not connected.
0 The connection is not established. (Only server)
1 The connection is established.
F
2 The connection is established / the data is stored in the reception buffer.
G
Sample Description
H OPEN GP1 ………
Opens the port which is specified at the General
Ethernet port 1.
K ENDIF
variable RET$.
ENDIF
L CLOSE GP1
HALT
………
Closes the port which is specified at the General
Ethernet port 1.
C
Explanation Jumps to the <label> subroutine specified by the GOSUB statement.
A RETURN statement within the subroutine causes a jump to the next line of the GOSUB statement.
D
• The GOSUB statement can be used up to 120 times in succession. Note that this number of times is reduced if
commands containing a stack such as an FOR statement or CALL statement are used.
F
• When a jump to a subroutine was made with the GOSUB statement, always use the RETURN statement to end
the subroutine. If another statement such as GOTO is used to jump out of the subroutine, an error such as "5.212: G
Stack overflow" may occur.
Sample Description
I
*MAIN:
MOVE P,P1,A3=0.00
GOSUB *SUB _ DO ………
Jumps to the label “* SUB _ DO” J
MOVE P,P2,A3=0.00 ………
Executes from this line after the subroutine *SUB _ DO
HALT has reached RETURN
K
*SUB _ DO: ………
Defines *SUB _ DO as a subroutine label
DO(20)=1
DELAY 500 L
DO(20)=0
RETURN ………
Executes from the next line of the GOSUB statement
M
Format
A
Explanation Executes an unconditional jump to the line specified by the <label>.
B
"Label" is the name which is put on a programming line.
C For specifying the programming line, it is necessary to create a label on the line and specify it.
E
Sample Description
F *TOP: ………
Defines *TOP as a label
MOVE P,P1
DELAY 1000
G MOVE P,P2
DELAY 1000 ………
Jumps to the label *TOP
GOTO *TOP
H
Format
expression
HALT
character string
A
Explanation Stops the program and resets it. If restarted after a HALT, the program runs from its beginning.
B
If an <expression> or a <character string> is written, the operation result of <expression> or the contents
of <character string> are displayed on the programming box screen, respectively.
C
• Variables are not reset by execution of HALT statement. HALTALL is available to reset variables.
D
• HALT is effective only in the executed task. The programs executed in other tasks continue execution.
E
Sample Description
’MAIN ROUTINE
*ST:
F
MOVE P,P0,P1
IF DI(20) = 1 THEN
GOTO *FIN
………
If DI(20) is ON
………
Jumps to the label *FIN
G
ENDIF
GOTO *ST
*FIN: ………
Defines *FIN as a label
H
HALT "PROGRAM FIN" ………
Stops and resets the program (displayed as “PROGRAM FIN”)
In PTP movement specified by movement commands such as MOVE and DRIVE, the next line's command is executed
I
when the axis enters the OUT position range.
Therefore, if a HALT command exists immediately after a PTP movement command, that HALT command is executed J
before the axis arrives in the target position tolerance range.
Likewise, when specifying CONT options in interpolation movement during MOVE (L or C) command, the next
command is executed immediately after movement starts. Therefore, if a HALT command exists immediately after the
K
interpolation movement command during MOVE (L or C) command with CONT options, a HALT command is executed
immediately after starting movement. L
In either of the above cases, use the WAIT ARM command as shown below if desiring to execute the HALT command
after the axis arrives within the target position tolerance range.
M
HALT command
DRIVE(1,P1) DRIVE(1,P1)
Target position
HALT WAIT ARM
HALT
Tolerance
OUT position
HALT execution HALT execution
33821-R7-00
Format
expression
HALTALL
character string
A
Explanation Stops and resets all programs. Dynamic variables, array variables, output variables are also rest.
Output variables (DO/SO/MO/LO/TO/SOW) are reset under the condition as shown below.
B
• IO parameter "DO output at Program reset" is "IO_RESET".
• Sequence program is in execution and the sequence program execution flag is enabled.
C
If a program is restarted after a HALTALL, the program runs from its beginning of the main program or of
the last program executed at task 1.
D If an <expression> or a <character string> is written, the calculation result of <expression> or the
contents of <character string> are displayed on the programming box screen, respectively (if variable is
E written in an <expression>, the previous value before clearing is displayed).
F
• HALTALL stops all the programs which is run in multi tasking.
After the reset, the main program or a current program is registered automatically at the task No.1 and the other
G tasks are cleared.
• Executing HALTALL resets all of general-purpose outputs and variables.
Note that the reset of general-purpose output won't be executed if "DO output at program reset ‹RESCDO›" within
H I/O parameters is set to "1: IO_HOLD".
I
Sample Description
MOVE P,P1
J DELAY 1000
HALTALL ………
Reset is executed after the program.
K In PTP movement specified by movement commands such as MOVE and DRIVE, the next line's command is executed
when the axis enters the OUT position range.
L Therefore, if a HALTALL command exists immediately after a PTP movement command, that HALTALL command is
executed before the axis arrives in the target position tolerance range.
Likewise, when specifying CONT options in interpolation movement during MOVE (L or C) command, the next
M command is executed immediately after movement starts. Therefore, if a HALTALL command exists immediately after
the interpolation movement command during MOVE (L or C) command with CONT options, a HALTALL command is
executed immediately after starting movement.
In either of the above cases, use the WAIT ARM command as shown below if desiring to execute the HALTALL
command after the axis arrives within the target position tolerance range.
DRIVE(1,P1) DRIVE(1,P1)
Target position
HALTALL WAIT ARM
HALTALL
Tolerance
OUT position
HALTALL execution HALTALL execution
Format
Definition statement:
HAND[robot number] Hn = 1st parameter 2nd parameter 3rd parameter R
A
Selection statement:
CHANGE[robot number] Hn B
C
Notation Value Range
Robot Number 1 to 4
D
n Hand Number 0 to 31
R Attaching Hand to R-axis
E
Explanation The HAND statement only defines the hand.
To actually change the hands data, use the CHANGE statement. F
For CHANGE statement details, refer to section "CHANGE".
If "R" is specified, the hand that are offset from the R-axis rotating center are selected.
G
H
• If a power OFF occurs during execution of the hand definition statement, the "9.707 Hand data destroyed" error
may occur. I
• If specifying the hand data that was defined by specifying other robots in the CHANGE statement,
"6.258: Illegal robot no" error may occur.
J
20.00mm
D
lses
0 pu
-500
E m
m
00
0.
15
F
m
ar
d
2n
rd
da
G
an
St
33803-R9-00
H Sample Description
HAND H1= 0 150.000 0.0000
I HAND H2= -5000 20.000 0.000
P1= 150.000 300.000 0.000 0.000 0.000 0.000
CHANGE H2 ………
Changes the hand data of robot 1 to hand 2.
J MOVE P,P1 ………
Tip of hand 2 of robot 1 moves to P1.(1)
CHANGE H1 ………
Changes the hand data of robot 1 to hand 1.
MOVE P,P1 ………
Tip of hand 1 of robot 1 moves to P1.(2)
K HALT
L SAMPLE:HAND
(1) Y (2) Y
M
Hand 2 (150.00, 300.00)
Hand 1
(150.00, 300.00)
X X
33802-R7-01
1st parameter When the current position of R-axis is 0.00, this parameter shows the angle of hand "n" from the
X-axis plus direction in a Cartesian coordinate system. ("+"indicates the counterclockwise direction.) A
[degree]
2nd parameter Length of hand "n" [mm] (>0)
B
3rd parameter Z-axis offset amount for hand "n" [mm]
Y
C
X E
Hand 1
-90.00 deg.
100.00mm Hand 2
F
33804-R9-00
G
Sample Description
HAND H1= 0.00 150.0 0.0 R
HAND H2= -90.00 100.00 0.0 R H
P1= 150.00 300.00 0.00 0.00 0.00 0.00
CHANGE H1 ………
Changes the hand data of robot 1 to hand 1.
MOVE P,P1 ………
Tip of hand 1 of robot 1 moves to P1.(1) I
CHANGE H2 ………
Changes the hand data of robot 1 to hand 2.
MOVE P,P1 ………
Tip of hand 2 of robot 1 moves to P1.(2)
HALT J
SAMPLE:HAND K
(1) (2)
Y Y L
Hand 1 Hand 2 M
(150.00, 300.00) (150.00, 300.00)
X X
33804-R7-01
D X
Hand 2
E -100.00mm
Hand 1
F 100.00mm
G Y
33805-R9-00
H Sample Description
HAND H1= 0.000 0.000 0.000
HAND H2= 100.000 -100.000 -100.000
I P1= 200.000 250.000 0.000 0.000 0.000 0.000
CHANGE H2 ………
Changes the hand data of robot 1 to hand 2.
MOVE P,P1 ………
Tip of hand 2 of robot 1 moves to P1.(1)
J CHANGE H1 ………
Changes the hand data of robot 1 to hand 1.
MOVE P,P1 ………
Tip of hand 1 of robot 1 moves to P1.(2)
HALT
K
SAMPLE:HAND
L
(1) (2)
M
X X
Hand 2 Hand 1
Y Y
33806-R7-01
1st parameter When the current position of R-axis is 0.00, this parameter shows the angle of hand "n" from the
X-axis plus direction in a Cartesian coordinate system. ("+"indicates the counterclockwise direction.) A
[degree]
2nd parameter Length of hand "n". [mm] (>0)
B
3rd parameter Z-axis offset amount for hand "n". [mm]
X D
Hand1
E
150.00mm 90 deg.
Hand2
F
100.00mm
Y G
33806-R9-00
Sample Description H
HAND H1= 0.000 100.000 0.000 R
HAND H2= 90.000 150.000 0.000 R
P1= 200.000 250.000 0.000 0.000 0.000 0.000 I
CHANGE H2 ………
Changes the hand data of robot 1 to hand 2.
MOVE P,P1 ………
Tip of hand 2 of robot 1 moves to P1.(1)
CHANGE H1 ………
Changes the hand data of robot 1 to hand 1.
J
MOVE P,P1 ………
Tip of hand 1 of robot 1 moves to P1.(2)
HALT
K
SAMPLE:HAND L
(1) (2) M
X X
Hand 2 Hand 1
Y Y
33808-R7-01
Format
expression
HOLD
character string
A
Explanation Temporarily stops the program. When restarted, processing resumes from the next line after the HOLD
B
statement. If an <expression> or <character string> is written in the statement, the contents of the
<expression> or <character string> display on the programming box screen.
C
D HOLD is effective only in the task executed. The programs executed in other tasks continue execution.
E Sample Description
’MAIN ROUTINE
*ST:
F MOVE P,P0,P1
IF DI(20)=1 THEN ………
If DI(20) is ON
HOLD "PROGRAM STOP" ………
Pauses the task program to be executed (displayed as
G ENDIF “PROGRAM STOP”)
GOTO *ST
HALT ………
Stops and resets the program
H
In PTP movement specified by movement commands such as MOVE and DRIVE, the next line's command is executed
I when the axis enters the effective OUT position range.
Therefore, if a HOLD command exists immediately after a PTP movement command, that HOLD command is executed
J before the axis arrives in the target position tolerance range.
Likewise, when specifying CONT options in interpolation movement during MOVE (L or C) command, the next
command is executed immediately after movement starts. Therefore, if a HOLD command exists immediately after
K the interpolation movement command during MOVE (L or C) command with CONT options, a HOLD command is
executed immediately after starting movement.
L In either of the above cases, use the WAIT ARM command as shown below if desiring to execute the HOLD command
after the axis arrives within the target position tolerance range.
M
HOLD command
DRIVE(1,P1) DRIVE(1,P1)
Target position
HOLD WAIT ARM
HOLD
Tolerance
OUT position
HOLD execution HOLD execution
33822-R7-00
Format
expression
HOLDALL
character string
A
Explanation Temporality stops all programs. When restarted, the program that has executed HOLDALL is executed
B
from the next line after the statement, and other programs are resumed from the line that has interrupted
execution. If an <expression> or <character sting> is written in the statement, the contents of
<expression> or <character string> displays on the programming box screen. C
Sample Description
D
’MAIN ROUTINE
*ST:
MOVE P,P0,P1 E
IF DI(20)=1 THEN ………
If DI(20) is ON
HOLD "PROGRAM STOP" ………
Pauses all programs (displayed as “PROGRAM STOP”)
ENDIF F
GOTO *ST
HALT ………
Stops and resets the program
G
In PTP movement specified by movement commands such as MOVE and DRIVE, the next line's command is executed
when the axis enters the effective OUT position range. H
Therefore, if a HOLDALL command exists immediately after a PTP movement command, that HOLDALL command is
executed before the axis arrives in the target position tolerance range.
Likewise, when specifying CONT options in interpolation movement during MOVE (L or C) command, the next
I
command is executed immediately after movement starts. Therefore, if a HOLDALL command exists immediately after
the interpolation movement command during MOVE (L or C) command with CONT options, a HOLDALL command is J
executed immediately after starting movement.
In either of the above cases, use the WAIT ARM command as shown below if desiring to execute the HOLDALL
command after the axis arrives within the target position tolerance range.
K
HOLDALL command L
DRIVE(1,P1) DRIVE(1,P1)
M
Target position
HOLDALL WAIT ARM
HOLDALL
Tolerance
OUT position
HOLDALL execution HOLDALL execution
33702-R9-00
B
Value Range (Specifying format)
conditional expression Input/Output signals or variables
C
Explanation This type of IF statement is available to write only when the conditional expression is "true"
D or when the number of <command> executed in the "false" condition is one.
J When the conditional expression used to designate the IF statement condition is a numeric expression, an expression
value other than "0" indicates a TRUE status, and "0" indicates a FALSE status.
K
Sample Description
L IF DI(20)=1 THEN *MAIN1 ELSE *MAIN2 ………
If DI(20) is ON "True",
: Jumps to label *MAIN1
*MAIN1:
M DO(20)=1 If DI(20) is OFF "false",
: Jumps to label *MAIN2
*MAIN2:
DO(21)=1
:
E
Explanation If the condition specified by <conditional expression 1> is met (true), this statement executes the
instructions specified in <command block 1>, then jumps to the next line after ENDIF.
F
When an ELSEIF statement is present and the condition specified by <conditional expression 2> is met
(true), the instructions specified in <command block 2> are executed.
G
If all the conditions specified by the conditional expression are not met (false), <command block n> is
executed. H
I
When the conditional expression used to designate the IF statement condition is a numeric expression, an expression
value other than "0" indicates a TRUE status, and "0" indicates a FALSE status.
J
Sample 1 (Block IF statement 1) Description
K
MOVE P,P1,A3=0.00
IF DI(20)=1 THEN ……When DI(20) is ON, executes “true” command block.
DO(20)=1 ……From this line, “true” command block L
MOVE P,P10,A3=0.00
DO(20)=0 ……Down to this line, “true” command block
ELSE ……When DO(20) is OFF, executes “false” command block. M
DO(21)=1 ……From this line, “false” command block
MOVE P,P11,A3=0.00
DO(21)=0 ……Down to this line, “false” command block
ENDIF ……IF statement end definition
MOVE P,P20,A3=0.00 ……Jumps to this line after executing the IF statement
:
Format
INPUT prompt statement ; variable , variable ,...
, point variable point variable
A shift variable shift variable
B
Explanation Assigns a value to the variable specified from the programming box.
The input definitions are as follows:
C 1. When two or more variables are specified by separating them with a comma ( , ), the specified input
data items must also be separated with a comma ( , ).
At the <prompt statement>, enter a character string enclosed in double quotation marks ( " ) that will
2.
D appear as a message requiring data input. When a semicolon ( ; ) is entered following the <prompt
statement>, a question mark ( ? ) and a space will appear at the end of the message.
E When a comma ( , ) is entered, nothing will be displayed following the message.
3. When the <prompt statement> is omitted, only a question mark ( ? ) and a space will be displayed.
4. The input data type must match the type of the corresponding variables. When data is input to a point
F variable or shift variable, insufficient elements are set to "0".
5. If only the ENTER key is pressed without making any entry, the program interprets this as a "0" or "null
G string" input. However, if specifying two or more variables, a comma ( , ) must be used to separate
them.
6. If the specified variable is a character type and a significant space is to be entered before and after a
H comma ( , ), double quotation mark ( " ) or character string, the character string must be enclosed in
double quotation marks ( " ). Note that in this case, you must enter two double quotation marks in
succession so that they will be identified as a double quotation mark input.
I
Entry Example Result ; Contents of A$
ABC ABC
J
(space)ABC(space) ABC: space is not entered before and after ABC
" ABC " ABC : spaces are entered before and after ABC
K ABC,XYZ ABC is entered, and XYZ is entered when the next INPUT statement is executed.
"ABC,XYZ" ABC,XYZ
L """ABC""" "ABC"
• If the variable and the value to be assigned are different types, the specified message displays, and a "waiting for
input" status is established.
• When assigning alphanumeric characters to a character variable, it is not necessary to enclose the character string
in double quotation marks ( " ).
• When using INPUT statement, the value is assigned to the variable from the channel specified in controller
parameter "INPUT/PRINT using channel".
Format
A
Value Range
E Sample Description
INROFST 10 ………
Sets "R axis inertia offset for SCARA" parameter of robot 1 to 10.
INROFST[2] 20 ………
Sets "R axis inertia offset for SCARA" parameter of robot 2 to 20.
F
H
Functions
I Format
L
Explanation This function acquires the value of "R axis inertia offset for SCARA" parameter of specified robot.
M Sample Description
A%=INROFST ………
The "R axis inertia offset for SCARA" parameter of robot 1 is
assigned to the variable A%.
A%=INROFST[2] ………
The "R axis inertia offset for SCARA" parameter of robot 2 is
assigned to the variable A%.
Format
INT (expression)
A
Explanation This function acquires an integer value with decimal fractions truncated.
The maximum integer value which does not exceed the <expression> value is acquired..
B
Sample Description
A=INT(A(0)) ………
"-2" is assigned to B. C
B=INT(-1. 233)
Format
A
Value Range
C Explanation Converts the joint coordinate data (unit: pulse) specified by the <point expression> into Cartesian
coordinate data (unit: mm, degree) of the robot specified by the <robot number>.
D Sample Description
P10=JTOXY(WHERE) ………
Current position data of robot 1 is converted to Cartesian
E coordinate data and assigned to P10.
F
Related commands XYTOJ
Format
A
Value Range
Expression 0 to 255 B
Explanation This function extracts a character string with the digits specified by the <expression> from the left end of C
the character string specified by <character string expression>.
• The <expression> value must be between 0 and 255; otherwise an error will occur.
D
• If the <expression> value is 0;
extracted character string will be a null string (empty character string). E
• If the <expression> value has more characters than the <character string expression>;
extracted character string will become the same as the <character string expression>.
F
Sample Description G
B$=LEFT$(A$,4) ………
4 characters from the left end of A$ are assigned to B$.
H
Related commands MID$, RIGHT$
I
Format
A
Value Range
D This statement only specifies the hand system, and does not move the robot.
If executed while the robot arm is moving, execution waits until movement is complete (positioned
E within tolerance range).
F
Sample Description
G RIGHTY ………Specifies the hand system of robot 1 as a right-handed system.
MOVE P,P1 ………(1)
LEFTY ………Specifies the hand system of robot 1 as a left-handed system.
H MOVE P,P1 ………(2)
RIGHTY ………Specifies the hand system of robot 1 as a right-handed system.
HALT
I
SAMPLE:LEFTY/RIGHTY
J
P1
K
(2) (1)
SCARA robot
33809-R7-00
Format
A
Explanation Returns the character string length of the <character string expression> as a number of bytes.
B
Sample Description
A$="YAMAHA" C
B$="YAMAHA MOTOR"
C$="YAMAHA CO., LTD."
PRINT LEN(A$) ………Indicates "6".
D
PRINT LEN(B$) ………Indicates "12".
PRINT LEN(C$) ………Indicates "16".
E
Format
LET arithmetic assignment statement
character string assignment statement
A point assignment statement
shift assignment statement
B
Explanation Executes the specified assignment statement. The right-side value is assigned to the left side.
An assignment statement can also be directly written to the program without using a LET statement.
C
D If the controller power is turned off during execution of a <point assignment statement> or <shift assignment
statement>, a memory-related error such as the "9.702: Point data destroyed" or the "9.706: Shift data destroyed" may
occur
E
F
59.1 Arithmetic assignment statement
G Format
LET integer variable = expression
H real variable
parallel output variable
internal output variable
I arm lock output variable
timer output variable
J serial output variable
serial word output variable
serial double-word output variable
K
Value Contents
Expression Variables (except character string variables, point data variables, shift variables),
L Function, Numeric value
Sample
A!=B!+1
B%(1,2,3)=INT(10.88)
DO2()=&B00101101
MO(21,20)=2
LO(00)=1
TO(01)=0
SO12()=255
Sample Description M
P1 =P10 ………
Point 10 is assigned to P1.
P20=P20+P5 ………
Each element of point 20 and point 5 is summed and assigned to P20.
………
Each element of point 3 is subtracted from point 30 and assigned to
P30=P30-P3 P30.
………
Each element of point 70 is multiplied by 4 and assigned to P80.
P80=P70*4 ………
Each element of point 5 is divided by 3 and assigned to P60.
P60=P5/3
B
• Available elements in <shift expressions> are only shift elements.
• Available operators in <shift expressions> are only addition and subtraction arithmetic operators.
C *Addition/subtraction is performed for each element of each axis.
• Parentheses are not available.
D
Sample Description
E S1=S0 ………
"shift 0" is assigned to "shift 1".
S2=S1+S0 ………
Each element of "shift 1" and "shift 0" is summed and assigned to
"shift 2".
F
G
• Permissible examples: S1 + S2
• Prohibited examples: S1 + 3
H
Format
1. LET LOm (b, ..., b) = expression
2. LET LO (mb, ..., mb) = expression
A
F
Explanation This statement outputs the specified value to the LO port to either prohibit or allow axis movement.
G
• LO(00) to LO(07) correspond to axes 1 to 8, LO(10) to LO(17) correspond to axes 9 to 16, respectively.
• An arm lock ON status occurs at axes where bits are set, and axis movement is prohibited.
H
Reference * Chapter 3 "10 Bit Settings"
Sample Description
K
LO0()=&B00001010 ………
Prohibits movement at axes 2 and 4.
LO0(2,1)=&B10 ………
Prohibits movement at axis 3, permits movement at axis 2. L
Format
1. LET expression = LOm (b, ..., b)
2. LET expression = LO (mb, ..., mb)
A
E • LO(00) to LO(07) correspond to axes 1 to 8, LO(10) to LO(17) correspond to axes 9 to 16, respectively.
• An arm lock ON status occurs at axes where bits are set, and axis movement is prohibited.
F Sample Description
A%= LO0() ………
Output status of ports DO(07) to LO(00) is assigned to
G variable A%.
A%= LO0(6, 5, 1) ………
Output status of LO(06), LO(05) and LO(01) is assigned to
variable A%.
H (If all above signals are 1(ON), then A%=7.)
A%=LO(17,15,00) ………
Output status of L0(17), LO(15) and L0(00) is assigned to
variable A%.
I (If all above signals except L0(15) are 1 (ON), then A%=5.)
Format
1. LOCx (point expression) = expression
2. LOCx (shift expression) = expression
3. LOCx (Wn) = expression
A
B
Value Range / Meaning
1 to 6 (axis setting)
F (hand system flag setting) C
Format 1 x
F1 (first arm rotation information)
F2 (second arm rotation information)
D
Format 2 x 1 to 4 (element setting)
Explanation Format 1: C
hanges the value of the point data specified axis, the hand system flag, and the first arm and
the second arm rotation information.
I
Format 2: Changes the value of a specified element from the shift coordinate data.
Format 3: Changes the value of a specified element from the work data. J
n NOTE
When changing the work data, execution will be in a waiting state until the operation of the target robot enters
K
within the tolerance range.
(For LOCx during conveyor tracking, refer to the separate manual "Tracking System" CTMOVE.)
M
Points where data is to be changed must be registered in advance. An error occurs when attempting to change an
unregistered (no coordinate values / no element data) point, shift coordinate, or work data.
Format
1. LOCx (point expression)
2. LOCx (shift expression)
A
3. LOCx (Wn)
B Value Range
1 to 6 (axis setting)
C Format 1 x
F (hand system flag setting)
F1 (first arm rotation information)
F2 (second arm rotation information)
D Format 2 x 1 to 4 (element setting)
I
Sample Description
LOC1(P10)=A(1) ………
A xis 1 data of P10 is changed to the array A (1) value.
J LOC2(S1)=B ………
2nd element (Y direction) of S1 is changed to the B value.
LOC3(W1)=C ………
3rd element (Z direction) of W1 is changed to the C value.
K A(1)=LOC1(P10) ………
A xis 1 data of P10 is assigned to array A (1).
B(2)=LOC1(S1) ………
1st element (X direction) of S1 is assigned to array B (2).
C(3)=LOC1(W1) ………
1st element (X direction) of W1 is assigned to array C (3).
L
Format
A
Explanation Shifts the <expression 1> bit value to the left by the amount of <expression 2>.
Spaces left blank by the shift are filled with zeros (0).
B
Sample Description C
A=LSHIFT(&B10111011,2) ………
The 2-bit-left-shifted &B10111011 value (&B11101100) is
assigned to A.
D
Format
A
Value Range
C
Explanation This function returns the return-to-origin or absolute-search machine reference value (unit: %) of
specified axes.
D This function is valid only for axes whose return-to-origin method is set as "Sensor" or "Stroke-end".
E
Sample Description
F A=MCHREF(1) ………
The machine reference of axis 1 of robot 1 is assigned to
variable A.
Format
A
Value Range
Expression 1 1 to 255
B
Expression 2 0 to 255
C
Explanation This function extracts a character string of a desired length (number of characters) from the character
string specified by <character string expression>. <expression 1> specifies the character where the
extraction is to begin, and <expression 2> specifies the number of characters to be extracted.
D
•If the <expression 1> and <expression 2> values violate the permissible value ranges, An error will E
occur
•If <expression 2> is omitted, or if the number of characters to the right of the character of <expression
1> is less than the value of <expression 2>, then all characters to the right of the character specified by F
<expression 1> will be extracted.
•If <expression 1> is longer than the character string, the extracted value will be a null string (empty
G
character string).
H
Sample Description
B$=MID$(A$,2,4) ………
The 2nd to 4th characters (up to the 5th characters) of A$ I
are assigned to B$.
J
Related commands LEFT$, RIGHT$
Format
1. LET MOm(b, ..., b) = expression
2. LET MO(mb, ..., mb) = expression
A
F
Explanation Outputs a specified value to the MO port.
G In order to maintain the origin sensor status and axis HOLD status at each axis, ports "30" to "37" cannot
be used as output ports (these ports are for referencing only). (Ports 32, 33, 36, and 37 are reserved by
the system.)
H Reference * Chapter 3 "10 Bit Settings"
I c CAUTION
Outputs to MO0() and MO1() are not possible.
J
Ports "30", "31", "34", and "35" outputs
Bit 7 6 5 4 3 2 1 0
K Port 30 Axis 8 Axis 7 Axis 6 Axis 5 Axis 4 Axis 3 Axis 2 Axis 1
Port 31 Axis 16 Axis 15 Axis 14 Axis 13 Axis 12 Axis 11 Axis 10 Axis 9
L Origin sensor status 0: ON; 1: OFF (Axis 1 is not connected)
Port 34 Axis 8 Axis 7 Axis 6 Axis 5 Axis 4 Axis 3 Axis 2 Axis 1
Port 35 Axis 16 Axis 15 Axis 14 Axis 13 Axis 12 Axis 11 Axis 10 Axis 9
M HOLD status 0: No HOLD / 1: HOLD (Axis 1 is not connected)
For details regarding MO ports "30" to "37", refer to Chapter 3 "9.5 Internal output variable".
Sample Description
MO2()=&B10111000 ………
MO(27,25,24,23) are turned ON, and MO(26,22,21,20) are turned OFF.
MO2(6,5,1)=&B010 ………
MO(25) are turned ON, and MO (26,21) are turned OFF.
MO3() = 15 ………
MO(33,32,31,30) are turned ON, and MO(37,36,35,34) are turned OFF.
MO(37,35,27,20)=A ………
The contents of the 4 lower bits acquired when variable A is
converted to an integer are output to MO(37,35,27,20), respectively.
Format
1. LET expression = MOm(b, ..., b)
2. LET expression = MO(mb, ..., mb)
A
F
Explanation Acquires the output status of the specified MO port.
G
Sample Description
A%= MO0() ………
Output status of ports MO(07) to MO(00) is assigned to
H
variable A%.
A%= MO0(6, 5, 1) ………
Output status of MO(06), MO(05) and MO(01) is assigned
to variable A%.
I
(If all above signals are 1(ON), then A%=7.)
A%=MO(17,15,00)
………
Output status of M0(17), MO(15) and M0(00) is assigned
to variable A%.
J
(If all above signals except M0(15) are 1 (ON), then
A%=5.)
………
Output status of M0(377), MO(365), MO(255) and M0(123) is
K
A%=MO(377,365,255,123) assigned to variable A%.
(If all above signals except M0(15) are 1 (ON), then
A%=15.)
L
M
Related commands RESET, SET
Format
ON
MOTOR OFF
A PWR
B
Explanation This command controls the motor power on/off. The servo on/off of all robots can also be controlled at
the same time.
C
• ON: Turns on the motor power. All robot servos are also turned on at the same time.
• OFF: Turns off the motor power. All robot servos are also turned off at the same time to apply the
D dynamic brake. For the axis with the brake, the brake is applied to lock it.
• PWR: Turns on only the motor power.
E
Sample Description
F MOTOR ON ………
Turns on the motor power and all robot servos.
Format
Options PTP
Linear Arch
Remarks
J
interpolation interpolation
C
Sample Description
F
• PTP movement is faster than interpolation movement, but when executing continuous movement to multiple
G points, a positioning stop occurs at each point.
• Refer to "Point editing" in RCX 3 Series Operator's Manual for details of adding and editing point names.
H
*1) Axis parameter "Tolerance <TOLE>"
This parameter sets the positioning completion range to the target position when the robot moves.
I When the current position of the robot enters the specified range, this is judged to the positioning completion.
J Target Position
Current Position
K Tolerance Range
Note) Depending on the movement type, the timing of the command completion (the timing when the command on the
L next line is executed) differs from one judged to the positioning completion .
If the next command following the MOVE P command is an executable command such as a signal output
command, that next command will start when the movement axis enters the OUT position range. In other words, A
that next command starts before the axis arrives within the target position tolerance range.
B
Signal output (DO, etc.) Signal is output when the axis enters within OUT position range.
DELAY DELAY command is executed and standby starts, when the axis enters the OUT position range.
HALT
Program stops and is reset when the axis enters the OUT position range. Therefore, the axis C
movement also stops.
All programs in execution stop when the axis enters the OUT position range, task 1 is reset, and
HALTALL
other tasks terminate. Therefore, the movement also stops. D
Program temporarily stops when the axis enters the OUT position range. Therefore, the axis
HOLD
movement also stops.
HOLDALL
All programs in execution temporarily stop when the axis enters the OUT position range. E
Therefore, the movement also stops.
WAIT WAIT command is executed when the axis enters the OUT position range.
The WAIT ARM statements are used to execute the next command after the axis enters the tolerance range. F
G
The OUT position value is specified by parameter setting. This value can be changed within the program by using
the OUTPOS command.
H
I
MOVE P,P1 MOVE P,P1
Target position
DO(20)=1 WAIT ARM
DO(20)=1 J
P1
Tolerance
K
OUT position
DO(20) turns ON DO(20) turns ON
L
MOVE P,P1 MOVE P,P1
HOLD
Target position
WAIT ARM M
HOLD
Tolerance
OUT position
HOLD execution HOLD execution
(program temporarily stops) (program temporarily stops)
• Execution START condition: Movement of all specified axes is complete (within the tolerance range).
A • Execution END condition: Movement of all specified axes has begun (within the tolerance range).
All movement axes arrive at the same time.
B c CAUTION
For the continuous motion specified by several points, CONT setting (continuous motion) is required.
In RCX340/RCX320, the motion of interpolation movement command and END condition are different from
C conventional model. Addition of the CONT setting to the movement command allows to the equivalent
movement and END condition in conventional model.
D
On robots with R-axis, the R-axis speed may become too fast and cause an error, depending on the R-axis movement
E distance.
F Sample Description
MOVE L,P0,P1 ………
The robot 1 moves (linear interpolation movement) from its
G current position to the position specified by P0, P1.
SAMPLE:MOVE L
H
P0 P1
I Tolerance range
J Current position
1. PTP movement
L Current position
OUT position range
Target position
Tolerance range
M
The command ends when the axis
enters the OUT position range, and
the next command is then executed.
2. Interpolation movement
OUT position range
Current position Target position
Tolerance range
In circular interpolation, an arc is generated based on 3 points: the current position, an intermediate position, and
the target position. Therefore, circular interpolation must be specified by an even number of points. A
• Execution START condition: Movement of all specified axes is complete (within the tolerance range).
B
• Execution END condition: Movement of all specified axes has begun.
All movement axes arrive at the same time.
C
c CAUTION
In RCX340/RCX320, the motion of interpolation movement command and END condition are different from
conventional model. Addition of the CONT setting to the movement command allows to the equivalent
movement and END condition in conventional model.
D
Sample Description E
MOVE L,P20 ………
Linear interpolation movement of robot 1 occurs from
the current position to P20.
MOVE C,P21,P22,P23,P20 ………
Circular interpolation movement occurs through points F
P21, P22, P23, P20.
MOVE L,P24 ………
Linear interpolation movement occurs to P24.
G
SAMPLE:MOVE C P22
H
P23 P21
I
Current position P20 P24
J
• Circular interpolation is possible within the following range: radius 0.100mm to 5,000.000mm.
• In order to create a locus of closed circle, connect 2 arcs.
K
• Circle distortion may occur, depending on the speed, acceleration, and the distance between points.
• On robots with an R-axis, the R-axis speed may become too fast and cause an error, depending on the R-axis
movement distance.
L
A p1 p2 p3 p4 p5 p6 f f1 f2
Notation Value
B p1 to p6 Space-separated coordinate values for each axis
f Hand system flag (SCARA robot only)
f1 First arm rotation information (YK-TW series only)
C
f2 Second arm rotation information (YK-TW series only)
D Explanation Directly specifies coordinate data by a numeric value. Units for the coordinate is as follows;
• Integer: "pulse" units
E • Real number (with decimal point): "mm/deg." units
• Integers and real numbers (mixed): All coordinate values will be handled in "mm/deg." units.
F The types of movements in which this specification is possible are the PTP movement and the linear
interpolation movement.
G
Notation: f ) SCARA robots with coordinate data in "mm" units --> Hand system flags can be specified. (*1)
To set the hand system flag, set either 1 or 2 at "f".
H If a number other than 1 or 2 is set, or if no number is designated, 0 will be set to indicate that there is
no hand system flag.
I 0
Hand system flag is not set.
Any value other than 1 / 2, or no setting.
f
1 Right-handed system is used to move to a specified position.
J 2 Left-handed system is used to move to a specified position.
K Notation: f1,2) YK-TW series with coordinate data in "mm" units -->
The first and second arm rotation information can be specified. (*1)
L To set the rotation information, set "-1", "0", or "1" at f1 and f2.
Any other value or no setting will be processed as "0".
Indicates arm rotation information where movement to the "0" position has been specified.
M 0
Any value other than -1 / 0 / 1, or no setting.
f1, 2
1 Indicates arm rotation information where movement to the "1" position has been specified.
-1 Indicates arm rotation information where movement to the "-1" position has been specified.
c CAUTION
•W
hen performing linear interpolation with a hand system flag specified, be sure that the same hand system is
used at the current position and target position. If the hand system are different, an error will occur and robot
movement will be disabled.
•W
hen performing a linear interpolation, the current position's first arm and second arm rotation information
must be the same as the movement destination's first arm and second arm rotation information. If the two are
different, an error will occur and movement will be disabled.
t SCARA robots with a hand system flag set in the movement destination's coordinate data, the specified hand
A
system will have priority over the current arm type or LEFTY/RIGHTY setting.
Sample Description A
MOVE P,10000 10000 1000 1000 0 0
………
PTP movement of robot 1 occurs from current position to the B
specified position.
MOVE P,100.0 100.0 50.0 45.0 0.0 0.0 2
………
PTP movement of robot 1 occurs from current position to the C
specified position with Left-handed system.
MOVE P,-180.0 -430.0 50.0 180.0 0.0 0.0 1 -1 1
D
………
PTP movement of robot 1 occurs from current position to the
specified position (first arm: -180°to 360°, second arm: 180° to 360°)
with right-handed system. E
Explanation Specifies a <point expression>. Two or more data items can be designated by separating them with
a comma ( , ).
I
Circular interpolation must be specified by an even number of points.
J
c CAUTION
When moving the robot by linear or circular interpolation to a point where a hand system flag is specified, be
sure that the same hand system is used at both the current and target positions. If the hand system are different,
an error will occur and robot movement will be disabled. K
t SCARA robots with a hand system flag set in the movement destination's coordinate data, the specified hand
A
system will have priority over the current arm type or LEFTY/RIGHTY setting.
M
Sample Description
MOVE P,P1 ………
Robot 1 moves from the current position to the position
specified by P1.
MOVE P,P20,P0,P100 ………
Robot 1 moves in sequence from the current position to
positions specified by P20, P0, P100.
c CAUTION
When performing a linear and circular interpolation, the current position's first arm and second arm rotation
information must be the same as the movement destination's first arm and second arm rotation information. If
the two are different, an error will occur and movement will be disabled.
A Explanation Specifies a <point name>. Two or more data items can be designated by separating them with a comma ( , ).
Circular interpolation must be specified by an even number of points.
B
t SCARA robots with a hand system flag set in the movement destination's coordinate data, the specified hand
A
C system will have priority over the current arm type or LEFTY/RIGHTY setting
D Sample Description
MOVE P,PICK _ POINT ………
Robot 1 moves from the current position to positions
E specified by the point name "PICK _ POINT".
MOVE C, CIRCLE _ PNT1,CIRCLE _ PNT2
F ………
Robot 1 moves in coordinates specified by the current
position and point name "CIRCLE _ PNT1" and "CIRCLE _ PNT2"
in circular interpolation movement.
G
H Option types
Value Range
K Expression 1 to 100 (units: %)
M "S" setting superimposes the speed on the current automatic movement speed.
automatic movement speed (%) × program movement speed S (%) = actual speed (%)
100% 50% 50%
50% 50% 25%
n NOTE
This option specifies only the maximum speed and does not guarantee the movement at the specified speed.
• Automatic movement speed: Specified by programming box operation or by the ASPEED command.
• Program movement speed: Specified by SPEED commands or MOVE, DRIVE speed settings.
Sample
Description
(Automatic movement speed: 80%)
Value Range A
Expression 0.01 to 100.00 (units: %)
B
Explanation Specifies the ratio to the maximum speed of the robot. (This setting is enabled only for the specified
MOVE statement.) C
Robot max. speed (mm/sec. or deg./sec.) × movement speed DS (%)
Sample
Description
F
(Automatic movement speed: 80%)
MOVE P,P0
MOVE P,P1,DS=50
………
PTP movement to P0 (Actual speed is 80%)
………PTP movement to P1 (Actual speed is 40%)
G
MOVE P,P2,DS=0.1 ………PTP movement to P2 (Actual speed is 0.1%)
H
I
● Speed setting (VEL) PTP Linear interpolation Circular interpolation
Format
J
VEL = expression
Value Range K
Expression 0.01 to 100.00 (units: %)
L
Explanation Specifies the maximum composite speed (in "mm/sec." units) of the XYZ axes in an <expression>.
This option is enabled only for the specified MOVE statement.
The setting "VEL=" moves a robot in the specified velocity regardless of automatic movement speed. M
n NOTE
• This option specifies only the maximum resultant speed and does not guarantee movement at the specified
speed.
• Although the values after decimal point can be entered, it is removed when execution and does not affect
the motion.
Sample Description
MOVE L,P10,VEL=100 ………
Robot 1 moves from the current position to the position
specified by P10 at the maximum composite speed of 100 mm/
sec. of the XYZ axis.
Value Contents
A
x Specifies an arch axis from A1 to A6
B Expression
Arch position (Specify with Direct numeric value / or / Variable)
Integer value: "pulse" units.
R
eal number (with decimal point): "mm/deg." units.
F
•W hen there is a real value in any of the <expression>, <expression 1>, and <expression 2>, all expressions are
handed as real value.
G • The Value specified in <expression> is based on the robot coordinates. Settings such as hand definition and work
definition are not considered.
H
Explanation 1. The "x" specified axis begins moving toward the position specified by the <expression> ("1" shown in
the Fig. below).
I 2. W
hen the axis specified by "x" moves the arch distance 1 or more, other axes move to their target
positions ("2" shown in the figure below).
J 3. T
he axis specified by "x" moves to the target position so that the remaining movement distance
becomes the arch distance 2 when the movement of other axes is completed ("3" shown in the figure
below).
K 4. The command ends when all axis enter the OUT position range.
Sample Description
MOVE P,P0,A3=0.00 {50.00, 70.00}
………
The A3-axis moves from the current position to the "0.00 mm" position.
After that, other axes move to P0. Finally, the A3-axis moves to P0.
When multiple points are specified in PTP movement, the axis in arch motion setting also moves to the target
position.
PTP movement
MOVE P, P10, P11, A3 = 0
A3=0
A
All axes move to P10.
B
P10 P11
C
● STOPON condition setting PTP linear interpolation Circular interpolation
Format
D
STOPON conditional expression
E
Explanation Stops movement when the conditions specified by the conditional expression are met.
Because this is a deceleration type stop, there will be some movement (during deceleration) after the F
conditions are met.
If the conditions are already met before movement begins, no movement occurs, and the command is
G
terminated.
This option can only be used for PTP movement and linear interpolation movement. H
This option is enabled only when program execution.
c CAUTION
If STOPON condition is simultaneously specified with CONTON and CONT setting, the lower setting will be
I
invalidated as shown below;
STOPON condition setting > CONTON condition setting > CONT setting J
Sample Description
K
MOVE P,P0,STOPON DI(20)=1
MOVE P, P1 L
………
Robot 1 moves from the current position to the position specified
M
by P100. If the "DI (20) = 1" condition is met during movement, a
deceleration and stop occurs.
The next step (PTP movement to P1) is then executed.
Current Position P0
DI(20) ON
P1
hen the conditional expression used to designate the STOPON condition is a numeric expression, expression value
W
other than "0" indicates a TRUE status, and "0" indicates a FALSE status.
A Explanation When the conditions specified by the conditional expression are met, the robot starts deceleration stop
and executes the next command without waiting the movement completion (entering the tolerance
range) of axis.
B
The deceleration movement distance will be generated during the deceleration stop.
C If the next command is a movement command, the 2 movement paths are linked by connecting the
deceleration and acceleration sections, enabling continuous movement without intermediate stops.
D • If the conditions are not met, the robot moves to the specified target position and terminates the command.
• This option is enabled only when a program execution.
E
c CAUTION
If STOPON condition is simultaneously specified with CONTON and CONT setting, the lower setting will be
invalidated as shown below;
F STOPON condition setting > CONTON condition setting > CONT setting
G
Sample Description
MOVE P,P1,CONTON DI(20)=1
H
………
Robot 1 moves from the current position to the position specified by P1.
If the "DI (20) = 1" condition is met during movement,
I the robot starts decelerating and executes the next step.
MOVE P, P2 MOVE P, P2
K
When conditions are not met MOVE P, P1 MOVE P, P1
,STOPON DI(20)=1 ,CONTON DI(20)=1
L
M
MOVE P, P2 MOVE P, P2
MOVE P, P1 MOVE P, P1
,STOPON DI(20)=1 ,CONTON DI(20)=1
When conditions are met Starts next command Merged
Establishment of after stopping Establishment of
“DI(20)=1” “DI(20)=1”
hen < conditional expression > is a numeric expression, expression value other than "0" indicates a TRUE status,
W
and "0" indicates a FALSE status.
CONT
Explanation When movement is executed with CONT setting option, Movable axes will begin to execute the next A
command without waiting the completion their movement (entering the tolerance range). If the next
command is a movement command, the 2 movement paths are linked by connecting the deceleration
B
and acceleration sections, enabling continuous movement without intermediate stops.
This option is enabled only for the specified MOVE statement.
C
c CAUTION
• In RCX340/RCX320, the motion of interpolation movement command and END condition are different from
conventional model. Addition of the CONT setting to the movement command allows to the equivalent
movement and END condition in conventional model.
D
• If STOPON condition is simultaneously specified with CONTON and CONT setting, the lower setting will be
invalidated as shown below;
STOPON condition setting > CONTON condition setting > CONT setting
E
F
n NOTE
The CONT setting can be used to reduce the movement END positioning time. The path to the target point is not guaranteed.
G
Caution regarding MOVE L / MOVE C command with CONT setting:
If the next command following the MOVE L / MOVE C command with CONT setting is an executable command
such as a signal output command, that next command will start immediately after axis movement begins. In other H
words, that next command starts before the axis arrives within the target position tolerance range.
Signal output (DO, etc.) Signal is output immediately after movement along the final path begins. I
DELAY command is executed and standby starts immediately after movement along the final path
DELAY
begins.
Program stops and is reset immediately after movement along the final path begins. Therefore, J
HALT
axis movement also stops.
All programs in execution stop immediately after movement along the final path begins, task 1 is
HALTALL
reset, and other tasks terminate. Therefore, the movement also stops. K
Program temporarily stops immediately after movement along the final path begins. Therefore,
HOLD
axis movement also stops.
All programs in execution temporarily stop immediately after movement along the final path L
HOLDALL
begins. Therefore, the movement also stops.
WAIT WAIT command is executed immediately after movement along the final path begins.
M
MOVE command
P1
Tolerance
33808-R9-00
A
SAMPLE:MOVE P CONT *1: “CONT pulse range”
OUT position range (*1) if the value is specified in the
P11
C
Next movement begins after
entering the OUT position range
Current position
F
Current position
33814-R7-00
G Sample Description
MOVE L,P10,CONT ………
Robot 1 Moves from the current position to the position
H MOVE L,P11 specified by P10, and then moves (linear interpolation
movement) to P11 without waiting for the moving axes to
arrive in the tolerance range, and completes the movement
I within the tolerance range.
J
The interpolation movement with CONT setting doesn't stop at intermediate points in the continuous movement.
K
SAMPLE:MOVE L CONT
L With CONT setting:
Deceleration zones P10
M P11
P11
33810-R9-00
ACC = expression
Value Range
A
Expression 1 to 100 (units: %)
B
Explanation Specifies the robot acceleration rate in the <expression>. The actual robot acceleration is determined by
the acceleration coefficient parameter setting.
C
Acceleration coefficient Parameter × Acceleration
Sample Description E
MOVE L,P100,ACC=10 ………
Robot 1 moves at an acceleration rate of 10% from the
current position to the position specified by P100.
F
H
● Deceleration setting PTP Linear interpolation Circular interpolation
Format
I
DEC = expression
Value Range J
Expression 1 to 100 (units: %)
K
Explanation Specifies the robot deceleration rate in an <expression>. The actual robot deceleration is determined by
the acceleration coefficient parameter setting (the setting is specified as a percentage of the acceleration L
setting value (100%).
Sample Description
MOVE L,P100,DEC=20 ………
Robot 1 moves at a deceleration rate of 20% from the
current position to the position specified by P100.
Value Meaning
B XY XY coordinate plane
YZ YZ coordinate plane
ZX ZX coordinate plane
C
Explanation When circular interpolation is executed by setting coordinates, this option executes circular interpolation
so that the projection on the specified coordinate plane becomes a circle.
D This option can be used for circular interpolation movement and is enabled only for the specified MOVE
statement.
E
n NOTE
• If no coordinate plane is specified, the robot moves along a 3-dimensional circle.
• When a 2-axis robot is used, the robot moves along a circle on the XY plane.
F
G Sample Description
P10 = 100.000 100.000 20.000 0.000 0.000 0.000
P11 = 150.000 100.000 0.000 0.000 0.000 0.000
H P12 = 150.000 150.000 20.000 0.000 0.000 0.000
P13 = 100.000 150.000 40.000 0.000 0.000 0.000
P12
P13
(1)
Z+
→
140
P10 120
P11
100 →X+
150
33822-R9-00
Expression 2
Position where the port output occurs. This position can be specified in "mm" units F
down to the 3rd decimal position.
G
Explanation During linear interpolation or circular interpolation movement, this command option outputs the value
of <expression 1> to the specified port when the robot reaches the <expression 2> distance (units: "mm")
from the start position. H
The <expression 2> numeric value represents a circle radius (not arc length)centered on the movement
START point.
I
This command option can only be used with linear or circular interpolation movement, and it can be
specified no more than 2 times per MOVE statement. J
If no hardware port exists, nothing is output.
c CAUTION
Output to ports "0" and "1" is not allowed at DO, MO, and SO.
K
Reference *C
hapter 3 "10 Bit Settings" L
Sample 1 Description
MOVE P,P0
M
MOVE L,P1,DO2()[email protected]
………
During linear interpolation movement of robot 1 to P1, 105 (&B01101001)
is output to DO2() when the robot reaches a distance of 25.85mm from P0.
Sample 2 Description
A!=10
B!=20
MOVE L,P2,MO(22)=1@A!,MO(22)=0@B!
………
After the robot 1 starts toward P2, MO(22) switches ON when robot 1
leaves a distance of 10mm, and switches OFF when robot 1 leaves a
distance of 20mm.
Format
MOVEI [robot number ](axis number ,... ) PTP ,point of destination , option,
P option...
A
L
B
Explanation Executes relative position movement of robot (axis).
It is not enabled for axes of other robots or for auxiliary axes.
C
Value Range / Type
Axis Number 1 to 6 (Multiple axes specifiable. If not input, all axes are specified.)
G Option (*)
elative Speed setting, Absolute speed setting, Linear speed setting
R
STOPON condition setting, CONTON condition setting, CONT setting,
Acceleration setting, Deceleration setting,
H * Reference "MOVE" statement (To use Sample program, replace "MOVE" in Sample to "MOVEI".)
I Options PTP
Linear
interpolation
Remarks
If the MOVEI statement is interrupted and then re-executed, the movement target position can be selected at the
"MOVEI/DRIVEI start position" setting in the controller parameter. For details, refer to the user's or operator's manual.
1) KEEP (default setting) Continues the previous (before interruption) movement. The original target position
remains unchanged.
2) RESET Relative movement begins anew from the current position. The new target position is
different from the original one (before interruption). (Backward compatibility)
Format
B
Explanation Executes relative position movement of the specified axes in the tool coordinates.
It is not enabled for axes of other robots or for auxiliary axes.
C
Value Range / Type
Robot Number 1 to 4 (If not input, robot 1 is specified.) D
Axis Number 1 to 6 (Multiple axes specifiabl. If not input, all axes are specified.)
Option (*)
elative Speed setting, Absolute speed setting, Linear speed setting
R
STOPON condition setting, CONTON condition setting, CONT setting,
G
Acceleration setting, Deceleration setting,
* Reference "MOVE" statement (To use Sample program, replace "MOVE" in Sample to "MOVET".) H
Options PTP
Linear
interpolation
Remarks I
Relative speed setting (SPEED) 3 3 Enabled only in specified MOVET statement
Format
A Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
B Axis Number 1 to 6
C Explanation Acquires the motor load factor (1 to 100 [%]) of the specified axis.
The motor load factor increases when the current value of the specified axis exceeds the rated current
D value. When the factor reaches 100%, "17.800 Motor overload" error occurs.
E
Sample Description
F A=MTRDUTY(1) ………
The motor load factor of axis 1 of robot 1 is assigned to
variable A.
Format
OFFLINE ETH
CMU
N
Explanation Changes the communication mode parameter in order to switch the communication mode to OFFLINE.
O
Changes the Ethernet communication mode parameter to OFFLINE ,
ETH
clears the transmission and reception buffers.
P
Changes the RS-232C communication mode parameter to OFFLINE,
CMU
resets the communication error, and clears the transmission and reception buffers.
Changes the Ethernet and RS-232C communication mode parameter to OFFLINE, Q
No setting resets the communication error (RS-232C only), and clears the transmission and
reception buffers.
R
S
Online command is invalid in OFFLINE (mode).
T
Sample
OFFLINE
SEND CMU TO A$ U
SEND CMU TO P10
ONLINE
HALT V
Reference For details of SEND statements, refer to "112 SEND" in this Chapter. W
Format
1. ON ERROR GOTO label
2. ON ERROR GOTO 0
N
Explanation Even if an error occurs during execution of the robot language, this statement allows the program to
O
jump to the error processing routine specified by the <label>, allowing the program to continue without
being stopped (this is not possible for some serious errors.)
P
• If "0" is specified instead of the <label>, the program stops when an error occurs, and an error message
displays.
Q • If ON ERROR GOTO "0" is executed at any place other than an error processing routine, the ON
ERROR GOTO command is canceled (interruption canceled).
R • The error processing routine can process an error using the RESUME statement and the error output
information (ERR, ERL).
T
• If a serious error such as "17.800: Motor overload" occurs, the program execution stops.
U • The most recently executed "ON ERROR GOTO <label>" statement is valid.
• If an error occurs during an error processing routine, the program will stop.
V • "ON ERROR GOTO <label>" statements cannot be used within error processing routines.
W Sample Description
ON ERROR GOTO *ER1
X
FOR A = 0 TO 9
P[A+10] = P[A]
NEXT A
Y
*L99: HALT
’ERROR ROUTINE
*ER1:
Z
IF ERR = &H000600CC THEN *NEXT1
………
Checks to see if a "Point doesn't exist" error has occurred.
IF ERR = &H000600CE THEN *NEXT2
………
Checks to see if a "Subscript out of range" error has occurred.
ON ERROR GOTO 0 ………
Displays the error message and stops the program.
*NEXT1: ………
Jumps to the next line after the error line and resumes
RESUME NEXT program execution.
*NEXT2: ………
Jumps to label *L99 and resumes program execution.
RESUME *L99
If the <expression> value is "0" or if the <expression> value exceeds the number of existing labels, no R
jump occurs, and the next command is executed.
After executing a jump destination subroutine, the next command after the ON to GOSUB statement is
executed. S
T
Sample Description
’MAIN ROUTINE
*ST: U
ON DI3() GOSUB *SUB1,*SUB2,*SUB3
GOTO *ST
………
*SUB1 to *SUB3 are executed.
………
Checks to see if a "Point doesn't exist" error has occurred.
V
HALT
’SUB ROUTINE
W
*SUB1:
MOVE P,P10,Z=0
RETURN
X
*SUB2:
DO(30) = 1
RETURN
Y
*SUB3:
DO(30) = 0
RETURN
Z
An <expression> value of "1" specifies a jump to <label 1>, "2" specifies a jump to <label 2>, etc.
Q Likewise, (<expression> value "n" specifies a jump to <label n>.)
R If the <expression> value is "0" or if the <expression> value exceeds the number of existing labels,
no jump occurs, and the next command is executed.
S
Sample Description
T ’MAIN ROUTINE
*ST:
ON DI3() GOTO *L1,*L2,*L3
U ………
Jumps to *L1 to *L3 in accordance with the DI3() value.
………
Returns to *ST
GOTO *ST
V HALT
’SUB ROUTINE
*L1:
W MOVE P,P10,Z=0
GOTO *ST
*L2:
X DO(30) = 1
GOTO *ST
*L3:
Y DO(30) = 0
GOTO *ST
Z
Related commands GOTO
Format
ONLINE ETH
CMU
N
Explanation Changes the communication mode parameter in order to switch the communication mode to ONLINE.
O
Changes the Ethernet communication mode parameter to ONLINE ,
ETH
clears the transmission and reception buffers.
Changes the RS-232C communication mode parameter to ONLINE, P
CMU
resets the communication error, and clears the transmission and reception buffers.
No setting
Changes the Ethernet and RS-232C communication mode parameter to ONLINE,
resets the communication error (RS-232C only), and clears the transmission and
Q
reception buffers.
S
Online command is valid in ONLINE (mode).
T
Sample
OFFLINE
SEND CMU TO A$ U
SEND CMU TO P10
ONLINE
HALT V
Reference For details of SEND statements, refer to "112 SEND" in this Chapter. W
Format
OPEN GPm
Sample Description
Q
OPEN GP1 ………
Opens the General Ethernet Port 1.
SEND "123" TO GP1 ………
Sends the character strings "123" from the General Ethernet Port 1.
R SEND GP1 TO A$ ………
Receives the data from the General Ethernet Port 1
and saves the received data in the variable A$.
CLOSE GP1 ………
Closes the General Ethernet Port 1.
S
Format
Explanation Acquires the character code of the first character in a <character string expression>.
O
Sample Description P
A=ORD("B") ………
66 (=&H42) is assigned to A.
Q
Related commands CHR$
Format
N
Value Range
P
Explanation Sets the axis sequence parameter for return-to-origin and absolute search operation of the robot specified
by the <robot number>.
Q
The 1 to 6 axes are expressed as "1 to 6" values, respectively, and the <expression> value must be 1-digit
R to 6-digit integer.
The same axis cannot be specified twice.
After the specified axes are returned to their origin points in sequence, from left to right, the remaining
S axes return to their origin points simultaneously.
If the <expression> value is "0", all axes will be returned to their origin points simultaneously.
U Functions
Format
V
ORGORD [robot number]
W
Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
X
Y Explanation Acquires the axis sequence parameter for return-to-origin and absolute search operation of the robot
specified by the <robot number>.
Z Sample Description
A=3
ORGORD A ………
Return-to-origin is executed first for axis 3 of robot 1.
ORIGIN ………
After the return-to-origin of axis 3 of robot 1 is completed,
return-to-origin is executed for the remaining axes.
MOVE P,P0
A=ORGORD ………
Return-to-origin sequence parameter of robot 1 is assigned to variable A.
HALT
Format
N
Value Range / Meaning
Robot Number
0: all robots O
1 to 4: specified robot only
0: all types P
1: incremental motor only
Motor Type 2: absolute motor only
9: incomplete return-to-origin axis only Q
(If omitted, 0 (all types) is specified.)
R
Explanation This statement performs return-to-origin of a robot, or absolute search for a semi-absolute axis.
S
If the movement is stopped at an intermediate point, "incomplete return-to-origin" status will occur.
If <robot number> is omitted or "0" is specified during multiple robots setting, the return-to-origin and
T
absolute search are first performed for the robot 1 and then for the robots 2 to 4.
U
Sample Description
ORIGIN 0, 1 ………
Performs return-to-origin for incremental motor axes only of all V
robots.
Format
OUT DOm(b, ..., b) , expression
DO(mb, ..., mb)
N MOm(b, ..., b)
MO(mb, ..., mb)
O SOm(b, ..., b)
SO(mb, ..., mb)
P LO0(b, ..., b)
LO(0b, ..., 0b)
Q TO0(b, ..., b)
TO(0b, ..., 0b)
R
Notation Value Range / Comtent
S m Port Number
2 to 7, 10 to 17, 20 to 27
If no hardware port exists, nothing is output.
U Expression
time
0 to 3600000 (units: ms)
V Explanation This statement turns ON the specified port output and terminates the command. (The program proceeds
to the next line.) Output to that port is then turned OFF after the time specified by the <expression> has
W elapsed. If the operation is stopped temporarily at an intermediate point and then restarted, that port's
output is turned OFF when the remaining <expression> specified time has elapsed.
c CAUTION
Output to ports "0" and "1" are not allowed at DO, and SO.
Sample Description
OUT DO2(),200 ………
Turns DO(27 to 20) ON, then turns them OFF 200 ms later.
………
Turns DO(37, 35, 27, 20) ON.
OUT DO(37,35,27,20)
Format
1. OUTPOS [robot number] expression
2. OUTPOS [robot number] (axis number) = expression
N
Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.) O
Axist Number 1 to 6 (If not input, all axes are specified.)
Expression 1 to 9999999 (Unit: pulse
P
Explanation Changes the "OUT position" parameter of the specified axis to the value of <expression>.
Q
Format 1: The change is applied to all axes of the specified robot.
Format 2: The change is applied only to the axis specified by <axis number>. R
Reference "MOVE" Axis parameter; "OUT position <OUTPOS>"
S
T
Functions
U
Format
Value Range
W
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Axist Number 1 to 6 (If not input, all axes are specified.)
X
Explanation Acquires the "OUT position" parameter's value for the specified axis.
Y
Sample 1 Description
OUTPOS 2000 ……
Changes the OUTPOS parameter for all axes of Robot 1
Z
to 2000
Sample 2 Description
OUTPOS (3) = 2000 ……
Changes the OUTPOS parameter for 3rd axis of Robot 1
to 2000
Sample 3 Description
A% = OUTPOS(3) ……
Acquires the value of the OUTPOS parameter for 3rd
axis of robot 1, assigns it to integer variable A%
Format
PATH [robot number](axis number,...) L point of destination , option,
C option...
N
Value Range / Type
Robot Number 1 to 4 (If not input, robot 1 is specified.) O
Axis Number 1 to 6 (Multiple axes specifiabl. If not input, all axes are specified.)
Movement type.
P
L, C
L: Linear interpolation, C: Circular interpolation
S
Explanation Sets the motion path for the specified axis.
This command can only be executed between the PATH SET and PATH END commands.
T
If execution is attempted elsewhere, an error will occur.
c CAUTION
• Be careful not to set the same position in the coordinates as the start point and the following path points. U
If the position of each point is duplicated, an error might occur.
• When "R" axis only is specified in the coordinate attribute parameter, an error will occur.
• Only the X, Y and Z coordinate values among the specified points are valid for PATH motion. V
Any other coordinates use the coordinate values at the START point of the PATH motion; R-axis can not be
moved to the specified point even if it is used.
W
X
When PATH command is executed on SCARA robots or Cartesian robots with rotation axes,
the R-axis holds the coordinates (angles) at execution start.
Y
Only the X, Y and Z coordinate values of the specified points are valid for PATH motion. Any other coordinates
use the coordinate values of the PATH motion START point.
The motion path can be connected by repeated PATH commands ("PATH L", "PATH C") to allow movement
without stopping.
O Notation Value
p1 to p6 Space-separated coordinate values for each axis
V 0
Hand system flag is not set.
Any value other than 1 / 2, or no setting.
f
1 Right-handed system is used to move to a specified position.
W 2 Left-handed system is used to move to a specified position.
X c CAUTION
The hand system used during PATH motion must be the same as the hand system used at the path motion
route's start point. The same applies if the path is to pass through points where hand system flags are set.
Differing hand systems will cause an error and disable motion.
Y
Notation: f1,2)YK-TW series with coordinate data in "mm" units -->
Z The first and second arm rotation information can be specified. (*1)
To set the rotation information, set "-1", "0", or "1" at f1 and f2.
Any other value or no setting will be processed as "0".
Indicates arm rotation information where movement to the "0" position has been specified.
0
Any value other than -1 / 0 / 1, or no setting.
f1, 2
1 Indicates arm rotation information where movement to the "1" position has been specified.
-1 Indicates arm rotation information where movement to the "-1" position has been specified.
c CAUTION
The first arm and second arm rotation information during PATH movement must be the same as the first arm and
second arm rotation information at the PATH movement's START point. If the two are different, an error will occur
and movement will be disabled..
t SCARA robots with a hand system flag set in the movement destination's coordinate data, the specified hand
A
system will have priority over the current arm type or LEFTY/RIGHTY setting.
Sample Description N
PATH L,10000 10000 1000 1000 0 0
………
Sets the linear interpolation movement path of robot 1 in "pulse" O
units.
IPATH L,150.000 250.000 10.000 30.000 0.000 0.000 1
………
The linear interpolation movement path of robot 1 is set in the P
coordinate values specified by the right-handed system in "mm"
units.
Q
Explanation Specifies the movement destination as <point expression> value. Two or more data items can be U
designated by separating them with a comma ( , ).
For circular interpolation movement, 2 points must be specified for each arc.
V
t SCARA robots with a hand system flag set in the movement destination's coordinate data, the specified hand
A W
system will have priority over the current arm type or LEFTY/RIGHTY setting.
X
c CAUTION
• The hand system used during PATH motion must be the same as the hand system used at the path motion
route's start point. The same applies if the path is to pass through points where hand system flags are set. Y
Differing hand systems will cause an error and disable motion.
• The first arm and second arm rotation information during PATH movement must be the same as the first arm
and second arm rotation information at the PATH movement's START point. If the two are different, an error will Z
occur and movement will be disabled.
Sample Description
PATH L,P1,P2,P3
………
Specifies sequential linear interpolation movement of robot 1 from
its current position to the positions specified by P1, P2 and P3
from its current position.
PATH C P5,P6,P7,P8
………
Specifies circular interpolation movement of robot 1 through the
following points: current position, P5, P6, and P6, P7, P8.
O
● Coordinate plane setting Linear interpolation Circular interpolation
P Format
XY
Q YZ
ZX
R
Reference "MOVE" statement (To use Sample program, replace "MOVE" in Sample to "PATH".)
S
● Port output setting Linear interpolation Circular interpolation
T Format 1
DO m(b, ..., b)= expression 1 @ expression 2
U MO
SO
V Format 2
DO (mb, ... ,mb)= expression 1 @ expression 2
W MO
SO
X Reference "MOVE" statement
Y Sample Description
PATH SET
PATH L,P1,DO(20)=1@10
Z ………
Specifies to output "1" to DO(20) at a 10mm radius position from the
START position during linear interpolation movement of robot 1 from
its current position to P1.
PATH L,P2,DO(21)[email protected]
………
Specifies to output "1" to DO(21) at a 12.5mm radius position from P1
during linear interpolation movement of robot 1 from its current
position to P2.
PATH END
PATH START
Format
PATH [robot number] END
N
Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
O
Explanation Ends the path setting of specified robot's PATH motion.
The PATH END command must always be paired with a PATH SET command. The PATH motion path P
end-point is the final point specified by the final PATH command (PATH L, PATH C) which exists
between the PATH SET and PATH END commands.
Attempting to execute a PATH END command when no PATH SET command has been executed will
Q
result in an error.
R
Sample Description
PATH END ………
Ends the path setting of robot 1's PATH motion S
Format
N Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
O
Explanation Starts the path setting of specified robot's PATH motion.
Specifies the <point definition> position as the PATH motion start-point. (This only sets the PATH
P motion start point and does not actually begin robot motion.) If the <point definition> value is omitted,
the current robot position is set as the start point.
However, if robot movement is in progress, the target position of that movement becomes the start point.
Q (Example: The OUT position range is wider for the MOVE command which precedes the PATH SET
command, so the robot is still moving when the PATH SET command is executed, etc.)
R The PATH SET command must always be paired with a PATH END.
S
c CAUTION
Be careful not to set the same position in the coordinates as the start point and the following path points.
If the position of each point is duplicated, an error might occur.
T n NOTE
The PATH SET statement is available in software version 1.11 onwards.
U
Point data setting types
● Point definition
V
Format
point expression
W
Explanation The PATH motion's start-point is specified by the <point expression>.
X
Y t SCARA robots with a hand system flag set in the movement destination's coordinate data, the specified hand
A
system will have priority over the current arm type or LEFTY/RIGHTY setting.
Z
c CAUTION
• The hand system used during PATH motion must be the same as the hand system used at the path motion
route's start point.Differing hand systems will cause an error and disable motion.
• The first arm and second arm rotation information during PATH movement must be the same as the first arm and
second arm rotation information at the PATH movement's START point. If the two are different, an error will occur
and movement will be disabled.
Sample Description
PATH SET P10 ……… The start-point of the PATH motion is set to P10.
PATH SET WHERE ………
The start-point of the PATH motion becomes the current position.
p1 p2 p3 p4 p5 p6 f f1 f2
Notation Value
N
p1 to p6 Space-separated coordinate values for each axis
f Hand system flag (SCARA robot only)
f1 First arm rotation information (YK-TW series only) O
f2 Second arm rotation information (YK-TW series only)
P
Explanation Directly specifies coordinate data by a numeric value. Units for the coordinate is as follows;
• Integer: "pulse" units
• Real number (with decimal point): "mm/deg." units
Q
• Integers and real numbers (mixed): All coordinate values will be handled in "mm/deg." units.
R
Notation: f ) SCARA robots with coordinate data in "mm" units --> Hand system flags can be specified. (*1)
To set the hand system flag, set either 1 or 2 at "f".
If a number other than 1 or 2 is set, or if no number is designated, 0 will be set to indicate that there is S
no hand system flag.
0
Hand system flag is not set. T
Any value other than 1 / 2, or no setting.
f
1 Indicates that a right-handed system is specified for the PATH motion's start-point
2 Indicates that a left-handed system is specified for the PATH motion's start-point.
U
c CAUTION
The hand system used during PATH motion must be the same hand system as that at the PATH motion's start- V
point. An error will occur if the hand systems are different.
W
Notation: f1,2)YK-TW series with coordinate data in "mm" units -->
The first and second arm rotation information can be specified. (*1)
To set the rotation information, set "-1", "0", or "1" at f1 and f2.
X
Any other value or no setting will be processed as "0".
0
Indicates arm rotation information where movement to the "0" position has been specified. Y
Any value other than -1 / 0 / 1, or no setting.
f1, 2
1 Indicates arm rotation information where movement to the "1" position has been specified.
-1 Indicates arm rotation information where movement to the "-1" position has been specified.
Z
c CAUTION
The first arm and second arm rotation information during PATH movement must be the same as the first arm and
second arm rotation information at the PATH movement's START point. If the two are different, an error will occur
and movement will be disabled.
t SCARA robots with a hand system flag set in the movement destination's coordinate data, the specified hand
A
system will have priority over the current arm type or LEFTY/RIGHTY setting.
O
Related commands PATH, PATH END, PATH START
P
Format
Value Range N
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Option STOPON condition setting, CONTON condition setting, CONT setting
O
Options PTP Remarks
O Sample Description
PATH START,STOPON DI(20)=1
P ………
Robot 1 starts PATH movement, if the "DI (20) = 1" condition is met
during movement, a deceleration and stop occurs, and the next step is
then executed.
Q Reference "MOVE" statement
Sample Description
T PATH START,CONTON DI(20)=1
………
Robot 1 starts PATH movement, if the "DI (20) = 1" conditions are met
U during movement, robot starts decelerating and executes the next step.
V
● CONT setting (Continuous motion)
Format
W CONT
Sample Description
X PATH START,CONT
MOVE P,P10 ………
PATH motion starts, and movement to P10 begins after the moving
Y axes enter the deceleration zone of final PATH motion.
Format
PDEF(Pallet definition number) = expression 1, expression 2
, expression 3, point definition
N
Value Range / Meaning
Pallet Definition Number 0 to 39 O
Expression 1 Number of elements (NX) between P[1] and P[2] Total number of elements:
<expression 1> × <expression 2> × P
Expression 2 Number of elements (NY) between P[1] and P[3]
<expression 3> must be 32,767 or
Expression 3 Number of elements (NZ) between P[1] and P[5] less.
Q
The point used for a pallet definition.
Point definition
Continuous 5 points starting with the specified point are used.
R
Explanation Defines the pallets to permit execution of the pallet movement command: changes the contents of
definition for previously defined pallet data. S
After specifying the number of points per axis, the equally-spaced points for each axis are automatically
T
calculated and defined in the sequence shown in the figure below.
Sample Description
PDEF(1)=3,4,2,P3991
………
Pallet definition 1 is defined as 3 x 4 x 2 by using P3991 to P3995.
Format
N Value Range
Program Number 1 to 100
O
Explanation Acquires the task number in which the program specified by <program number> is registered.
P
Q
If the program number which is not registered in the task is specified, "3.203: Program doesn't exist" error occurs.
R
Sample Description
S A = PGMTSK(1) ………
Assigns the task number in which the program number 1's
program is registered to variable A.
Format
Value Range N
Program Name 32 characters or less consisting of alphanumeric characters and underscore ( _ )
O
Explanation Acquires the program number of the program specified by <program name>.
The program name must be enclosed in double quotation marks ( " ). P
Sample Description
Q
A = PGN("PG _ SUB") ………
The program number of PG _ SUB is assigned to variable A.
R
Related commands PGMTSK, TSKPGM
Format
Explanation Executes "pallet move" command of the specified axes. (The specified pallet numbers must be registered
T in advance.)
It is not enabled for axes of other robots or for auxiliary axes.
X NX*NY*NZ
NY
Y NX*NY*(NZ-1)+1
NX*NY*(NZ-1)+1 NX*NY*(NZ-1)+NZ
NX*NY*(NZ-1)+NZ
P[5]
P[3] P[4]
Z NZ NX*(NY-1)+1 NX*NY
NX+1 NX*2
P[2]
1 2 ... NX
P[1]
NX
cquires the XYZ axes move to the position determined by calculated values, the R attribute axis moves to the
A
position specified by pallet point data P [1].
Sample Description
PMOVE(1,16) ………
Robot 1 moves from its current position to the position
specified by pallet position number 16 of pallet definition
number 1.
Signal output (DO, etc.) Signal is output when the axis enters within OUT position range. S
DELAY DELAY command is executed and standby starts, when the axis enters the OUT position range.
HALT
Program stops and is reset when the axis enters the OUT position range. Therefore, the axis T
movement also stops.
All programs in execution stop when axis enters the OUT position range, task 1 is reset, and other
HALTALL
tasks terminate. Therefore, the movement also stops. U
Program temporarily stops when the axis enters the OUT position range. Therefore, the axis
HOLD
movement also stops.
HOLDALL
All programs in execution temporarily stop when the axis enters the OUT position range. V
Therefore, the movement also stops.
WAIT WAIT command is executed when the axis enters the OUT position range.
W
The WAIT ARM statement is used to execute the next command after the axis enters the tolerance range.
X
PMOVE(0,1) PMOVE(0,1)
Target position
DO(20)=1 WAIT ARM
DO(20)=1 Y
P1
Z
Tolerance
OUT position
DO(20) turns ON DO(20) turns ON
PMOVE(0,1) PMOVE(0,1)
Target position
HOLD WAIT ARM
HOLD
Tolerance
OUT position
HOLD execution HOLD execution
(program temporarily stops) (program temporarily stops)
O Value Range
Expression 1 to 100 (units: %)
P
Explanation Specifies the program speed in an <expression>.
Robot max. speed (mm/sec or deg/sec) × automatic movement speed (%) × program movement speed S (%)
Q
"S" setting superimposes the speed on the current automatic movement speed.
R automatic movement speed (%) × program movement speed S (%) = actual speed (%)
100% 50% 50%
50% 50% 25%
S
n NOTE
This option specifies only the maximum speed and does not guarantee the movement at the specified speed.
T • Automatic movement speed: Specified by programming box operation or by the ASPEED command.
• Program movement speed: Specified by SPEED commands or MOVE, DRIVE speed settings.
U Sample
Description
(Automatic movement speed: 80%)
PMOVE(1,3),S=50 ………
Robot 1 moves from its current position to the
V position specified by pallet position number 3 of
pallet definition number 1
at 50% (Actual speed is 40%) of the program speed.
W
x = expression, x = expression...
Value Range
N
X Specifies the Z,R,A,B axis.
An integer value is processed in "pulse" units.
Expression
A real number (with decimal point) is process in "mm/deg." units. O
Explanation 1. The "x" specified axis begins moving toward the position specified by the <expression> ("1" shown in P
the figure below).
2. When the axis specified by "x" moves the arch distance 1 or more, other axes move to their target
positions ("2" shown in the figure below).
Q
3. The axis specified by "x" moves to the target position so that the remaining movement distance becomes
the arch distance 2 when the movement of other axes is completed ("3" shown in the figure below). R
4. The command ends when all axis enter the OUT position range.
S
The Value specified in <expression> is based on the robot coordinates. Settings such as hand definition and work
definition are not considered.
T
Sample Description
U
PMOVE(1,A),Z=0 ………
First the Z-axis of robot 1 moves from the current position to
the "0 pulse" position. Then the other axes of robot 1 move to the
position specified by pallet position number A of pallet definition V
number 1. Finally the Z-axis of robot 1 moves to the position
specified by pallet position number A.
W
2. Other axes movement
Z=0 X
Arch distance 1
Arch distance 2
1. Z-axis movement 3. Z-axis movement
Y
Current position Target position
Z
N Sample Description
PMOVE(A,16),STOPON DI(20)=1 ………
Robot 1 moves to the position specified by pallet
position number 16 of pallet definition number A,
O then decelerates and stops when DI(20) turns ON (the
condition "DI(20) = 1" is met).
PMOVE(A,17) ………PTP movement to 17; Execution of the next step
P
Reference "MOVE" statement
R
● CONT setting (Continuous Motion)
Format
S
CONTON conditional expression
T Sample Description
PMOVE(A,16),CONTON DI(20)=1 ………
While robot 1 moves to the position specified by pallet
U position number 16 / pallet definition number A,
if DI(20) turns ON (the condition "DI(20) = 1" is met),
the robot starts decelerating and executes the next step.
V Reference "MOVE" statement
X
Related commands PDEF
Format
LET Pn = p1 p2 p3 p4 p5 p6 f f1 f2
N
Notation Value Range
n Point number 0 to 29999 O
p1 to p6 Point data According to the format
f Hand system flag 1 or 2 (for SCARA robots only)
f1 First arm rotation information -1, 0, 1 (YK-TW series only) P
f2 Second arm rotation information -1, 0, 1 (YK-TW series only).
Q
Explanation Defines the point data.
R
1: "n" indicates the point number.
2: Input data for "p1" to "p6" must be separated with a space (blank).
3.: If all input data for "p1" to "p6" are integers (no decimal points), the movement units are viewed as S
"pulses". "p1" through "p6" then correspond to axis 1 through axis 6.
4: I f there is even 1 real number (with decimal point) in the input data for "p1" through "p6", the
T
movement units are recognized as "mm".
5: The input data ranges are as follows:
For "pulse" units: -6,144,000 to 6,144,000 range U
For "mm" units: -99,999.99 to 99,999.99 range
n NOTE
If both integers and real numbers are used together (mixed), all coordinate values will be handled in "mm/deg"
V
units.
W
Notation: f ) SCARA robots with coordinate data in "mm" units --> Hand system flags can be specified. (*1)
To set the hand system flag, set either 1 or 2 at "f".
If a number other than 1 or 2 is set, or if no number is designated, 0 will be set to indicate that there is
X
no hand system flag.
0
Hand system flag is not set. Y
Any value other than 1 / 2, or no setting.
f
1 Point setting in Right-handed system
2 Point setting in Left-handed system
Z
Q n NOTE
• All input values are handled as constants.
• If controller power is turned off during execution of a point definition statement, a memory-related error such as
"9.702: Point data destroyed" may occur.
R
Format
N
Explanation Creates the point data specified by the pallet definition number and the pallet position number.
O
Sample Description
P10=PPNT(1,24) ………
Creates, at P10, the point data specified by pallet position P
number 24 of pallet definition number 1.
Q
Related commands PDEF, PMOVE
Format
PRINT expression , expression... ,
; ;
N
Value Contents
Q 1: If numbers or character strings are specified in an <expression>, they display as they are. If variables
or arrays are specified, the values assigned to the specified variables or arrays display.
R 2: If no <expression> is specified, only a line-feed occurs.
3: If the data length exceeds the screen width, a line-feed occurs, and the data is displayed on the next
line.
S 4: If a comma ( , ) is used as a display delimiter, a space (blank) is inserted between the displayed items.
5: If a semicolon ( ; ) is used as a display delimiter, the displayed items appear in succession without
T being separated.
6: If the data ends with a delimiter, a line-feed does not occur. When not ended with a display delimiter,
a line-feed occurs with a display delimiter, a line-feed occurs.
U
V • Data communication to the programming box screen occurs in order for the PRINT statement to be displayed
there. Therefore, program execution may be delayed when several PRINT statements are executed consecutively.
• On the programming box, the PRINT statement is displayed on "Message" space in "Automatic Operation (ALL
W TASK)" screen.
X Sample Description
PRINT A ………
Displays the value of variable A.
Y PRINT "A1 =";A1 ………
Displays the value of variable A1 after "A1 =".
PRINT "B(0),B(1) = ";B(0);",";B(1)
PRINT P100 ………
Displays the P100 value.
Z
Related commands INPUT
Format
Value Range O
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Axis Number 1 to 6
Expression -1000 to 1000 (unit: %)
P
Explanation Changes the "push force" parameter of the specified axis to the value of <expression>.
Q
If the "F" option is omitted in the PUSH statement, the pushing control is executed with the setting of the
pushing thrust parameter. R
Actual pushing thrust is as follows.
• Rated thrust x <expression> / 100 S
Sample Description U
PSHFRC (1) = 10 ………
Changes the pushing thrust parameter of axis 1 of robot 1 to
10%.
V
W
Functions
X
Format
Value Range
Z
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Axis Number 1 to 6
Explanation Acquires the value of "push force" parameter of the specified axis.
Sample Description
A=PSHFRC (1) ………
The pushing thrust parameter of axis 1 of robot 1 is assigned to
variable A.
Format
Q Explanation Changes the "push judge speed" parameter of the specified axis to the value of the <expression>.
If the push judge speed parameter is enabled, a pushing operation is detected only when the movement
R speed is below <expression> with the pushing thrust in the PUSH statement at the specified value.
T 1 to 100: The movement speed in the PUSH statement is 100% to specify thresholds with a rate.
Sample Description
U PSHJGSP (1) = 50 ………
Changes the push judge speed parameter of axis 1 of robot 1
to 50%.
W
Functions
X
Format
Z Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Axis Number 1 to 6
Explanation Acquires the value of "push judge speed" parameter of the axis specified by <axis number>.
Sample Description
A=PSHJGSP (1) ………
The pushing detection speed threshold parameter of axis 1 of
robot 1 is assigned to variable A.
Format
Explanation Changes the "push method" parameter of the specified axis to the value of the <expression>.
Q
The pushing type in the PUSH statement can be specified as follows by the <expression>. R
0: T
he time for the pushing thrust to reach the specified value is totalized to execute the pushing
control end detection.
1: T
he pushing control end detection is executed only when the pushing thrust continuously reaches S
the specified value. If the pushing thrust is lower than the specified value, the elapsed time is reset to
0.
T
In format 1, the change occurs at all axes.
In format 2, the change occurs at the parameter of the axis specified by <axis number>. U
Sample Description
V
PSHMTD (1) = 1 ………
Changes the push method parameter of axis 1 of robot 1 to the
resetting method.
W
X
Functions
Y
Format
Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Axis Number 1 to 6
Explanation Acquires the value of "push method" parameter of the axis specified by <axis number>.
Sample Description
A=PSHMTD (1) ………
The pushing method parameter of axis 1 of robot 1 is assigned to
variable A.
Format
N Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
O Axis Number 1 to 6
P Explanation Acquires the end status of PUSH statement executed for the axis.
0: The PUSH statement was ended for a reason other than the arrival of the pushing time.
Q 1: The PUSH statement was ended by the arrival of the pushing time.
R Sample Description
PUSH(3,P1) ………
Moves the axis 3 of robot 1 is under the pushing control to
the position specified with P1.
S IF PSHRSLT(3) = 1 THEN
………
Ended by the arrival of the pushing time.
T GOTO *OK
ELSE ………
Ended for a reason other than the arrival of the pushing
time.
U GOTO *NG
ENDIF
Format
Sample Description
V
PSHSPD (1) = 50 ………
Changes the push speed parameter of axis 1 of robot 1 to
50%.
W
X
Functions
Y
Format
Explanation Acquires the "push speed" parameter value of the axis specified by <axis number>.
Sample Description
A=PSHSPD (1) ………
The push speed parameter of axis 1 of robot 1 is assigned to
variable A.
Format
O Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Axis Number 1 to 6
P Expression 1 to 32767 (unit: ms)
Q Explanation Changes the "push time" parameter of the specified axis to the value indicated in <expression>.
If the TIM option is omitted in the PUSH statement, the pushing control is executed with the setting of
R the push time parameter.
In format 1, the change occurs at all axes.
In format 2, the change occurs at the axis specified by the <axis number>.
S
Sample Description
T PSHTIME (1) = 1000 ………
Changes the push time parameter of axis 1 of robot 1 to
1000 ms.
V
Functions
W Format
Z
Explanation Acquires the value of "push time" parameter of the axis specified by the <axis number>.
Sample Description
A=PSHTIME (1) ………
The push time parameter of axis 1 of robot 1 is assigned to
variable A.
Format
P
Explanation Executes an absolute position movement of the specified axis with controlling the pushing thrust in the
forwarding direction.
Q
• Movement type : Pushing PTP movement of specified axis
• Point data setting : Direct coordinate data input, point definition R
• Options : Pushing thrust setting, pushing time, pushing speed setting,
STOPON condition setting, CONTON condition setting
S
T
Movement type
U
● PTP (point-to-point) of specified axis
PTP movement begins after the operation of the axis specified by the <axis number> is completed (within the
tolerance range), controlling the pushing thrust in the forwarding direction of the axis.
V
The conditions to cancel the pushing thrust (to cancel the torque value defined by PUSH statement) are as
follows.
•W
hen PUSH command finishes and then either of movement commands below is executed. Note that only
finishing PUSH command is not enough to cancel the pushing thrust
1. In push status at PUSH command finish
When the target axis starts to move in the opposite direction of that specified by PUSH
statement
2. The target axis moves to the target position at PUSH command finish (not in push status)
When the target axis starts to move either direction
• When a servo off occurs
• When the power source to the controller is interrupted and restarted
Example:
N Signal output (DO, etc.) Signal is output when the pushing conditions are satisfied or within the tolerance range.
DELAY command is executed and standby starts, when the pushing conditions are satisfied or
DELAY
within the tolerance range.
O Program stops and is reset when the axis enters the OUT position range. Therefore, the axis
HALT
movement also stops.
P HALTALL
When the pushing conditions are satisfied or within the tolerance range, the programs in
execution are all stopped, task 1 is reset, and other tasks are terminated. Therefore, the axis
movement also stops.
Program temporarily stops when the axis enters the OUT position range. Therefore, the axis
Q HOLD
movement also stops.
When the pushing conditions are satisfied or within the tolerance range, the programs in
HOLDALL
execution are all temporarily stopped. Therefore, the axis movement also stops.
R WAIT command is executed, when the pushing conditions are satisfied or within the tolerance
WAIT
range.
S Sample Description
PUSH(1,P0) ………
A xis 1 of robot 1 moves from its current position to the position
T specified by P0.
● Point definition
Point data is specified in <expression>. The axis data specified by the <axis number> is used. If the point
expression is in "mm/degrees" units, movement for each axis occurs from the 0-pulse position to the pulse-
converted position.
Sample Description
PUSH(1,P1) ………
A xis 1 of robot 1 moves from its current position to the
position specified by P1.
PUSH[2](2,P90) ………
A xis 2 of robot 2 moves from its current position to the
position specified by P90 (deg.) (when axis 2 is a rotating axis.)
Value Range O
Expression -1000 to 1000 (units: %)
P
Explanation The pushing thrust in the forwarding direction of an axis is specified as an <expression>.
The actual pushing thrust is determined as shown below.
• Rated thrust x <expression>/100
Q
If <expression> is omitted, pushing thrust value specified with the parameter is used.
R
Sample Description
PUSH(1,10000),F=10
S
………
A xis 1 of robot 1 moves from its current position to the 100000 pulse
position with the pushing thrust at 10% of the rated thrust.
T
V
● Pushing time setting
Format
W
TIM = expression
Value Range X
Expression 1 to 32767 (units: ms)
Y
Explanation The time to keep pushing with the specified pushing thrust is specified as an <expression>.
When the status where the pushing thrust reaches the specified value exceeds <expression>, the PUSH
statement terminates. Z
If this option is omitted, the setting of the parameter is used.
Sample Description
PUSH(1,10000),TIM=5000
………
A xis 1 of robot 1 moves from its current position to the 100000 pulse
position with keeping pushing for 5 seconds.
R Sample Description
PUSH(1,10000),S=10
S ………
A xis 1 of robot 1 moves from its current position to the 100000 pulse
position with the speed at 10% of the multiplication of the push speed
and the automatic movement speed.
V Format
1. DSPEED = expression
W 2. DS = expression
Value Range
X Expression 0.01 to 100.00 (units: %)
Sample Description
PUSH(1,10000),DS=0.1
………
A xis 1 moves of robot 1 from its current position to the 100000 pulse
position with the speed at 0.1% of the pushing movement speed.
Sample Description
N
PUSH(1,10000),STOPON DI(20) = 1
………
A xis 1 of robot 1 moves from its current position toward the "10000
pulses" position and stops at an intermediate point if the "DI (20) = 1" O
condition is met. The next step is then executed.
Q
● CONT setting (Continuous Motion)
Format R
CONTON conditional expression
S
Sample Description
PMOVE(1,P1),CONTON DI(20)=1 ………
A xis 1 of robot 1 moves from its current position toward
the "P1" position. When "DI (20) = 1" conditions are met, T
the robot starts deceralating and executed the next step.
Format
RADDEG(expression)
N Value Contents
Expression Angle (units: radians)
O
Explanation Converts the <expression> value to degrees.
P
Sample Description
Q
LOC4(P0)=RADDEG(ATN(B))
………
Converts the variable B arctangent value to degrees, and assigns it to
R 4th-axis data of P0.
Format
REFTSK(task number )
Value Range N
Task Number Variable can be specified
R
Explanation Acquires the state of the specified task.
The return value is acquired depending on the status. S
Reference for Each task status: Chapter 6 "Task status and transition"
V
SAMPLE 1: Starting task 2
W
A% = REFTSK(2) ……… Acquires the status of task 2
IF A% = -1 THEN ……… I
f task 2 is unregistered (NON EXISTENT),
START <SUB _ PGM>,T2 makes task 2 start. X
ELSE
‘Processes in case that task 2 is not started
ENDIF
Y
SAMPLE 2: Processing the own task after completing the process of task 2
Z
WAIT REFTSK(2) <= 0 ………Waits until task 2 is stopped (STOP) or
‘The following: unregistered (NON EXISTENT) staus.
processing for own task
Format
1. REM character string
2. ' character string
N
Explanation All characters which follow REM or an apostrophe (') are handled as a comment.
O
This comment statement is used only to insert comments in the program, and it does not execute any
command. REM or an apostrophe (') can be entered at any point in the line.
P
Sample Description
Format 1
RESET DOm(b, ..., b)
DO(mb, ..., mb)
MOm(b, ..., b)
N
MO(mb, ..., mb)
TOn(b, ..., b) O
TO(nb, ..., nb)
LOn(b, ..., b) P
LO(nb, ..., nb)
SOm(b, ..., b) Q
SO(mb, ..., mb)
R
Format 2
RESET TCOUNTER
S
Y
Explanation Format 1: Turns the bits of specified ports OFF.
Format 2: Clears the 1ms counter variables
(1ms counter variables are used to measure the time in 1ms units). Z
Sample Description
RESET DO2() ………
Turns OFF DO(27 to 20).
RESET DO2(6,5,1) ………
Turns OFF DO(26, 25, 21).
RESET (37,35,27,20) ………
Turns OFF DO(37, 35, 27, 20).
RESET TCOUNTER ………
Clears the 1ms counter variables.
Format
RESTART Tn
<program name>
N
PGm
Explanation Restarts another task that has been temporarily stopped (SUSPEND status).
Q A task can be specified by the name or the number of a program in execution.
The program name must be enclosed in < > (angle brackets).
R
If a task (program) not temporarily stopped is specified and executed, an error occurs.
S
T Sample Description
Main task
START <SUB _ PGM>,T2 ……Registers program i.e. SUB _ PGM in Task 2 and starts it
U FLAG=1 ……Execution set for exclusive control flag 1
*L0:
IF FLAG=1 AND DI2(0)=1 THEN ……If flag 1 and DI2(0) are ON
V SUSPEND T2 ……Pauses Task 2
FLAG=2 ……
Substitutes 2 for FLAG
(execution set for exclusive control flag 2)
W WAIT DI2(0)=0 ……Waits until DI2(0) turns OFF
ENDIF
IF FLAG=2 AND DI2(0)=1 THEN ……If flag 2 and DI2(0) are ON
X RESTART T2 ……Restarts Task 2
FLAG=1 ……Execution set for exclusive control flag 1
WAIT DI2(1)=0 ……Waits until DI2(1) turns OFF
Y ENDIF
MOVE P,P0
MOVE P,P1
Z GOTO *L0
HALTALL
Format
1. RESUME
2. RESUME NEXT
N
3. RESUME label
O
Explanation Resumes program execution after recovery from an error.
Depending on its location, a program can be resumed in the following 3 ways: P
1. RESUME The program resumes from the command which caused the error.
2. RESUME NEXT The program resumes from the next command after the command which caused the
Q
error.
3. RESUME label The program resumes from the command specified by the <label>. R
S
• The RESUME statement can also be executed in an error processing routine..
• Error recovery processing is not possible for serious errors such as "17.800 : Motor overload".
T
Reference "ON ERROR GOTO"
U
Related commands ON ERROR GOTO
V
GOSUB label
N :
label:
O :
RETURN
P
Explanation Ends the subroutine and returns to the next line after the jump source GOSUB statement.
Q
• Jump to a subroutine by a GOSUB statement;
R the subroutine (jump destinations) must end by a RETURN statement.
• Jump from a routine by a GOTO statement; an error such as "5.212: Stack overflow" may occur.
T Sample Description
*ST: ………Main program (label definition)
MOVE P,P0
U GOSUB *CLOSEHAND ………Jumps to Subroutine *CLOSEHAND
MOVE P,P1
GOSUB *OPENHAND ………Jumps to Subroutine *OPENHAND
V GOTO *ST ………Jumps to Main program *ST
HALT
’SUB ROUTINE (Comment) The following is a subroutine
W *CLOSEHAND: ………Subroutine *CLOSEHAND label definition
DO(20) = 1 ………When DO(20) is turned ON
RETURN ………Executs from the next line of GOSUB statement *CLOSEHAND
X *OPENHAND: ………Subroutine *OPENHAND label definition
DO(20) = 0 ………When DO(20) is turned OFF
RETURN ………Executs from the next line of GOSUB statement *OPENHAND
Y
Related commands GOSUB
Z
Format
Value Range N
Expression 0 to 255
O
Explanation This function extracts a character string with the digits specified by the <expression> from the right end
of the character string specified by <character string expression>. P
• If the <expression> value is out of the range of 0 - 255; an error will occur.
• If the <expression> value is 0; the extracted character string will be a null string (empty character
Q
string).
• If the <expression> value has more characters than the <character string expression>; R
extracted character string will become the same as the <character string expression>.
S
Sample Description
B$=RIGHT$(A$,4) ………
4 characters from the right end of A$ are assigned to B$. T
Format
N
Value Range
Q •T
his statement only selects the hand system, and does not move the robot. If executed.
• While the robot arm is moving, execution waits until movement is complete (positioned within
R tolerance range).
• This command is only valid for SCARA robots.
S
Sample Description
T RIGHTY ………Specifies the hand system of robot 1 as a right-handed
system.
MOVE P,P1 ………(1)
U LEFTY ………Specifies the hand system of robot 1 as a left-handed
system.
MOVE P,P1 ………(2)
V RIGHTY ………Specifies the hand system of robot 1 as a right-handed
system.
HALT
W
X SAMPLE:LEFTY/RIGHTY
P1
Y
(2) (1)
SCARA robot
Format
RSHIFT(expression 1, expression 2)
N
Explanation Shifts the <expression 1> bit value to the right by the amount of <expression 2>.
Spaces left blank by the shift are filled with zeros (0).
O
Sample Description P
A=RSHIFT(&B10111011,2)
………
The 2-bit-right-shifted &B10111011 value (&B00101110) is assigned to A. Q
R
Related commands LSHIFT
Format
N
Value Range
R Sample Description
SCRINR 100 ………
Sets "R axis inertia for SCARA" parameter of robot 1 to 100.
SCRINR[2] 200 ………
Sets "R axis inertia for SCARA" parameter of robot 2 to 200.
S
U
Functions
V Format
Y
Explanation This function acquires the value of "R axis inertia for SCARA" parameter of specified robot.
Z Sample Description
A% = SCRINR ………
The "R axis inertia for SCARA" parameter of robot 1 is assigned
to the variable A%.
A% = SCRINR[2] ………
The "R axis inertia for SCARA" parameter of robot 2 is assigned
to the variable A%.
Format
SELECT CASE expression
CASE expression list 1
command block 1 N
CASE expression list 2
command block 2
: O
CASE ELSE
command block n P
END SELECT
Sample of <expression> S
DI(24,23,22,21,20):
Recognizes the specified I/O for 5 bit in binary and executes the corresponding <command block> in the <expression list>. T
ABC%: Specifies a variable. It executes the <command block> in the <expression list> according to the variable value.
Explanation These statements execute multiple command blocks in accordance with the <expression> value. U
If the <Expression> value matches one of expressions contained in the <expression list>
The specified command block is executed. After executing the command block, the program jumps to
V
the next command which follows the END SELECT statement.
W
If the <expression> value does not match any of the expressions contained in the <expression list>
The command block indicated after the CASE ELSE statement is executed. After executing the command
block, the program jumps to the next command which follows the END SELECT statement.
X
If the <expression> value does not match any of the expressions contained in <expression list> and no Y
CASE ELSE statement exists
The program jumps to the next command following the END SELECT statement.
Z
Sample Description
WHILE 1
SELECT CASE DI3(7,6,5,4,3,2,1,0) ………
Executes each command block according to
CASE &B00000001 the input status of DI3(8 bits)
MOVE P,P1 ………Command block when DI3(0) is ON
CASE &B00000010 ………When DI3(1) is ON
MOVE P,P2
CASE &B00000011 ………When DI3(0) and DI3(1) is ON
MOVE P,P3
CASE ELSE ………Case other than the above
MOVE P,P0
END SELECT ………Ends SELECT CASE statement
WEND
Format
N
Explanation Sends <read-out file> data to the <write file>.
O
• An entire DO, MO, TO, LO, SO, or SOW port (DO(), MO(), etc.), cannot be specified as a write file.
• Some individual files (DOn(), MOn(), etc.) cannot be specified as a write file.
P Reference Chapter 10 "Data file description"
•W
riting to read-only files (indicated by a "--" in the "Write" column of the table shown below) is not
permitted.
Q • E ven if the read-out/write files are specified correctly, it may not be possible to execute them if there is
a data format mismatch between the files.
R
n NOTE
1. Examples of erroneous writing to a read-only file:
• SEND CMU TO DIR • SEND PNT TO SI()
S
2. Examples of data format mismatches:
• SEND PGM TO PNT • SEND SI() TO SFT
T
Definition Format
Type File Name Read-out Write
All Individual File
U User All file ALL --------------- 3 3
<bbbbbbbb>
PGM
V Program
PGn
3 3
Point PNT Pn 3 3
Point comment PCM PCn 3 3
W Point name PNM PNn 3 3
Parameter /cccccccc/
X PRM #cccccccc# 3 3
\cccccccc\
Shift coordinate definition SFT Sn 3 3
Y Hand definition HND Hn 3 3
Work definition WRKDEF Wn 3 3
V
The following cautions apply when a restart is performed after a stop occurred during execution of the SEND statement.
1. W
hen reading from RS-232C / Ethernet (SEND CMU TO XXX, SEND ETH TO XXX):
When the SEND statement is stopped during data reading from the reception buffer, the data acquired up to that W
point is discarded.
2. W
hen writing to RS-232C / Ethernet (SEND XXX TO CMU, SEND XXX TO ETH):
When the SEND statement is stopped during data writing to the transmission buffer, the data is written from the
X
beginning.
Y
Sample Description
Z
SEND PGM TO CMU ………
Outputs all user programs from the RS-232C port.
………
Outputs the PRG1 program from the RS-232C port.
SEND <PRG1> TO CMU ………
Inputs a point data file from the RS-232C port.
………
Outputs the "T1" character string from the RS-232C port.
SEND CMU TO PNT ………
Inputs character string data to variable A$ from the RS-
232C port.
SEND "T1" TO CMU
SEND CMU TO A$
Format
SERVO [robot number] ON (axis number)
OFF
N FREE
O Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Axis Number 1 to 6 (• Multiple axes not specifiable • If not input, all axes are specified.)
P
Q Explanation This command controls the servo ON/OFF at the specified axes or all axes.
R SERVO
SERVO Motor power Dynamic brake
Electromagnetic
command brake
ON ON ON OFF OFF
S OFF
OFF OFF ON ON
(During all axes servo OFF)
U c CAUTION
• Always check that the Emergency Stop is ON and Servo is OFF when working within the robot movement
range.
• Electromagnetic brake is the brake to prevent the vertical axis from sliding downward. The vertical axis will
V slide downward when the servo is FREE, causing a hazardous situation.
X
• This command is executed after the operation of all axes of the specified robot has been complete (after positioned
within the tolerance).
Y • The motor power is a power supply unit for robot (motor) in the controller.
• The dynamic brake controls the motor by using the electric power which is generated in the motor when the servo
is turned OFF.
Z
Sample Description
SERVO ON ………
Turns servos ON at all axes of robot 1.
SERVO OFF ………
Turns the servo OFF and applies the dynamic brake at all axes of
robot 1. Axes equipped with brakes are all locked by the brake.
………
Turns servos OFF at axis 3 (Z-axis) of robot 1, and releases the
SERVO FREE(3) brake.
Format
SET DOm(b, ..., b) , time
DO(mb, ..., mb)
MOm(b, ..., b)
N
MO(mb, ..., mb)
TOn(b, ..., b) O
TO(nb, ..., nb)
LOn(b, ..., b) P
LO(nb, ..., nb)
SOm(b, ..., b) Q
SO(mb, ..., mb)
R
Notation Value Range
m Port Number 2 to 7, 10 to 17, 20 to 27
S
n Port Number (TO, LO) 0, 1
The pulse output time (unit: ms) is specified by the <time> value. Y
The program execution is WAIT status while the output is ON. When the specified time elapses, the
output is turned OFF, and the execution ends.
Z
If no hardware port exists, nothing is output.
Sample Description
SET DO2() ………
Turns OFF DO(27 to 20).
SET DO2(6,5,1),200 ………
DO(26,25,21) switches ON for 200 ms.
SET DO(37,35,27,20) ………
Turns DO(37, 35, 27, 20) ON.
Format
T
When Server mode is selected,
U • IP address: IP address already set on the controller is used to communicate, so IP address setting is unnecessary. (The
IP address set by <IP address> is invalid in this case.)
• Port number: Set a port number which differs from the one on the controller.
V When Client mode is selected,
• IP address and port number: Set the IP address and port number of the connection destination server.
W
Sample Description
X IPADRS$="192.168.0.100"
………
Assigns the IP address(192.168.0.100) of the server to
connect to variable IPADRS$.
Y SETGEP 1, 1, IPADRS$, 100, 0, 0
………
Sets the conditions below on General Ethernet Port 1.
Z • Mode: client
•
IP address of the server to connect to:
192.168.0.100
• Port number of the server to connect to: 100
• Termination code : CRLF
OPEN GP1 ………
Connects the server specified at General Ethernet Port 1.
………
Sends the character strings "123" from General Ethernet Port
1.
SEND "123" TO GP1 ………
Disconnects from the server specified at General Ethernet
Port 1.
CLOSE GP1
Format
SGIn=xxxxxx
P
Explanation Assigns xxxxxx to the integer type static variable (SGI) specified by "n". If a real number with decimal
point is specified at xxxxxx, assigns a value with decimal fractions truncated.
Q
Sample Description R
SGI1=300 ………
Assigns 300 to SGI1.
V
Functions
Format
W
SGIn
X
Notation Value Range
n Integer Type Static Variable Number 0 to 31
Y
Explanation Acquires the value of the integer type static variable (SGI) specified by "n". Z
Sample Description
A%=SGI1 ………
Assigns the value of SGI1 to variable A%.
Format
SGRn=xxxxxx
R
Explanation Assigns xxxxxx to the real type static variable (SGR) specified by "n".
S
Sample Description
T SGR1=1320.355 ………
Assigns 1320.355 to SGR1.
V
Functions
W
Format
X SGRn
Z Explanation Acquires the value of the real type static variable (SGR) specified by "n".
Sample Description
A!=SGR1 ………
Assigns the value of SGR1 to variable A!.
Format
N
Explanation This statement allows variables declared with a program level code to be referenced with a sub-
procedure without passing on the variables as dummy arguments.
O
The program level variable used by the sub-procedure is specified by the <variable> value.
A simple variable or an array variable followed by parentheses is specified. If an array is specified, that
entire array is selected P
n NOTE
The program level code is a program written outside the sub-procedure.
Q
R
• Normally, a dummy argument passes along the variable to a sub-procedure, but the SHARED statement allows
referencing to occur without passing along the dummy argument.
• The SHARED statement allows variables to be shared only between a program level code and sub-procedure
S
which are within the same program level
T
Sample Description
U
DIM Y!(10)
X!=2. 5 V
Y!(10)=1. 2
CALL *DISTANCE
CALL *AREA W
HALT
SUB *DISTANCE
SHARED X!,Y!( ) ………
Variable referencing is declared by SHARED. X
PRINT X!^2+Y!(10)^2 ………
The variable is shared.
END SUB
SUB *AREA Y
DIM Y!(10)
PRINT X!*Y!(10) ………
The variable is not shared.
END SUB Z
Format
SHIFT [robot number] shift variable
OFF
N
Value Range
O Robot Number 1 to 4 (If not input, robot 1 is specified.)
P Explanation Sets the shift coordinates specified by <shift variable> to the robot specified by <robot number>.
When OFF is specified, the coordinates shift by <shift variable> does not occur.
R • This statement is executed after axis positioning is complete (within the tolerance range).
• When OFF is specified, it is the same as the setting: 0.000 at each X, Y, Z and rotation direction-offset by the <shift
variable>.
S
T
Sample Description
U SHIFT S1 ………
Shifts the coordinate of robot 1 to the "shift 1" coordinate.
MOVE P,P20
W HALT
Format
LET expression = SIm(b, ..., b)
LET expression = SI(mb, ..., mb)
N
Notation Value Range
m Port Number 0 to 7, 10 to 17, 20 to 27 O
to 7 (If omitted, all 8 bits are processed.)
0
b bit Definition If multiple bits are specified, they are expressed from the left in descending
order (high to low). P
R
Sample Description
A%=SI2() ………
The input status from SI (27) to SI (20) is assigned to S
variable A%.
A%=SI0(6,5,1) ………
The SI (06), SI (05), SI (01) input status is assigned to
variable A% (when all the above signals are "1" (ON), A% = 7). T
A%=SI(37,35,27,10) ………
The SI (37), SI (35), SI (27) SI(10) input status is assigned
to variable A% (when all the above signals except SI (27)
are "1" (ON), A% = 13). U
Format
LET SID(m)
R
• The information is handled as signed double word data.
S • "0" is input if the specified port does not exist.
• The lower port number data is placed at the lower address.
For example, if SIW(2) =&H2345,SIW(3) =&H0001, then SID(2) =&H00012345.
T
Sample Description
U
A%=SID(2) ………
The input status of SIW(2), SIW(3) is assigned to variable A%.
A%=SID(14) ………
The input status of SIW(14), SIW(15) is assigned to variable A%.
V
Format
SIN(expression)
Value Contents
N
Expression Angle (units: radians)
O
Explanation This function gives the sine value for the <expression> value.
P
Sample Description
Q
A(0)=SIN(B*2+C) ………
Assigns the expression B*2+C sine value to array A (0).
A(1)=SIN(DEGRAD(30)) ………Assigns a 30.0° sine value to array A (1).
R
Format
LET SIW(m)
S
• The information is handled as unsigned word data
• "0" is input if the specified port does not exist.
T
Sample Description
U A%=SIW(2) ………
The input status of SIW (2) is assigned to variable A%.
A%=SIW(15) ………
The input status of SIW (15) is assigned to variable A%.
V
Related commands SID
W
Format
Sn = x y z r
Value Range
N
n 0 to 39
x, y, z, r -99,999.99 to 99,999.99 O
P
Explanation Defines shift coordinate values in order to shift the coordinates for robot movement. Only "mm" units
can be used for these coordinate values ("pulse" units cannot be used).
Q
1: "n" indicates the shift number.
2: The "x" to "r" input data must be separated with spaces (blanks). R
3: The "x" to "r" input data is recognized as "mm" unit data.
4: "x" to "z" correspond to the Cartesian coordinate system's x, y, z coordinate shift values, and "r"
corresponds to the xy coordinates' rotational shift values. S
n NOTE
• All input values are handled as constants. T
• If the controller power is turned off during execution of a shift coordinate definition statement, a memory-
related error such as "9.706: Shift data destroyed" may occur.
V
Sample Description
S0 = 0.000 0.000 0.000 0.000 …Defines shift coordinates for S0
S1 = 100.000 200.000 50.000 90.000 …Defines shift coordinates for S1 W
P3 = 100.000 0.000 0.000 0.000 0.000 0.000 …Defines P3 point data
SHIFT S0 …Changes the coordinates of Robot 1 to S0
MOVE P,P3 …Moves to P3 in PTP X
SHIFT S1 …Changes the coordinates of Robot 1 to S1
MOVE P,P3 …Moves to P3 in PTP
HALT Y
Z
Related commands Shift assignment statement, SHIFT
Format
1. LET SOm(b, ..., b) = expression
2. LET SO (mb, ..., mb) = expression
N
Notation Value Range
m Port Number 2 to 7, 10 to 17, 20 to 27
O to 7 (If omitted, all 8 bits are processed.)
0
b Bit Definition If multiple bits are specified, they are expressed from the left in descending
order (high to low).
P
Integer value (If real number is specified, rounds to an integer.)
Bits beyond the number of bit whom an assignment destination is required are
Q Expression ignored. (If the port number is specified, the lower 8 bits are valid. if the number
of bit specified on bit definition is 1 to 8, the lower 1 to 8 bit corresponding to
the bits specified on the left side are valid.)
R
Explanation Outputs a specified value to the SO port.
Only the <value> data's integer-converted lower bits corresponding to the bits defined at the left side
S can be output. If the port which does not exist is specified, nothing is output.
Reference Bit Definition: Chapter 3 "10 Bit Settings"
T
c CAUTION
Outputs to SO0() and SO1() are not possible.
U Sample Description
SO2()=&B10111000 ………SO (27, 25, 24, 23) are turned ON, and SO (26, 22, 21, 20) are turned OFF.
V SO2(6,5,1)=&B010 ………SO (25) are turned ON, and SO (26, 21) are turned OFF.
SO3()=15 ………
SO (33, 32, 31, 30) are turned ON, and SO (37, 36, 35, 34) are turned OFF.
SO(37,35,27,20)=A ………
The lower 4 bits of integer-converted variable A are output to SO (37, 35,
W 27, 20).
X
Functions
Y
Format
1. LET expression = SOm (b, ..., b)
Z 2. LET expression = SO (mb, ..., mb)
Sample Description
A%= SO2() ………
Output status of ports SO(27) to SO(20) is assigned to variable A%.
A%= SO0(6, 5, 1) ……… Output status of SO(06), SO(05) and SO(01) is assigned to variable A%.
(If all above signals are 1(ON), then A%=7.)
A%= SO(37,35,27,10)………
Output status of S0(37), SO(35) , SO(27) and S0(10) is assigned to
variable A%.(If all above signals except S0(27) are 1 (ON), then A%=13.)
Format
1. LET SOm (b, ..., b)
2. LET SO (mb, ..., mb)
N
Explanation Indicates SO port output status.
O
Sample Description
A%= SO2() ………
Output status of ports SO(27) to SO(20) is assigned to
variable A%. P
A%= SO0(6, 5, 1) ………
Output status of SO(06), SO(05) and SO(01) is assigned to
variable A%.
(If all above signals are 1(ON), then A%=7.) Q
A%= SO(37,35,27,10) ………
Output status of S0(37), SO(35) , SO(27) and S0(10) is
assigned to variable A%.
(If all above signals except S0(27) are 1 (ON), then R
A%=13.)
Format
V
Sample Description
SOD(2)=&H12345678 ………
Outputs &H12345678 to SOD(2).
W SOD(4)=1048575 ………
Outputs 1048575(&HFFFFF) to SOD(4).
SOD(2)=A% ………
Outputs the value of variable A% to SOD(2).
Y
Functions
Z Format
Sample Description
A%=SOD(2) ………
The output status of SOD(2) is assigned to variable A%.
Format
R
Explanation Outputs the value to the SOW port specified by "m".
Z
Functions
Format
Sample Description
A%=SOW(2) ………
The output status of SOW (2) is assigned to variable A%.
Format
N Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
O Expression 1 to 100 (units: %)
P Explanation Changes the program movement speed to the value indicated by <expression>.
This speed change applies to all robot axes and auxiliary axes of the specified robot.
Q The operation speed is determined by multiplying the automatic movement speed (specified from the
programming box and by the ASPEED command), by the program movement speed (specified by SPEED
R command).
Operation speed = automatic movement speed × program movement speed
Example:
S Automatic movement speed ... 80%
Program movement speed ... 50%
n NOTE
• Automatic movement speed
U Specified by programming box operation or by the ASPEED command
• Program movement speed
Specified by SPEED commands or MOVE, DRIVE speed options.
V
W Sample Description
ASPEED 100 ………
Changes the Automatic movement speed of robot 1 to 100%.
SPEED 70 ………
Changes the Program movement speed of robot 1 to 70%.
X MOVE P,P0 ………
Moves robot 1 from current position to P0 at a speed of 70%
(=100 × 70).
SPEED 50 ………
Changes the Program movement speed of robot 1 to 50%.
Y MOVE P,P1 ………
Moves robot 1 from current position to P1 at a speed of 50%
(=100 × 50).
MOVE P,P2,S=10 ………
Moves robot 1 from current position to P2 at a speed of 10%
Z (=100 × 10).
HALT
Format
SQR(expression)
Value Range N
Expression 0 or positive number.
O
Explanation Gives the square root of the <expression> value. An error occurs if the <expression> value is a negative
number. P
Sample Description
Q
A=SQR(X^2+Y^2) ………
The square root of X^2+Y^2 is assigned to variable A.
R
Format
Q Explanation Starts task "n" specified by the program with the "p" priority ranking.
The program name must be enclosed in < > (angle brackets).
R
Priority ranking
The smaller the priority number, the higher the priority (high priority: 1 to low priority: 64).
S If a priority ranking is not specified, "32" is adopted as the priority ranking for this task.
W Sample Description
START <SUB _ PGM>,T2 …Registers the task program SUB _ PGM in task No. 2 and starts it.
X *ST: …Defines Main program *ST
MOVE P,P0,P1
GOTO *ST
Y HALT
Program name:SUB _ PGM
‘SUBTASK ROUTINE (Comment) Subtask routine
Z *SUBTASK: …Defines Task program *SUBTASK
P100 = WHERE
IF LOC3(P100) > 10000 THEN
DO(20) = 1
ELSE
DO(20) = 0
ENDIF
GOTO *SUBTASK
EXIT TASK …Exits the task program SUB _ PGM
Format
STR$(expression)
N
Explanation Converts the value specified by the <expression> to a character string. The <expression> specifies an
integer or real value.
O
Sample P
B$=STR$(10.01)
Q
Related commands VAL
R
Format
SUB label (dummy argument, dummy argument...)
command block
N END SUB
O
Explanation Defines a sub-procedure.
The sub-procedure can be executed by a CALL statement. When the END SUB statement is executed,
P the program jumps to the next command after the CALL statement that was called. Definitions are as
follows.
Q 1: All variables declared within the sub-procedure are local variables, and these are valid only within
the sub-procedure. Local variables are initialized each time the sub-procedure is called up.
R 2: Use a SHARED statement in order to use global variables (program level).
3: Use a <dummy argument> when variables are to be passed on. If two or more dummy arguments are
used, separate them by a comma ( , ).
S 4: A valid <dummy argument> consists of a name of variable and an entire array (array name followed
by parentheses). An error will occur if array elements (a <subscript> following the array name) are
T specified.
Sample 1 Description
X
A=1
CALL *TEST ………Calls sub-procedure *TEST
Y PRINT A
HALT
’SUB ROUTINE: TEST (Comment: Sub-procedure name is “TEST”)
Z SUB *TEST ………Defines sub-procedure *TEST (NOTE)
A=50
In the above example, the program level variable "A" is unrelated to the variable "A" within the sub-procedure.
Therefore, the value indicated in the 3rd line PRINT statement becomes "1".
In the above example, different variables are passed along as arguments to call the sub-procedure 2 times. T
U
Related commands CALL, EXIT SUB, SHARED
V
Format
SUSPEND Tn
<program name>
N
PGm
T If a task (program) not active is specified for the execution, an error occurs.
U
Sample Description
V Main Task
START <SUB _ PGM>,T2 ……Registers SUB _ PGM in Task 2 and starts it
SUSFLG=0 ……Turns OFF SUSFLG
W *L0:
MOVE P,P0
MOVE P,P1 ……Waits until SUSFLG turns ON
X WAIT SUSFLG=1 ……Pauses Task 2
SUSPEND T2 ……Turns OFF SUSFLG
SUSFLG=0
Y GOTO *L0
HALT
Z ’SUBTASK ROUTINE
*SUBTASK:
Sub Task (Program name: SUB _ PGM)
Format
N
Explanation This statement switches from the current program to the specified program, starting from the first line.
O
• Although the output variable status is not changed when the program is switched,
the dynamic variables and array variables are cleared.
• The program name must be enclosed in < > (angle brackets). P
Q
If the program specified as the switching target does not exist, a "3.203: Program doesn't exist" (code: &H0003
&H00CB) error occurs and operation stops. R
S
Sample Description
MOVE P,P1 T
SWI <TEST2> ………
Switches the execution program to TEST 2.
U
Task No. Program Name Task No. Program Name
3 TEST 1 3 TEST 2
V
Executing
: :
SWI
TEST 2 is executed at Task No. 3. W
Format
TAN(expression)
N Value Contents
Expression Angle (units: radians)
O
Explanation Gives a tangent value for the <expression> value.
P An error will occur if the <expression> value is a negative number.
Q Sample Description
A(0)=B-TAN(C) ………
The difference between the tangent values of variable B
R and variable C is assigned to array A (0).
A(1)=TAN(DEGRAD(20)) ………
The 20.0° tangent value is assigned to array A (1).
S
Related commands ATN, COS, DEGRAD, RADDEG, SIN
T
Format
TCOUNTER
N
Explanation Outputs count-up values at 1ms intervals starting from the point when the TCOUNTER variable is reset.
After counting up to 2,147,483,647, the count is reset to 0.
O
Sample Description P
MOVE P,P0
WAIT ARM
RESET TCOUNTER
Q
MOVE P,P1
WAIT ARM
A = TCOUNTER
R
PRINT TCOUNTER ………
Displays the P0 to P1 movement time until the axis enters the
tolerance range on the programming box.
S
Format
TIME$
N
Explanation Acquires the current time in an hh:mm:ss format character string.
( "hh" is the hour, "mm" is the minutes, and "ss" is the seconds. )
O
The clock can be set in the SYSTEM mode's initial processing.
P
Sample Description
Q A$=TIME$ ………
Assigns the current time to the character type variable A$
as a character string in the format of hh: mm: ss.
PRINT TIME$ ………
Displays the current time on the programming box etc.
R in the format of hh: mm: ss
Format
TIMER
N
Explanation Acquires the current time in seconds, counting from midnight. This function is used to measure a
program's run time, etc.
O
The clock can be set in the SYSTEM mode's initial processing.
c CAUTION
The time indicated by the internal clock may differ somewhat from the actual time. P
Q
Sample Description
A%=TIMER ………
Assigns the current time to the integer variable A% R
FOR B=1 TO 10 in seconds from midnight
MOVE P,P0
MOVE P,P1 S
NEXT
A%=TIMER-A% ………Assigns current time - A% to the variable A%
PRINT A%/60;":";A% MOD 60 ………“A% ÷ 60: A% ÷ 60” is displayed T
HALT
U
Related commands TIME$
V
Format
1. LET TOm(b, ..., b) = expression
2. LET TO (mb, ..., mb) = expression
N
Notation Value Range
m Port Number 0, 1
O
to 7 (If omitted, all 8 bits are processed.)
0
b bit Definition If multiple bits are specified, they are expressed from the left in descending order
P (high to low).
Explanation Outputs the specified value to the TO port. The output value is the <expression>'s integer-converted
S lower bits corresponding to the bit definition specified at the left side.
T The OFF/ON settings for bits which are being used in a SEQUENCE program have priority while the
SEQUENCE program is running.
Sample
U TO0() = &B00000110
V
Functions
W Format
1. LET expression = TOm (b, ..., b)
Sample Description
A%= TO0() ………
Output status of ports TO(07) to TO(00) is assigned to variable A%.
A%= TO0(6, 5, 1) ………Output status of TO(06), TO(05) and TO(01) is assigned to variable A%.
(If all above signals are 1(ON), then A%=7.)
A%=TO(17, 15, 00) ………
Output status of T0(17), TO(15) and T0(00) is assigned to variable A%.
(If all above signals except T0(15) are 1 (ON), then A%=5.)
Format
S
This statement is executed after positioning of the specified axes is complete (within the tolerance range).
T
Functions
U
Format
Value Range
W
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Axis Number 1 to 6
X
Explanation Acquires the "tolerance" parameter values for the axis specified by <axis number>.
Y
Sample Description Z
’CYCLE WITH DECREASING TOLERANCE
DIM TOLE(5)
FOR A=200 TO 80 STEP -20
GOSUB *CHANGE _ TOLE
MOVE P,P0
MOVE P,P1
NEXT A
C=TOLE(2)HALT ………
The tolerance parameter of axis 2 of robot 1 is assigned to
*CHANGE _ TOLE: variable C.
FOR B=1 TO 4
TOLE(B)=A
NEXT B
RETURN
Format
N Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
O Axis Number 1 to 6
Expression 1 to 100 (units: %)
P
Explanation Changes the maximum torque command value of the specified axis to the <expression> value. The new
value is valid when the next movement command (MOVE or DRIVE statement, etc.) is executed. The
Q parameter value does not change.
T
The maximum torque command value becomes temporarily invalid in execution below.
• Return- to-origin is in execution.
U • The PUSH statement is in execution.
Only the torque value in the moving direction is changed to the value specified by the PUSH statement,
the value in the opposite direction is hold and not changed.
V
After these movements, the value backs to the maximum torque command value when a next movement
W command (MOVE statement, for example) is executed.
X
c CAUTION
• If the specified torque limit is too small, the axis may not move. Never enter within the robot movement range
to avoid danger even though the robot is in stop status. In this case, press the emergency stop button before
proceeding with the operation.
Y • If the specified value is less than the rated torque, an error may not occur even if the robot strikes an obstacle.
Z
• TORQUE statement limits the torque in the both (rotation and opposite) direction of axis.
• PUSH statement limits the torque in its rotation direction only.
Format
N
Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Axis Number 1 to 6 O
P
Explanation Acquires the maximum torque command value for the axis specified by <axis number>.
Q
Sample Description
Format
N Value Meaning
Task Number Task number which acquires the program number
O
Explanation Acquires the program number which is registered in the task specified by the <task number>.
P
Sample Description
Q
A=TSKPGM(1) ………
Assigns a program number registered in task 1 to variable A.
R
Related commands PGMTSK, PGN
Format
N
Explanation Converts the numeric value of the character string specified in the <character string expression> into an
actual numeric value.
O
•The value may be expressed in integer format (binary, decimal, hexadecimal), or real number format
(decimal point format, exponential format). P
•The VAL value becomes "0" if the first character of the character string is "+", "-", "&" or anything other
than a numeric character.
•If there are non-numeric characters or spaces elsewhere in the character string, all subsequent
Q
characters are ignored by this function.
However, for hexadecimal expressions, "A" to "F" are considered numeric characters. R
[Integer] Hexadecimal format: &Hnnnn
Decimal format: nnnn S
Binary format: &Bnnnn
T
[Real number] Decimal point format: nnn.nnn
Exponential format: nnEmm
U
Sample
V
A=VAL("&B100001")
Format
N Value Range/Description
conditional expression Specify with Input/Output signals or variables
O Expression 0 to 2147483647 (units: ms)
Q •T
his command will terminate if the time-out period elapses before the WAIT condition is met.
•T
he minimum wait time is 1ms but changes depending on the execution status of other tasks.
R
c CAUTION
If the time-out setting is omitted, robot will stop without alarm unless you stop the program from the outside (by
an interlock or an emergency stop, etc.) while the conditional expression is not met.
S
T
When the conditional expression is a numeric expression, an expression value other than "0" indicates TRUE status,
and "0" indicates FALSE status.
U
V
Sample Description
WAIT A=10 ………
Wait status continues until variable A becomes 10.
W WAIT DI2( )=&B01010110 ………
Waits until DI(21),(22),(24),(26) are turned on, and
DI(20),(23),(25),(27) is turned off.
WAIT DI2(4,3,2)=&B101 ………
Waits until DI(22) and DI(24) are turned on, and DI(23)
X is turned off.
WAIT DI(31)=1 OR DO(21)=1 ………
Wait status continues until either DI (31) or DO(21)
turns ON.
Y WAIT DI(20)=1,1000 ………
Wait status continues until DI(20) turns ON. If DI(20)
fails to turn ON within 1 second, the command is
terminated.
Z WAIT END _ SENSOR = 1 ………
IO Name* Waits until "END _ SEMSOR" is turned on.
* IO Name: Users can name specific bits of DI and DO as they desire.
IO Name can be added and edited on the support software only (not with a programming box)
Format
Value Range
N
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Axis Number 1 to 6 (• Multiple axes not specifiable • If not input, all axes are specified.) O
Explanation Establishes "wait" status until the axis movement is completed (is positioned within the tolerance range). P
Sample Description
Q
WAIT ARM ………
Waits for the movement completion of robot 1.
WAIT ARM[2](2) ………
Waits for the movement completion of axis 2 of robot 2. R
S
Related commands DRIVE, DRIVEI, MOVE, MOVEI, MOVET, PMOVE
Format
N Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
O Expression The range varies according to the robot which has been specified.
P Explanation Changes the "tip weight (kg)" parameter of the robot to the <expression> value.
This change does not apply to auxiliary axes.
R
Functions
S Format
Explanation Acquires the "tip weight (kg)" parameter value of the robot specified by <robot number>.
V
W Sample Description
A=5
X
B=2
C=WEIGHT ………
The tip weight(kg) parameter of robot 1 is assigned to variable C.
WEIGHT A ………
The tip weight(kg) parameter of robot 1 is changed to value (5) of
Y
variable A.
MOVE P,P0
WEIGHT B ………
The tip weight(kg) parameter of robot 1 is changed to value (2) of
Z
variable B.
MOVE P,P1
WEIGHT C ………
The tip weight(kg) parameter of robot 1 is replaced to the origin
value (the value of variable C).
D=WEIGHT ………
The tip weight(kg) parameter of robot 1 is assigned to variable D.
HALT
If both of Tip weight parameters; <WEIGHT> and <WEIGHTG> are set, a total value will be set.
Format
Value Range
N
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Expression The range varies according to the robot which has been specified. O
Explanation Changes the "tip weight (g)" parameter of the robot to the <expression> value. P
This change does not apply to auxiliary axes.
R
Functions
S
Format
Value Range
U
Robot Number 1 to 4 (If not input, robot 1 is specified.)
Explanation Acquires the "tip weight (g)" parameter value of the robot specified by <robot number>.
V
W
Sample Description
A=5
B=2
X
C=WEIGHTG ………
The tip weight(g) parameter of robot 1 is assigned to variable C.
WEIGHTG A ………
The tip weight(g) parameter of robot 1 is changed to value (5) of
variable A.
Y
MOVE P,P0
WEIGHTG B ………
The tip weight(g) parameter of robot 1 is changed to value (2) of
variable B.
Z
MOVE P,P1
WEIGHTG C ………
The tip weight(g) parameter of robot 1 is replaced to the origin value
(the value of variable C).
D=WEIGHTG ………
The tip weight(g) parameter of robot 1 is assigned to variable D.
HALT
If both of Tip weight parameters; <WEIGHT> and <WEIGHTG> are set, a total value will be set.
Format
WHILE conditional expression
command block
N WEND
O
Explanation Ends the command block which begins with the WHILE statement. A WEND statement must always be
paired with a WHILE statement.
P Jumping out of the WHILE to WEND loop is possible by using the GOTO statement, etc.
Q Sample Description
A=0
R WHILE DI3(0)=0 ………Repeats between WHILE and WEND while DI3(0) is OFF
A=A+1
MOVE P,P0
S MOVE P,P1
PRINT "COUNTER=";A
WEND ………Ends the command block of WHILE statement
T HALT
Format
Value Range
N
Robot Number 1 to 4 (If not input, robot 1 is specified.)
O
Explanation Acquires the arm’s current position in the joint coordinates.
P
Sample Description
Q
P10=WHERE ………
The current position's pulse coordinate value of robot 1 is
assigned to P10.
R
Format
O
Explanation Executes the command block between the WHILE and WEND statements when the condition specified
P by the <conditional expression> is met, and then returns to the WHILE statement to repeat the same
operation.
When the <conditional expression> condition is no longer met (becomes false), the program jumps to
Q the next command after the WEND statement.
If the <conditional expression> condition is not met from the beginning (false), the command block
R between the WHILE and WEND statements is not executed, and a jump occurs to the next statement
after the WEND statement.
Jumping out of the WHILE to WEND loop is possible by using the GOTO statement, etc.
S
T When the conditional expression is a numeric expression, an expression value other than "0" indicates TRUE status,
and "0" indicates FALSE status.
Sample 1 Description
V
A=0
WHILE DI3(0)=0 ………Repeats between WHILE and WEND while DI3(0) is OFF
W A=A+1
MOVE P,P0
MOVE P,P1
X PRINT "COUNTER=";A
WEND ………Ends the command block of WHILE statement
HALT
Y
Sample 2 Description
Z A=0
WHILE -1 ………
Becomes an endless loop because the conditional expression is always
TRUE (other than 0).
A=A+1
MOVE P,P0
IF DI3(0)=1 THEN *END
MOVE P,P1
PRINT "COUNTER=";A
IF DI3(0)=1 THEN *END
WEND ………Ends the command block of WHILE statement
*END
HALT
Format
Value Range
N
Robot Number 1 to 4 (If not input, robot 1 is specified.)
O
Explanation Acquires the arm’s current position in the Cartesian coordinates.
P
For YK-TW robot, the first and the second arm rotation information is also acquired. Q
R
Sample 1 Description
P10=WHRXY ………
The current position Cartesian coordinate value of robot 1 is
assigned to P10.
S
T
Sample 2 Description
LOC3(P10)=LOC3(WHRXY) ………
The current position data of the third axis is assigned to
the third axis at P10 in the cartesian coordinate system. U
V
Related commands WHERE
Format
Reference "CHGWRK"
V Operation Manual "Work definitions"
X "9.708: Work data destroyed" error may occur if the power of controller is turned off during the execution of WRKDEF.
Y
● Parameter Value
X-coordinate Offset : The offset amount from the robot tip (the tool tip; in use of the hand data) of the work "n" on
Z X-coordinates is specified in real number.
Y-coordinate Offset : The offset amount from the robot tip (the tool tip; in use of the hand data) of the work "n" on
Y-coordinates is specified in real number.
Z-coordinate Offset : The offset amount from the robot tip (the tool tip; in use of the hand data) of the work "n" on
Z-coordinates is specified in real number.
R-coordinate Offset : The angle of + X direction and the work "n" in the Cartesian coordinates is specified in real number
when the current position of the robot tip (the tool tip; in use of the hand data) is "0.000" on
R-coordinates.
Enter positive value in counterclockwise.
CHANGE H1 ………
Changes the hand data of the robot 1 to hand 1.
MOVE P,P1 ………
Moves the hand 1 tip of the robot 1 to P1.
WRKDEF W1 = 115.000 -50.000 0.000 30.000
CHGWRK W1
MOVE P,P2
………
Changes the work data of the robot 1 to work 1.
………
Moves the work 1 tip of the robot 1 to P2.
N
HALT
O
SAMPLE: WRKDEF
P
Format
N Value Range
Robot Number 1 to 4 (If not input, robot 1 is specified.)
O
Explanation This function converts the Cartesian coordinate data (unit: mm, deg.) of <point expression>
P to the joint coordinate data (unit: pulse).
The data is converted based on the shift (offset) format that is already set; standard coordinates, shift
coordinates and hand definition.
Q
• On SCARA robots, the converted result differs depending on whether right-handed or left-handed is
R specified.
• On the YK-TW series, the result varies, depending on the first arm and the second arm rotation
information settings.
S • To convert joint coordinate data to Cartesian coordinate data, use the JTOXY statement.
T
Sample Description
P10=XYTOJ(P10) ………
P10 is converted to joint coordinate data of robot 1.
U
1 1 Overview.................................................... 9-1
2 2 Features...................................................... 9-1
3 3 How to use................................................. 9-1
4 4 Cautions when using this function........... 9-2
1 Overview
8
This function moves the robot at a specified speed along a path composed of linear and circular segments. Because
speed fluctuations during movement are minimal, the PATH function is ideal for applications such as sealing, etc.
2 Features
10
• Moves the robot at a constant speed along the entire movement path (except during acceleration from a stop, and
during deceleration just prior to the operation end).
• Permits easy point teaching because the robot speed is not affected by the point teaching positions' level of precision.
• Permits movement speed changes for the entire movement path, or speed changes for only one portion of the path 11
(using the speed option).
• Using the DO option permits signal outputs to a specified port at any desired position during movement.
12
3 How to use
13
The following robot language commands must be used as a set in order to use the PATH function.
As shown below, the motion path is specified between the PATH SET and PATH END statements.
Simply specifying a path, however, does not begin robot motion.
Robot motion only occurs when the PATH START statement is executed after the path setting procedure has been
completed.
Sample Description
Overview 9-1
4 Cautions when using this function
8
• Paths may comprise no more than 1000 points (total) linear and circular segments. 1 point forms 1 linear segment by
PATH L command and 2 points form 1 circular segment by PATH C command.
• The robot must be positioned at the path start point when PATH motion is executed (by PATH START statement).
10 • At points where circular and linear segments connect, the motion direction of the two connecting segments should be
a close match (as close as possible). An excessive difference in their motion directions could cause vibration and robot
errors.
12
13 • Where a linear segment connects to another linear segment, the motion path passes to the inner side of the connection
point. Moreover, as shown in fig. (1) below, the faster the speed, the further to the inner side the path becomes. To
prevent significant speed-related path shifts, add more points as shown in fig. (2). Note also, that in some cases, the
speed may have to be reduced in order to prevent errors from occurring.
Linear segments connection point: Prevents a deviation
Low speed Increase the number
High speed of points
(1) (2)
• If an error occurs due the robot's inability to move at the specified speed:
• Robot acceleration/deceleration occurs if the speed setting is changed when PATH motion begins, stops, or at some
point along the path. At such times, an error may occur before motion begins if the distance between points is too
short for the specified speed to be reached. In such cases, a slower speed must be specified. If the error still occurs
after the speed is lowered, adjust the PATH points to increase the length of the linear or circular segments which
contain acceleration or deceleration zones.
• The hand system used during PATH motion must be the same as the hand system used at the path's start point. The
same applies if the path is to pass through points where hand flags are set. Differing hand systems will cause an error
and disable motion.
• The first arm and second arm rotation information during PATH movement must be the same as the first arm and
second arm rotation information at the PATH movement's START point. If the two are different, an error will occur
and movement will be disabled.
• If the robot is stopped by a stop signal, etc., during PATH motion, this is interpreted as an execution termination, and
the remaining path motion will not be completed even if a restart is executed.
• Only the X, Y and Z coordinate values among the specified points are valid for PATH motion.
Any other coordinates use the coordinate values at the START point of the PATH motion; R-axis can not be moved to
the specified point even if it is used.
1 Overview...................................................... 10-1
2 Program file.................................................. 10-3
3 Point file........................................................ 10-5
4 Point comment file...................................... 10-8
5 Point name file........................................... 10-10
6 Parameter file............................................ 10-12
7 Shift coordinate definition file................... 10-16
8 Hand definition file.................................... 10-18
9 Work definition file..................................... 10-20
10 Pallet definition file.................................... 10-22
11 General Ethernet port file.......................... 10-26
12 Input/output name file.............................. 10-28
13 Area check output file.............................. 10-32
14 Real time output file.................................. 10-34
15 All file.......................................................... 10-38
16 Program directory file............................... 10-40
17 Parameter directory file............................ 10-42
18 Machine reference file............................. 10-43
19 Accumulated data file.............................. 10-45
20 System configuration information file...... 10-46
21 Version information file............................. 10-47
22 Option board file....................................... 10-48
23 Self check file............................................ 10-49
24 Alarm history file........................................ 10-50
25 Remaining memory size file..................... 10-52
26 Variable file................................................ 10-53
27 Constant file............................................... 10-59
28 Array variable file...................................... 10-60
29 DI file........................................................... 10-62
30 DO file......................................................... 10-64
31 MO file........................................................ 10-66
32 LO file.......................................................... 10-68
33 TO file.......................................................... 10-70
34 SI file............................................................ 10-72
35 SO file.......................................................... 10-74
36 SIW file........................................................ 10-76
37 SOW file...................................................... 10-78
38 EOF file........................................................ 10-80
39 Serial port communication file................. 10-81
40 Ethernet port communication file............ 10-82
1 Overview
7
1.1 Data file types
This section explains data files used with a SEND statement and READ/WRITE online commands.
Definition Format Read-
8
Type File Name Write
All Individual File out
9
<bbbbbbbb>
Program PGM 3 3
PGn
Point PNT Pn 3 3
Point comment PCM PCn 3 3
Point name PNM PNn 3 3
/cccccccc/
Parameter PRM #cccccccc#
\cccccccc\
3 3
10
Shift coordinate definition SFT Sn 3 3
Hand definition HND Hn 3 3
Work definition WRKDEF Wn 3 3
13
sensor, stroke-end MRF --------------- 3 -
Machine reference
mark ARP --------------- 3 -
Accumulated data ACD --------------- 3 -
System configuration information CFG --------------- 3 -
Version information VER --------------- 3 -
Option board OPT --------------- 3 -
Self check SCK --------------- 3 -
Alarm history LOG --------------- 3 -
Remaining memory size MEM --------------- 3 -
Device DI port DI() DIn() 3 -
DO port DO() DOn() 3 3
MO port MO() MOn() 3 3
TO port TO() TOn() 3 3
LO port LO() LOn() 3 3
SI port SI() SIn() 3 -
SO port SO() SOn() 3 3
SIW port SIW() SIWn() 3 -
SOW port SOW() SOWn() 3 3
RS-232C CMU --------------- 3 3
Ethernet ETH --------------- 3 3
Other File END code EOF --------------- 3 -
Overview 10-1
Overview
7
1.2 Cautions
Observe the following cautions when handling data files.
8
• Only one-byte characters can be used.
• All data is handled as character strings conforming to ASCII character codes.
• Only upper-case alphabetic characters may be used in command statements (lower case characters are prohibited).
9 • Line lengths must not exceed 255 characters.
• A [cr/lf] data format designation indicates CR code (0Dh) + LF code (0Ah).
• The terms "reading out" and "writing" used in this manual indicate the following data flow;
Reading out: Controller → external communication device
10 Writing: External communication device → controller
11
12
13
8
Read-out 3 When used as a read-out file, all programs currently stored are read out.
Write 3 Write files are registered at the controller under the program name indicated at the "NAME = program name" line.
Format
PGM
9
Meaning • Expresses all programs.
• If there is a specification of a program number in the case of a write file, the new program overwrites.
• If the program number is omitted in the case of a write file, the assignment is made to the smallest
free number. 10
If there are programs with the same name and with different program numbers, the older program is
deleted.
Data Format
13
aaaaa ...aaaaaaaaaaaaaa[cr/lf]
:
aaaaa ...aaaaaaaaaaaaaa[cr/lf]
[cr/lf]
• Program names are shown with 32 characters or less consisting of alphanumeric characters and _ (underscore).
• A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
Response:
RUN [cr/lf]
NAME=TEST[cr/lf]
PGN=1[cr/lf]
PGN=1
A=1[cr/lf]
RESET DO2()[cr/lf]
:
HALT[cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
Write 3
Format
1.<program name>
9 2.PGmmm
• At program writing operations, be sure to specify the program name after NAME=.
Program writing cannot occur if the program name is not specified.
• When there is a program number with the different program, the older one will be overwritten.
• When there is no program number specified, the smallest free number will be specified automatically.
• Writing into the currently selected program is not possible.
• When a sequence program is being executed, writing into the program name "SEQUENCE" is not possible.
• A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND <TEST1> TO CMU ……
Outputs program TEST1 from the communication port.
SEND CMU TO <TEST1> ……
Inputs program TEST1 from the communication port.
Response:
RUN [cr/lf]
NAME=TEST1[cr/lf]
PGN=1[cr/lf]
A=1[cr/lf]
RESET DO2()[cr/lf]
:
HALT[cr/lf]
[cr/lf]
8
Read-out 3 When used as a read-out file, all points currently stored are read out.
Write 3 When used as a write file, writing is performed with a point number.
Format
PNT
9
Meaning Expresses all point data.
Data Format
n NOTE
• Integer point data is recognized in "pulse" units, and real number point data is recognized in "mm" units.
• When a dot is included, this is treated as point data in "mm" units.
• Each piece of data is separated by one or more spaces.
12
Notation Value Range / Meaning
13
mmmm Point number 0 to 29999
f Coordinate sign + / - / space
xxxxxx/../bbbbbb Numeric value of 8 digits or less
Extended hand system flag setting for SCARA
t 1: RIGHT / 2:LEFT
robots
0: T
he "mm → pulse" converted pulse data x (*1) range
–180.00° < x < = 180.00°.
The first arm rotation information for YK-TW 1: T
he "mm → pulse" converted pulse data x (*1) range
xr
series robot 180.00° < x < = 540.00°.
-1: T
he "mm → pulse" converted pulse data x (*1) range
–540.00° < x < = -180.00°.
0: T
he "mm → pulse" converted pulse data x (*1) range
–180.00° < y < = 180.00°.
The second arm rotation information for YK-TW 1: T
he "mm → pulse" converted pulse data x (*1) range
yr
series robot 180.00° < y < = 540.00°.
-1: T
he "mm → pulse" converted pulse data x (*1) range
–540.00° < y < = -180.00°.
*1: T
he joint-coordinates-converted pulse data represents each arm's distance (converted to angular data)
from its mechanical origin point.
• Hand system flags are valid only for SCARA robots, with the coordinate data specified in "mm" units.
• If a number other than "1" or "2" is specified for a hand system flag, or if no number is specified, this is interpreted as
"0" setting (no hand system flag).
• The first arm and the second arm rotation information settings are available only on the YK-TW series robot model
where a "mm"-unit coordinate system has been set.
• The first arm and the second arm rotation information is processed as "0" if a numeral other than 0, 1, -1 has been
specified, or if no numeral has been specified.
8 SEND PNT TO CMU …………Outputs all points from the communication port.
Response:
RUN [cr/lf]
9 P0
P1
=
=
1
426.200
2
-160.770
3
0.001
4
337.210
5
0.000
6 [cr/lf]
0.000 0 1 0 [cr/lf]
P2 = -27.570 -377.840 0.360 193.220 0.000 0.000 0 -1 0 [cr/lf]
:
P29999= -251.660 -419.510 0.000 -127.790 0.000 0.000 2 -1 -1 [cr/lf]
10 [cr/lf]
END [cr/lf]
11
12
13
8
Read-out 3
Write 3
Format
Pmmmm
9
Meaning Expresses a specified point data.
Data Format
n NOTE
• Integer point data is recognized in "pulse" units, and real number point data is recognized in "mm" units.
• When a dot is included, this is treated as point data in "mm" units.
• Each piece of data is separated by one or more spaces.
11
Notation Value Range / Meaning
mmmm Point number 0 to 29999
f Coordinate sign + / - / space 12
xxxxxx/../ Numeric value
bbbbbb of 8 digits or less
Extended hand system flag setting
t 1: RIGHT / 2:LEFT
for SCARA robots
0: T
he "mm → pulse" converted pulse data x (*1) range –180.00° < x < = 180.00°.
13
The first arm rotation information
xr 1: T
he "mm → pulse" converted pulse data x (*1) range 180.00° < x < = 540.00°.
for YK-TW series robot
-1: T
he "mm → pulse" converted pulse data x (*1) range –540.00° < x < = -180.00°.
*1: The joint-coordinates-converted pulse data represents each arm's distance (converted to angular data)
from its mechanical origin point.
• Hand system flags are valid only for SCARA robots, with the coordinate data specified in "mm" units.
• If a number other than "1" or "2" is specified for a hand system flag, or if no number is specified, this is interpreted as
"0" setting (no hand system flag).
• The first arm and the second arm rotation information settings are available only on the YK500TW robot model where
a "mm" units coordinate system has been set.
• The first arm and the second arm rotation information is processed as "0" if a numeral other than 0, 1, -1 has been
specified, or if no numeral has been specified.
• A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
8
Read-out 3 When used as a read-out file, all point comments currently stored are read out.
Write 3 When used as a write file, writing is performed with a point comment number.
Format
9 PCM
10 Data Format
PCmmmm= sssssssssssssss[cr/lf]
PCmmmm= sssssssssssssss[cr/lf]
11 :
PCmmmm= sssssssssssssss[cr/lf]
PCmmmm= sssssssssssssss[cr/lf]
[cr/lf]
12
Notation Value Range
mmmm Point comment number 0 to 29999
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND PCM TO CMU ………………………Outputs all point comments from the communication port.
SEND CMU TO PCM ………………………Inputs all point comments from the communication port.
Response:
RUN [cr/lf]
PC1 = ORIGIN POS[cr/lf]
PC3 = WAIT POS[cr/lf]
:
PC3999 = WORK100[cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
Write 3
Format
PCmmmm
9
Meaning Expresses a specified point comment.
10
Data Format
PCmmmm= sssssssssssssss[cr/lf]
Sample Description
13
SEND PC1 TO CMU ………………… Outputs the specified point comment from the communication port.
SEND CMU TO PC1 ………………… Inputs the specified point comment from communication port.
Response:
RUN [cr/lf]
PC1 = ORIGIN POS[cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, all point names currently stored are read out.
Write 3 When used as a write file, writing is performed with a point name number.
Format
PNM
9
Meaning Expresses all point names.
10 Data Format
11
:
PNmmmm= assssssss [cr/lf]
PNmmmm= assssssss [cr/lf]
[cr/lf]
12
Notation Value Range
mmmm Point comment number 0 to 29999
Name data Use only one-byte alphabetic character.
13
a
(the first character) Otherwise, "4.202: Input format error" occurs.
Use one-byte alphanumeric characters and _ (underscore). Otherwise, "4.202:
Name data (the second character Input format error" occurs.
ss...ss
onward) If name data exceeds 16 characters, then the 17th character onward will be
deleted.
Name data must not be duplicate. If name data were duplicate, delete the name data with the earlier point name
number and save the name data to newly specified point name number.
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND PNM TO CMU ………………………………………… Outputs all point names from the communication port.
SEND CMU TO PNM ………………………………………… Inputs all point names from the communication port.
Response:
RUN [cr/lf]
PN1=ORIGIN_POS [cr/lf]
PN3=WAIT_POS [cr/lf]
:
PN 3999=WORK 100 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
Write 3
Format
PNmmmm
9
Meaning Expresses a specified point name.
Data Format
10
PNmmmm= asssssssssssssss [cr/lf]
Notation
mmmm
Value
Point comment number
Range
0 to 29999
11
Name data Use only one-byte alphabetic character.
a
(the first character) Otherwise, "4.202: Input format error" occurs.
12
Use one-byte alphanumeric characters and _ (underscore). Otherwise, "4.202:
Name data (the second character Input format error" occurs.
ss...ss
onward) If name data exceeds 16 characters, then the 17th character onward will be
deleted.
13
Sample Description
SEND PN1 TO CMU ……………………… Outputs the specified point name from the communication port.
SEND CMU TO PN1 ……………………… Inputs the specified point name from the communication port.
Response:
RUN [cr/lf]
PN1=ORIGIN_POS [cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, all parameters currently stored are read out.
Write 3 When used as a write file, only the parameters specified by labels are written.
Format
PRM
9
Meaning Expresses all parameters.
10
Data Format
12
\parameter label\ [cr/lf]
C?=xxxxxx [cr/lf]
\parameter label\ [cr/lf]
R?=xxxxxx[cr/lf]
\parameter label\ [cr/lf]
13 R?A=xxxxxx,xxxxxx,xxxxxx,xxxxxx,xxxxxx,xxxxxx [cr/lf]
#parameter label# [cr/lf]
R?=xxxxxx[cr/lf]
#parameter label# [cr/lf]
R?A=xxxxxx,xxxxxx,xxxxxx,xxxxxx,xxxxxx,xxxxxx [cr/lf]
/parameter label/ [cr/lf]
C?O=xxxxxx,xxxxxx,xxxxxx,xxxxxx [cr/lf]
:
[cr/lf]
10
• "\" symbols may be displayed as "¥" depending on the computer environment.
Sample Description
Response: 12
RUN [cr/lf]
‘ V1.22,R0191-V1.000-V1.09,R0015/V1.09,R0015 [cr/lf]
‘ Gripper,V0.32/Gripper,V0.32///[cr/lf]
‘ PRM(0)[cr/lf]
\CNTTYP\[cr/lf]
13
C1=340[cr/lf]
\YCEADR\[cr/lf]
C1=0[cr/lf]
\DRVASGN\[cr/lf]
R1A=101,102,103,104,0,0[cr/lf]
R2A=0,0,0,0,0,0[cr/lf]
R3A=0,0,0,0,0,0[cr/lf]
R4A=0,0,0,0,0,0[cr/lf]
\RBTNUM\[cr/lf]
R1=2203[cr/lf]
:
[cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, only the parameter specified by a label is read out.
Write 3 When used as a write file, only the parameter specified by a label is written.
Format
10 Data Format 1
Data Format 3
Data Format 4
Data Format 5
Data Format 6
Data Format 7
Data Format 9
12
• Parameter labels are shown with 8 alphabetic characters.
• A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
13
• When writing parameter data, be sure that the servo is off.
• Parameters are already compatible with upper versions. However, parameters might not always be compatible
with lower versions (upward compatibility).
• When you attempt to load a parameter file of new version into a controller of an earlier version, "10.214:
Undefined parameter found" error may occur. In this case, you may load the parameter by setting the "PRM
SKIP" to "VALID". (For detail, refer to the operator’s manual.
• As parameters whose labels are enclosed in "\" are controller configuration parameters, take care when editing
them.
• As parameters whose labels are enclosed in "#" affect robot control, take care when editing them.
• "\" symbols may be displayed as "¥" depending on the computer environment.
Sample Description
Response:
RUN [cr/lf]
/ACCEL / [cr/lf]
R1A=100, 100, 100, 100 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, all shift coordinate data currently stored are read out.
Write 3 When used as a write file, writing is performed with a shift number.
Format
SFT
9
Meaning Expresses all shift coordinate data.
10
Data Format
11
:
Sm = fxxxxxx fyyyyyy fzzzzzz frrrrrr [cr/lf]
SPm = fxxxxxx fyyyyyy fzzzzzz frrrrrr [cr/lf]
SMm = fxxxxxx fyyyyyy fzzzzzz frrrrrr [cr/lf]
[cr/lf]
12
Notation Value Range
m Shift number 0 to 39
Sample Description
SEND SFT TO CMU ………………… Outputs all coordinate shift data from the communication port.
SEND CMU TO SFT ………………… Inputs all shift coordinate data from the communication port.
Response:
RUN [cr/lf]
S0 = 0.000 0.000 0.000 0.000 [cr/lf]
SP0= 0.000 0.000 0.000 0.000 [cr/lf]
SM0= 0.000 0.000 0.000 0.000 [cr/lf]
S1 = 1.000 1.000 1.000 1.000 [cr/lf]
:
SM39= 9.000 9.000 9.000 9.000 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
Write 3
Format
Sm
9
Meaning Expresses a specified shift definition.
10
Data Format
xxxxxx/yyyyyy/../rrrrrr Represent a numeric value of 7 digits or less, having 3 or less places below the decimal point.
12
13
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND S0 TO CMU ………………………… Outputs the specified shift coordinate data from
the communication port.
SEND CMU TO S0 ………………………… Inputs the specified shift coordinate data from
the communication port.
Response:
RUN [cr/lf]
S0 = 0.000 0.000 0.000 0.000[cr/lf]
SP0= 0.000 0.000 0.000 0.000[cr/lf]
SM0= 0.000 0.000 0.000 0.000[cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, all hand data currently stored are read out.
Write 3 When used as a write file, writing is performed with a hand number.
Format
HND
9
Meaning Expresses all hand data.
10
Data Format
11
[cr/lf]
12
m Hand number 0 to 31
n Robot number 1 to 4
13 Represent a real numeric value of 7 digits or less, having 3 or less places below the decimal point, or an
xxxxxx/yyyyyy/zzzzzz integer of 7 digits or less.
(This numeric format depends on the robot type setting and hand definition type.)
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND HND TO CMU …………… Outputs all hand data from the communication port.
SEND CMU TO HND …………… Intputs all hand data from the communication port.
Response:
RUN [cr/lf]
H0 = 1, 0.000, 0.000, 0.000 [cr/lf]
H1 = 1, 1.000, 1.000, 1.000 [cr/lf]
H2 = 2, 2.000, 2.000, 2.000 [cr/lf]
H3 = 2, 3.000, 3.000, 3.000 [cr/lf]
H4 = 3, 4.000, 4.000, 4.000 [cr/lf]
H5 = 3, 5.000, 5.000, 5.000 [cr/lf]
H6 = 4, 6.000, 6.000, 6.000 [cr/lf]
H7 = 4, 7.000, 7.000, 7.000 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
Write 3
Format
Hm
9
Meaning Expresses a specified hand definition.
10
Data Format
n Robot number 1 to 4
{R}
Coordinate sign
Sample Description
SEND H3 TO CMU ……… Outputs the specified hand definition data from the communication port.
SEND CMU TO H3 ……… Inputs the specified hand definition data from communication port.
Response:
RUN [cr/lf]
H3=2, 3.000, 3.000, 3.000, R [cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, all work data currently stored are read out.
Write 3 When used as a write file, writing is performed with a work number.
Format
WRKDEF
9
Meaning Expresses all work data.
10 Data Format
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND WRKDEF TO CMU ……………………… Outputs all work data from the communication port.
SEND CMU TO WRKDEF………………………… Intputs all work data from the communication port.
Response:
RUN [cr/lf]
W0 = 0.000, 0.000, 0.000, 0.000 [cr/lf]
W1 = 1.000, 1.000, 1.000, 1.000 [cr/lf]
W2 = 2.000, 2.000, 2.000, 2.000 [cr/lf]
W3 = 3.000, 3.000, 3.000, 3.000 [cr/lf]
W4 = 4.000, 4.000, 4.000, 4.000 [cr/lf]
W5 = 5.000, 5.000, 5.000, 5.000 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
Write 3
Format
Wm
9
Meaning Expresses a specified work definition.
Data Format
10
Wm = fxxxx.xxx fyyyy.yyy fzzzz.zzz frrrr.rrr [cr/lf]
11
Notation Value Range
m Work number 0 to 39
12
f Coordinate sign + / - / space
Numeric value consisting of an integer portion of up to 4 digits and having 3 or less places below the
xxxx.xxx/yyyyy.yy decimal point
zzzz.zzz/rrrr.rrr [Unit] xxxx.xxx/yyyyy.yy/zzzz.zzz: mm
rrrr.rrr: degree
13
Sample Description
SEND W3 TO CMU …………… Outputs the specified work data from the communication port.
SEND CMU TO W3 …………… Inputs the specified work data from communication port.
Response:
RUN [cr/lf]
W3= 3.000, 3.000, 3.000, 3.000 [cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, all pallet definitions currently stored are read out.
Write 3 When used as a write file, writing is performed with a pallet number.
Format
PLT
9
Meaning Expresses all pallet definitions.
Data Format
10 PLm [cr/lf]
PLN = XY [cr/lf]
NX = nnn [cr/lf]
NY = nnn [cr/lf]
11 NZ = nnn [cr/lf]
PLP = ppppp [cr/lf]
P[1] = fxxxxxx fyyyyyy fzzzzzz frrrrrr faaaaaa fbbbbbb t xr yr[cr/lf]
:
P[5] = fxxxxxx fyyyyyy fzzzzzz frrrrrr faaaaaa fbbbbbb t xr yr[cr/lf]
12 PLm [cr/lf]
:
[cr/lf]
0: T
he "mm → pulse" converted pulse data x (*1) range –180.00° < x < = 180.00°.
The first arm rotation information
xr 1: T
he "mm → pulse" converted pulse data x (*1) range 180.00° < x < = 540.00°.
for YK-TW series robot
-1: T
he "mm → pulse" converted pulse data x (*1) range –540.00° < x < = -180.00°.
*1: The joint-coordinates-converted pulse data represents each arm's distance (converted to angular data)
from its mechanical origin point.
*2: Integers indicate point data in "pulse" units, and real numbers in "mm" units.
When a dot is included, this is treated as point data in "mm" units.
Each piece of data is separated by one or more spaces.
Sample Description
10
SEND PLT TO CMU ………………………… Outputs all pallet definitions from the communication port.
SEND CMU TO PLT ………………………… Inputs all pallet definitions from the communication port.
Response:
11
RUN [cr/lf]
PL0[cr/lf]
PLN=XY[cr/lf]
NX = 3 [cr/lf] 12
NY = 4 [cr/lf]
NZ = 2 [cr/lf]
PLP= 3996[cr/lf]
13
P[1]= 0.000 0.000 0.000 0.000 0.000 0.000 [cr/lf]
P[2]= 100.000 0.000 0.000 0.000 0.000 0.000 [cr/lf]
P[3]= 0.000 100.000 0.000 0.000 0.000 0.000 [cr/lf]
P[4]= 100.000 100.000 0.000 0.000 0.000 0.000 [cr/lf]
P[5]= 0.000 0.000 50.000 0.000 0.000 0.000 [cr/lf]
PL1[cr/lf]
PLN= XY[cr/lf]
NX = 3[cr/lf]
NY = 4[cr/lf]
NZ = 2[cr/lf]
PLP= 3991[cr/lf]
P[1]= 0.000 0.000 0.000 0.000 0.000 0.000 [cr/lf]
P[2]= 100.000 100.000 0.000 0.000 0.000 0.000 [cr/lf]
P[3]= 0.000 200.000 0.000 0.000 0.000 0.000 [cr/lf]
P[4]= 100.000 200.000 0.000 0.000 0.000 0.000 [cr/lf]
P[5]= 0.000 0.000 100.000 0.000 0.000 0.000 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
Write 3
Format
PLm
9
Meaning Expresses a specified pallet definition.
Data Format
10 PLm [cr/lf]
PLN = XY [cr/lf]
PLP = ppppp [cr/lf]
NX = nnn [cr/lf]
11 NY
NZ
= nnn [cr/lf]
= nnn [cr/lf]
P[1] = fxxxxxx fyyyyyy fzzzzzz frrrrrr faaaaaa fbbbbbb t xr yr[cr/lf]
:
P[5] = fxxxxxx fyyyyyy fzzzzzz frrrrrr faaaaaa fbbbbbb t xr yr[cr/lf]
12 [cr/lf]
0: T
he "mm → pulse" converted pulse data x (*1) range –180.00° < x < = 180.00°.
The first arm rotation information
xr 1: T
he "mm → pulse" converted pulse data x (*1) range 180.00° < x < = 540.00°.
for YK-TW series robot
-1: T
he "mm → pulse" converted pulse data x (*1) range –540.00° < x < = -180.00°.
*1: The joint-coordinates-converted pulse data represents each arm's distance (converted to angular data)
from its mechanical origin point.
*2: Integers indicate point data in "pulse" units, and real numbers in "mm" units.
When a dot is included, this is treated as point data in "mm" units.
Each piece of data is separated by one or more spaces.
Sample Description
10
SEND PL2 TO CMU ………… Outputs the specified pallet definition from the communication port as
shown below.
SEND CMU TO PL2 ………… Inputs the specified pallet definition from the communication port as
shown below.
11
Response:
RUN [cr/lf]
PL2[cr/lf] 12
PLN=XY[cr/lf]
NX= 3[cr/lf]
NY= 3[cr/lf]
13
NZ= 2[cr/lf]
PLP= 3986[cr/lf]
P[1]= 100.000 100.000 50.000 90.000 0.000 0.000 [cr/lf]
P[2]= 200.000 100.000 50.000 90.000 0.000 0.000 [cr/lf]
P[3]= 100.000 200.000 50.000 90.000 0.000 0.000 [cr/lf]
P[4]= 200.000 200.000 50.000 90.000 0.000 0.000 [cr/lf]
P[5]= 100.000 10.000 100.000 90.000 0.000 0.000 [cr/lf]
[cr/lf]
END [cr/lf]
8 Format
GEP
GPm [cr/lf]
MODE=n [cr/lf]
10 IPADRS= aaa.aaa.aaa.aaa [cr/lf]
PORT=ppppp [cr/lf]
EOL=e [cr/lf]
TYPE=t [cr/lf]
11
:
TYPE=t [cr/lf]
[cr/lf]
13
aaa IP address 0 to 255
SEND GEP TO CMU …………………… Outputs all files of the general Ethernet port from 8
the communication port.
SEND CMU TO GEP …………………… Inputs all files of the general Ethernet port from
the communication port.
Response: 9
RUN [cr/lf]
GP0 [cr/lf]
MODE=1 [cr/lf]
IPADRS=192.168.0.1 [cr/lf]
PORT=100 [cr/lf]
10
EOL=0 [cr/lf]
TYPE=0 [cr/lf]
GP1 [cr/lf]
MODE=1 [cr/lf] 11
IPADRS=192.168.0.100 [cr/lf]
PORT=200 [cr/lf]
EOL=0 [cr/lf]
12
TYPE=0 [cr/lf]
[cr/lf]
END [cr/lf]
13
8
Read-out 3 When used as a read-out file, all input/output data currently stored are read out.
Write 3 When used as a write file, writing is performed with a input/output number.
Format
ION
9
Meaning Expresses all input/output name data.
Data Format
10 ioNMpp(b)=assssssssssssssss [cr/lf]
ioNMpp(b)=assssssssssssssss [cr/lf]
:
ioNMpp(b)=assssssssssssssss [cr/lf]
11 ioNMpp(b)=assssssssssssssss
[cr/lf]
[cr/lf]
12
io Input/output type DI / DO / SI / SO
pp Port number 2 to 7 / 10 to 15
b Bit number 0 to 7
Name data Use only one-byte alphabetic character.
a
13
(the first character) Otherwise, "4.202: Input format error" occurs.
Use one-byte alphanumeric characters and _ (underscore). Otherwise, "4.202:
Name data (the second character Input format error" occurs.
ss...ss
onward) If name data exceeds 16 characters, then the 17th character onward will be
deleted.
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
Response:
RUN [cr/lf]
DONM2(0)=DO_PORT2_0 [cr/lf]
DONM2(1)=DO_PORT2_1 [cr/lf]
:
SINM15(6)=SI_PORT15_6 [cr/lf]
SINM15(7)=SI_PORT15_7 [cr/lf]
[cr/lf]
END [cr/lf]
Name data must not be duplicate. When duplicate name data is saved, delete the name data with the earlier
point number and save the name data to the point number which is specified as the new destination to save to.
8
Read-out 3
3
Write
Restricted*
Format
ioNM() 9
ioNMpp(b)=asssssssssssssss [cr/lf]
:
11
ioNMpp(b)=asssssssssssssss [cr/lf]
[cr/lf]
12
Notation Value Range
io Input/output type DI / DO / SI / SO
2 to 7 / 10 to 15
pp Port number *Readable input/output type and Port number 13
DI: Up to Port14 / DO: Up to Port 10 / SI, SO: Up to Port 15
b Bit number 0 to 7
Name data Use only one-byte alphabetic character.
a
(the first character) Otherwise, "4.202: Input format error" occurs.
Use one-byte alphanumeric characters and _ (underscore). Otherwise, "4.202:
Name data (the second character Input format error" occurs.
ss...ss
onward) If name data exceeds 16 characters, then the 17th character onward will be
deleted.
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND DONM() TO CMU ………………… Outputs the specified input/output name data from
the communication port.
Response:
RUN [cr/lf]
DONM2(0)=DO_PORT2_0 [cr/lf]
DONM2(1)=DO_PORT2_1 [cr/lf]
:
DONM10(6)=DO_PORT10_6 [cr/lf]
DONM10(7)=DO_PORT10_7 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
3
Write
Restricted*
Format
9 ioNMpp()
11 ioNMpp(b)=asssssssssssssss [cr/lf]
:
ioNMpp(b)=asssssssssssssss [cr/lf]
[cr/lf]
12
Notation Value Range
io Input/output type DI / DO / SI / SO
13 pp Port number
2 to 7 / 10 to 15
*Readable input/output type and Port number
DI: Up to Port14 / DO: Up to Port 10 / SI, SO: Up to Port 15
b Bit number 0 to 7
Name data Use only one-byte alphabetic character.
a
(the first character) Otherwise, "4.202: Input format error" occurs.
Use one-byte alphanumeric characters and _ (underscore). Otherwise, "4.202:
Name data (the second character Input format error" occurs.
ss...ss
onward) If name data exceeds 16 characters, then the 17th character onward will be
deleted.
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND DONM2() TO CMU ……………… Outputs the specified input/output name data from
the communication port.
Response:
RUN [cr/lf]
DONM2(0)=DO_PORT2_0 [cr/lf]
DONM2(1)=DO_PORT2_1 [cr/lf]
:
DONM10(6)=DO_PORT10_6 [cr/lf]
DONM10(7)=DO_PORT10_7 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
3
Write
Restricted*
Format
ioNMpp(b) 9
ioNMpp(b)=asssssssssssssss [cr/lf]
[cr/lf]
11
Notation
io
Value
Input/output type
Range
DI / DO / SI / SO
12
2 to 7 / 10 to 15
pp Port number *Readable input/output type and Port number
DI: Up to Port14 / DO: Up to Port 10 / SI, SO: Up to Port 15
b Bit number 0 to 7 13
Name data Use only one-byte alphabetic character.
a
(the first character) Otherwise, "4.202: Input format error" occurs.
Use one-byte alphanumeric characters and _ (underscore). Otherwise, "4.202:
Name data (the second character Input format error" occurs.
ss...ss
onward) If name data exceeds 16 characters, then the 17th character onward will be
deleted.
Sample Description
SEND DONM2(0) TO CMU ………… Outputs the specified input/output name data from
the communication port.
Response:
RUN [cr/lf]
DONM2(0)=DO_PORT2_0 [cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, all area check output data currently stored are read out.
Write 3 When used as a write file, writing is performed with an area check output number.
Format
ACO
9
Meaning Expresses all area check output data.
10
Data Format
ACm=r,p1,p2,t,n,l [cr/lf]
11
ACm=r,p1,p2,t,n,l [cr/lf]
:
ACm=r,p1,p2,t,n,l [cr/lf]
ACm=r,p1,p2,t,n,l [cr/lf]
[cr/lf]
12
Notation Value Range / Meaning
m Area check output number 0 to 31
13 r Robot number 0 to 4 (0: Invalid)
l Logic 0: OFF / 1: ON
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND ACO TO CMU ………………………… Outputs all area check output data from the communication port.
SEND CMU TO ACO ………………………… Inputs all area check output data from the communication port.
Response:
RUN [cr/lf]
AC0=1,0,1,0,20,0 [cr/lf]
AC1=2,100,110,0,50,0 [cr/lf]
:
AC30=1,20,21,0,20,0 [cr/lf]
AC31=1,50,51,0,100,0 [cr/lf]
[cr/lf]
END[cr/lf]
8
Read-out 3
Write 3 When used as a write file, writing is performed with an area check output number.
Format
ACm
9
Meaning Expresses a specified area check output definition.
10
Data Format
ACm=r,p1,p2,t,n,l [cr/lf]
11
Notation Value Range / Meaning
12
m Area check output number 0 to 31
n
Port type
Port number
0: DO/SO 1: DO 2: SO 3: MO
20 to 277
13
l Logic 0: OFF / 1: ON
Sample Description
SEND AC0 TO CMU ………………………… Outputs specified area check output data from
the communication port.
SEND CMU TO AC0 ………………………… Inputs specified area check output data from
the communication port.
Response:
RUN [cr/lf]
AC0=1,0,1,0,20,0 [cr/lf]
END[cr/lf]
file 10-33
14 Real time output file
7
14.1 All real time output setting
8
Read-out 3 When used as a read-out file, all real time output setting currently stored are read out.
Write 3 When used as a write file, writing is performed with an real time output number.
Format
RTO
9
Meaning Expresses all real time output setting.
10
Data Format
RTm = n, o, p [cr/lf]
11
:
RTm = n, o, p [cr/lf]
[cr/lf]
13
o Option 1 Reference "14.3 Real time output setting list"
p Option 2
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND RTO TO CMU ………………………… Outputs all real time output data from the communication port.
Response:
RUN [cr/lf]
RT24=UCURPLS,1,1[cr/lf]
RT25=LCURPLS,1,1[cr/lf]
:
RT127=LPWRONCNT[cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
Write 3
Format
RTm
9
Meaning Expresses a specified real time output setting.
10
Data Format
RTm = n, o, p [cr/lf]
11
[cr/lf]
p Option 2
13
Sample Description
SEND RT24 TO ETH …………………… Outputs the specified real time output data from
the communication port.
Response:
RUN [cr/lf]
RT24=UCURPLS,1,1[cr/lf]
[cr/lf]
END [cr/lf]
file 10-35
14.3 Real time output setting list
7 Option 1 (o) Option 2 (p)
Output item (n) Meaning Unit Data type
Target Range Target Range
UCURPLS Current Pulse (upper) pulse high order LONG Robot 1 to 4 Axis 1 to 6
LCURPLS Current Pulse (lower) pulse low order LONG Robot 1 to 4 Axis 1 to 6
8 UREFPLS Reference Pulse (upper) pulse high order LONG Robot 1 to 4 Axis 1 to 6
LREFPLS Reference Pulse (lower) pulse low order LONG Robot 1 to 4 Axis 1 to 6
UCURVEL Current Speed (upper) pulse/10ms high order LONG Robot 1 to 4 Axis 1 to 6
LCURVEL Current Speed (lower) pulse/10ms low order LONG Robot 1 to 4 Axis 1 to 6
9 UREFVEL
LREFVEL
Reference Speed (upper)
Reference Speed (lower)
pulse/10ms
pulse/10ms
high order LONG
low order LONG
Robot
Robot
1 to 4
1 to 4
Axis
Axis
1 to 6
1 to 6
FDBCUR Feedback Current 0.01Arms SHORT Robot 1 to 4 Axis 1 to 6
REFCUR Reference Current 0.01Arms SHORT Robot 1 to 4 Axis 1 to 6
INPOS Tolerance – USHORT Robot 1 to 4 Axis 1 to 6
10 OUTPOS Out Valid Position – USHORT Robot 1 to 4 Axis 1 to 6
MTRDUTY Motor Duty % USHORT Robot 1 to 4 Axis 1 to 6
DRVDUTY Driver Duty % USHORT Robot 1 to 4 Axis 1 to 6
DRVMOD Driver Mode (1) – USHORT Robot 1 to 4 Axis 1 to 6
11 GRPPLS
UGRPOS
Gripper Current Pulse
Gripper Current Position (upper)
pulse
0.00001mm
LONG
high order LONG
Gripper
Gripper
1 to 4
1 to 4
–
–
–
–
LGRPOS Gripper Current Position (lower) 0.00001mm low order LONG Gripper 1 to 4 – –
GRPSTS Gripper Status (2) – USHORT Gripper 1 to 4 – –
12
USGI SGI (upper) – high order LONG SGI 0 to 31 – –
LSGI SGI (lower) – low order LONG SGI 0 to 31 – –
USGR SGR (upper) 0.001 high order LONG SGR 0 to 31 – –
LSGR SGR (lower) 0.001 low order LONG SGR 0 to 31 – –
TEMP Temperature ℃ USHORT – – – –
Accumulated motor data (Servo ON Count, Servo ON Time, Moving Distance), accumulated controller data (Power ON Count, Motor Power
ON Count, Operating Time) are initialized at the first boot in Ver.1.73 of RCX3 controller host CPU. Thereafter, the value is retained and
accumulated even if the power is turned off. The Motor and the Controller Accumulated Data can be reset by remote commands, respectively.
Reference Remote I/O manual
0x0033
in Operation 0x0034
0x0035 9
Return-to-Origin Operation 0x0036
5 Unused – – 13
4 READY signal in Preparation Normal
Unregistered 0x0000
RUN 0x0002
WAIT 0x0004
SUSPEND 0x0008
STOP 0x0010
file 10-37
15 All file
7
15.1 All file
8
Read-out 3
Write 3
Format
ALL
9
Meaning Expresses the minimum number of data files required to operate the robot system.
10 n NOTE
For details of each file, refer to that file's explanation.
11
Data Format
[PGM] ……………………………………………………………………………………………………………………………… All program format
12
NAME=< program name>
PGN=mmm
aaaa .... aaaaaaaa [cr/lf]
:
aaaa .... aaaaaaaa [cr/lf]
13 [cr/lf]
MODE=n [cr/lf]
:
11
TYPE=t [cr/lf]
[cr/lf]
ACm=r,p1,p2,t,n,l [cr/lf]
:
ACm=r,p1,p2,t,n,l [cr/lf]
[cr/lf]
• In readout files, only items whose data is saved in the controller is readout.
• In writing files, [xxx] determines the data file's format, and this format is saved at the controller.
Example: [HND]…All text data up the next [xxx] is saved at the controller as "all hand" format data.
Sample Description
SEND ALL TO CMU ………… Outputs all files of the entire system from the communication port.
SEND CMU TO ALL ………… Inputs all files of the entire system from the communication port.
8
Read-out 3 When used as a read-out file, information on entire program directory is read out.
Write - This file cannot be used as a write file.
Format
DIR
9
Meaning Expresses entire program directory.
10
Data Format
11
:
nnn, yy/mm/dd, hh:mm, bbbbbbb, llll, xx, ff, sssss…sssssssss [cr/lf]
[cr/lf]
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
Response:
RUN [cr/lf]
1, 15/01/10,10:14,100,24,RW,m,SAMPLE1 [cr/lf]
2, 15/01/18,18:00,50,18,RO,,SAMPLE2 [cr/lf]
3, 15/02/11,20:15,200,58,RW,c,SAMPLE3 [cr/lf]
4, 15/02/11,19:03,28,15,H,,SAMPLE4 [cr/lf]
10, 15/03/02, 20:21,592,288,RW,,SAMPLE10 [cr/lf]
24, 15/01/18,13:19,10,3,RW,,SAMPLE24 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
Write -
Format
<<program name>>
9
Meaning • Expresses information on one program.
• The program name is enclosed in << >> (double brackets).
10
Data Format
Sample Description
SEND <<SAMPLE1>> TO CMU …………… Outputs information on the specified program from
the communication port.
Response:
RUN [cr/lf]
1, 15/01/10,10:14,100,24,RW,m,SAMPLE1 [cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, information on entire parameter directory is read out.
Write - This file cannot be used as a write file.
Format
DPM
9
Meaning Expresses entire parameter directory.
Data Format
10 \mmmmmmmm\ a m n1 n2 n3 … n10 n11 n12 uuuuuu [cr/lf]
/mmmmmmmm/ a m n1 n2 n3 … n10 n11 n12 uuuuuu [cr/lf]
#mmmmmmmm# a m n1 n2 n3 … n10 n11 n12 uuuuuu [cr/lf]
[cr/lf]
11
Notation Value Range / Meaning
mmmmmmmm Parameter label 8 characters or less having some symbols
12 a Attribute
13
uuuuuu Units
* m: 0 ………….. n: n1 (Minimum value) / n2 (Maximum value)
m: 1 to 12 …… n: Enumerate all options input at "m" (Ex) "m" and "n" when "m" is 4: 4 0 1 2 3
• As parameters whose labels are enclosed in "\" are controller configuration parameters, take care when editing them.
• As parameters whose labels are enclosed in "#" affect robot control, take care when editing them.
• "\" symbols may be displayed as "¥" depending on the computer environment.
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND DPM TO CMU ……………… Outputs information on all parameter directory from the
communication port.
Response:
RUN [cr/lf]
‘PRM(0) [cr/lf]
\CNTTYP\ 16460 0 0 2147493647 [cr/lf]
\YCEADR\ 16396 0 0 99 [cr/lf]
\DRVASGN\ 16398 0 0 9906 [cr/lf]
:
/ARMTYP/ 0 3 0 1 2 [cr/lf]
#CPVMAX# 16 0 1 32767 mm/s [cr/lf]
:
/IOORGOUT/ 2052 0 0 27 [cr/lf]
/IOSRVOUT/ 2052 0 0 27 [cr/lf]
/GRPORGIN/ 2052 0 0 27 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
Write -
Format
MRF
9
Meaning Expresses all machine reference values of axes whose return-to-origin method is set as "Sensor" or
"Stroke-end".
10
Data Format
RnA=mmm,mmm,mmm,mmm,mmm,mmm [cr/lf]
11
:
RnA= mmm,mmm,mmm,mmm,mmm,mmm [cr/lf]
[cr/lf]
13
This file reads out the machine reference values of the axes set to the robots.
Example: W
hen the 1st through 6th axes of the robot 1 and 1st and 3rd axes of the robot 2 are connected,
the data is shown as follows.
R1A = mmm, mmm, mmm, mmm, mmm, mmm
R2A = mmm, mmm
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND MRF TO CMU ………………… Outputs all machine reference data from the communication port.
Response:
RUN[cr/lf]
R1A=53,47,58,25,55,59 [cr/lf]
:
R4A=52,58,41,38,61,50 [cr/lf]
[cr/lf]
END[cr/lf]
8
Read-out 3
Write -
Format
ARP
9
Meaning Expresses all machine reference values of axes whose return-to-origin method is set as "Mark".
10 Data Format
RnA=mmm,mmm,mmm,mmm,mmm,mmm [cr/lf]
:
RnA= mmm,mmm,mmm,mmm,mmm,mmm [cr/lf]
11 [cr/lf]
13 This file reads out the machine reference values of the axes set to the robots.
Example: W
hen the 1st through 6th axes of the robot 1 and 1st and 3rd axes of the robot 2 are connected,
the data is shown as follows.
R1A = mmm, mmm, mmm, mmm, mmm, mmm
R2A = mmm, mmm
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND ARP TO CMU ……………… Outputs all machine reference data from the communication port.
Response:
RUN[cr/lf]
R1A=53,47,58,25,55,59 [cr/lf]
:
R4A=52,58,41,38,61,50 [cr/lf]
[cr/lf]
END[cr/lf]
Format 8
ACD
Meaning Expresses all accumulated data. The accumulated data is the accumulated value such as the number of
times the controller power is turned on, the number of times the motor servo is turned on, the distance 9
traveled and so on since the controller was first turned on.
For details, refer to "14.3 Real time output setting list" in this chapter and "Real time output" in Remote I / O Manual.
10
Data Format
/PWRONCNT/[cr/lf]
RC=xxxxxxxxxx[cr/lf]
/MPWRONCNT/[cr/lf]
11
RC=xxxxxxxxxx[cr/lf]
/OPTIME/[cr/lf]
RC=xxxxxxxxxx[cr/lf]
/SRVONCNT/[cr/lf]
R?A=xxxxxxxxxx,xxxxxxxxxx,xxxxxxxxxxx,xxxxxxxxxxx,xxxxxxxxxx,xxxxxxxxxx[cr/lf]
/SRVONTIME/[cr/lf]
R?A=xxxxxxxxxx,xxxxxxxxxx,xxxxxxxxxxx,xxxxxxxxxxx,xxxxxxxxxx,xxxxxxxxxx[cr/lf]
12
/DISTTRVLD/[cr/lf]
R?A=xxxxxxxxxx,xxxxxxxxxx,xxxxxxxxxxx,xxxxxxxxxxx,xxxxxxxxxx,xxxxxxxxxx[cr/lf]
[cr/lf]
13
Notation Value Range / Meaning
RC Entire controller
R? Specifying robot
? Robot number 1 to 4
A All axes
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND ACD TO CMU ……… Outputs all accumulated data from the communication port.
Response:
RUN [cr/lf]
/PWRONCNT/[cr/lf] ………… Count of times the controller power is turned on
RC=1[cr/lf]
/MPWRONCNT/[cr/lf] ………… Count of times the controller motor power is turned on
RC=0[cr/lf]
/OPTIME/[cr/lf] ………… Total operating time of the controller
RC=2500[cr/lf]
/SRVONCNT/[cr/lf] ………… Count of times of Servo ON for all axes of Robot 1
R1A=0,0,0,0[cr/lf]
/SRVONTIME/[cr/lf] ………… Total servo ON time for all axes of Robot 1
R1A=0,0,0,0[cr/lf]
/DISTTRVLD/[cr/lf] ………… Total travel distance of all axes of robot 1
R1A=0,0,0,0[cr/lf]
[cr/lf]
END [cr/lf]
file 10-45
20 System configuration information file
7
Read-out 3
Write -
8 Format
CFG
s Specification G: CE / L: Normal
13
kkkkkk Memory size
ff MAC address
r Robot number 1 to 4
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND CFG TO CMU …………………………… Outputs all the system configuration file from
the communication port.
Response:
RUN [cr/lf]
C1:340,L,I,2.1MB,00-04-C6-FF-83-12[cr/lf]
R1:MULTI,1234[cr/lf]
[cr/lf]
END [cr/lf]
Format 8
VER
cv Host version
13
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND VER TO CMU …………………………… Outputs all files of the version information from
the communication port.
Response:
RUN [cr/lf]
C1:V1.22,R0191-V1.000-V1.09,R0015/V1.09,R0015 [cr/lf]
C2:V1.22,R0191-V1.000-V1.09,R0015/V1.09,R0015 [cr/lf]
C3:V1.22,R0191-V1.000-V1.09,R0015/V1.09,R0015 [cr/lf]
C4:V1.22,R0191-V1.000-V1.09,R0015/V1.09,R0015 [cr/lf]
[cr/lf]
END [cr/lf]
file 10-47
22 Option board file
7
Read-out 3
Write -
8 Format
OPT
CmOn:aaaaaa,Vb.bb [cr/lf]
10 CmOn:aaaaaa,Vb.bb [cr/lf]
:
CmOn:aaaaaa,Vb.bb [cr/lf]
CmOn:aaaaaa,Vb.bb [cr/lf]
[cr/lf]
11
Notation Value Range
m Controller number 1 onward
12 n
Option board number
Slot number: 1 to 4
inside the controller
aaaaaa Option board name
13
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND OPT TO CMU …………………………… Outputs all files of the option boards from
the communication port.
Response:
RUN [cr/lf]
C1O1:Gripper,V0.32 [cr/lf]
C1O2:Gripper,V0.32 [cr/lf]
[cr/lf]
END [cr/lf]
Format 8
SCK
gg.bbb:mmmm [cr/lf]
gg.bbb:mmmm
:
[cr/lf]
10
gg.bbb:mmmm [cr/lf]
gg.bbb:mmmm [cr/lf]
[cr/lf]
11
bbb
Alarm group number
13
C?: Controller (?: Controller number)
A?: Axis (?: Axis number)
mmmm Alarm occurrence location M?: Driver (?: Driver number)
R?: Option board (?: Option board number inside the controller)
T?: Task (?: Task number)
ETH: Ethernet
CMU: RS-232C
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND SCK TO CMU ………………………………… Outputs all files of the self check information from
the communication port.
Response:
RUN [cr/lf]
12.600:C1M1 [cr/lf]
12.600:C1M2 [cr/lf]
12.600:C1M3 [cr/lf]
12.600:C1M4 [cr/lf]
[cr/lf]
END [cr/lf]
file 10-49
24 Alarm history file
7
Read-out 3
Write -
8 Format
LOG
10
iiiii, jjjjjjjj, kkkkkkkk, llllllll, oooooooo, pppppppp,
pppppppp, pppppppp, pppppppp, pppppppp, pppppppp, q [cr/lf]
nnn:yy/mm/dd, hh:mm:ss, gg.bbb : aaaa,c, eee : ffff,
iiiii, jjjjjjjj, kkkkkkkk, llllllll, oooooooo, pppppppp,
pppppppp, pppppppp, pppppppp, pppppppp, pppppppp, q [cr/lf]
11
:
nnn:yy/mm/dd, hh:mm:ss, gg.bbb : aaaa,c, eee : ffff,
iiiii, jjjjjjjj, kkkkkkkk, llllllll, oooooooo, pppppppp,
pppppppp, pppppppp, pppppppp, pppppppp, pppppppp, q [cr/lf]
[cr/lf]
12
13
9
bbb Alarm classification number
I: Illegal
11
M: Manual mode
c Operation mode
A: Automatic mode (with programming box)
O: Automatic mode (with other devices)
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND LOG TO CMU………… Outputs all files of the alarm history from the communication port.
Response:
RUN [cr/lf]
1:15/03/30,08:23:05,1.100:RC,O,:,0,00000000,00000012,00000000,00000112,,,,,,, [cr/lf]
2:15/03/30,08:23:05,5.288: RC,O,:,0,00000000,00000010,00000000,00000110,,,,,,, [cr/lf]
:
500:15/03/18,10:23:04,5.228:T01,O,17:3,,00000000,00000010,00000000,00000110,40119,100000,99996,39375,0,0,0 [cr/lf]
[cr/lf]
END [cr/lf]
file 10-51
25 Remaining memory size file
7
Read-out 3
Write -
8 Format
MEM
PGM+PNT AREA=mmmmmmm/nnnnnnnn[cr/lf]
10 VAR AREA=xxxxx/yyyyy[cr/lf]
[cr/lf]
Notation Value
11 mmmmmmm Remaining memory size of program and point area
12
yyyyy Total memory size of variable area
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
13 SEND MEM TO CMU …………………………… Outputs all files of the remaining memory size from
the communication port.
Response:
RUN [cr/lf]
PGM+PNT AREA=2088547 / 2100000 [cr/lf]
VAR AREA=23220 / 24000 [cr/lf]
[cr/lf]
END [cr/lf]
Format 9
VAR
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND VAR TO CMU …………………………… Outputs all global variables from the communication port.
SEND CMU TO VAR …………………………… Inputs all global variables from the communication port.
Response:
RUN [cr/lf]
A%=150 [cr/lf]
B!=1.0234E1 [cr/lf]
C1$=“SAMPLE1” [cr/lf]
C2$=“SAMPLE2” [cr/lf]
[cr/lf]
END [cr/lf]C1$="CNS_1"[cr/lf]
C2$="CNS_2"[cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
Write 3
Format
9 variable name t
Data Format
10 xxxxxx [cr/lf]
13
Dynamic global variables are registered during program execution.
Variables cannot be referred to unless they are registered.
Sample 1 Description
SEND A% TO CMU [cr/lf] ……………… Outputs the specified variable A% from the communication
port.
Response:
150 [cr/lf]
Sample 2 Description
SEND CMU TO A% [cr/lf] ………… Inputs the specified variable A% from the communication port.
Response:
300 [cr/lf] ……………………………………… Data input to the controller.
OK [cr/lf] ……………………………………… Result output from the controller.
SGI
10
Meaning Expresses all integer static variables.
Data Format 11
SGIn=xxxxxx [cr/lf]
SGIn=xxxxxx [cr/lf]
:
SGIn=xxxxxx [cr/lf] 12
[cr/lf]
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND SGI TO CMU ……………… Outputs all integer type static variables from the communication
port.
SEND CMU TO SGI ……………… Inputs all integer type static variables from the communication
port.
Response:
RUN [cr/lf]
SGR0=0 [cr/lf]
SGR1=0 [cr/lf]
:
SGR31=0 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
Write 3
Format
SGIn
9
Meaning Expresses a specified integer type static variable.
10 Data Format
xxxxxx [cr/lf]
11
Notation Value Range
n Integer type static variable number 0 to 31
Sample Description
13 SEND SGI1 TO CMU ……………… Outputs the specified integer type static variables (SGI1)
from the communication port.
SEND CMU TO SGI1 ……………… Inputs the specified integer type static variables (SGI1)
from the communication port.
Response:
RUN [cr/lf]
0 [cr/lf]
END [cr/lf]
Format 9
SGR
SGRn=xxxxxx [cr/lf]
SGRn=xxxxxx [cr/lf]
11
:
SGRn=xxxxxx [cr/lf]
[cr/lf]
12
Notation Value Range
n Real type static variable number 0 to 31
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND SGR TO CMU ……………… Outputs all real type static variables from the communication
port.
SEND CMU TO SGR ……………… Inputs all real type static variables from the communication
port.
Response:
RUN [cr/lf]
SGI0=0 [cr/lf]
SGI1=0 [cr/lf]
:
SGI31=0 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
Write 3
Format
SGRn
9
Meaning Expresses a specified real type static variable.
10 Data Format
xxxxxx [cr/lf]
11
Notation Value Range
n Real type static variable number 0 to 31
Sample Description
13
SEND SGR1 TO CMU ……………………… Outputs the specified real type static variables (SGR1)
from the communication port.
SEND CMU TO SGR1 ……………………… Inputs the specified real type static variables (SGR1)
from the communication port.
Response:
RUN [cr/lf]
0 [cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, the specified character string is read out.
Write - This file cannot be used as a write file.
Format
"character string"
9
Meaning Expresses a specified character string.
Data Format 10
sssss...ssssss[cr/lf]
11
Notation Value Range
sssss...ssssss Character string 255 characters or less
12
Output of " symbol (double quotation) is shown with successive " symbol.
Sample Description
13
SEND """YAMAHA ROBOT""" TO CMU ……………………… Outputs the specified character string
from the communication port.
Response:
"YAMAHA ROBOT"[cr/lf]
8
Read-out 3 When used as a read-out file, all array variables are read out.
Write 3 When used as a write file, a specified array variable is written.
Format
ARY
9
Meaning Expresses all array variables.
Data Format
10 variable name t(l{,m{,n}}) = xxxxxx [cr/lf]
variable name t(l{,m{,n}}) = xxxxxx [cr/lf]
:
variable name t(l{,m{,n}}) = xxxxxx [cr/lf]
11
[cr/lf]
12
name defined in the DIM statement consisting of alphanumeric characters and _ (underscore).
l, m, n Array arguments
13
Integer type: Integer of -2147483647 to 2147483647
xxxxxx Value of variable Real type: Real number of 7 digits or less including decimal fractions
Character type: Character string of 255 characters or less
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND ARY TO CMU ……………… Outputs all global array variables from the communication port.
SEND CMU TO ARY ……………… Inputs all global array variables from the communication port.
Response:
RUN [cr/lf]
A!(0)=0 [cr/lf]
A!(1)=1.E2 [cr/lf]
A!(2)=2.E2 [cr/lf]
B%(0,0)=0 [cr/lf]
B%(0,1)=1111 [cr/lf]
B%(1,0)=2222 [cr/lf]
B%(1,0)=3333 [cr/lf]
C$(0,0,0)= “ARY1” [cr/lf]
C$(0,0,1)= “ARY2” [cr/lf]
C$(0,1,0)= “ARY3” [cr/lf]
C$(0,1,1)= “ARY4” [cr/lf]
C$(1,0,0)= “ARY5” [cr/lf]
C$(1,0,1)= “ARY6” [cr/lf]
C$(1,1,0)= “ARY7” [cr/lf]
C$(1,1,1)= “ARY8” [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3
Write 3
Format
Data Format 10
xxxxxx [cr/lf]
11
Notation Value Range / Meaning
Variable Global variable Variable name is shown with 32 characters or less
name defined in the DIM statement consisting of alphanumeric characters and _ (underscore).
Array variables defined by the DIM statement are registered during compiling. Array variables cannot be referred
to unless they are registered.
Sample 1 Description
SEND C1$(2) TO CMU ……… Outputs the specified array variable C1$(2) from the
communication port.
Response:
YAMAHA ROBOT [cr/lf]
Sample 2 Description
SEND CMU TO C1$(2) ……… Inputs the specified array variable C1$(2) from the
communication port.
Response:
OK [cr/lf]
8
Read-out 3 When used as a read-out file, all DI information is read out.
Write - This file cannot be used as a write file.
Format
DI()
9
Meaning Expresses all DI (parallel input variable) information.
10 Data Format
DI0()=&Bnnnnnnnn [cr/lf]
DI1()=&Bnnnnnnnn [cr/lf]
11
:
DI27()=&Bnnnnnnnn [cr/lf]
[cr/lf]
13
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND DI() TO CMU ……………… Outputs all DI information from the communication port.
Response:
DI0()=&B10001001[cr/lf]
DI1()=&B00000010[cr/lf]
DI2()=&B00000000[cr/lf]
:
DI7()=&B00000000[cr/lf]
DI10()=&B00000000[cr/lf]
DI11()=&B00000000[cr/lf]
DI12()=&B00000000[cr/lf]
:
DI17()=&B00000000[cr/lf]
DI20()=&B00000000[cr/lf]
:
DI26()=&B00000000[cr/lf]
DI27()=&B00000000[cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, the specified DI port status is read out.
Write - This file cannot be used as a write file.
Format
DIm()
9
Meaning Expresses the status of one DI port.
Data Format 10
DIm()=&Bnnnnnnnn[cr/lf]
11
Notation Value Range
m Port number 0 to 7 / 10 to 17 / 20 to 27
n
Port status
(Binary counting)
"0" or "1" (total of 8 digits)
Corresponds to m7, m6, …,m0, reading from the left ("m": port No.).
12
Sample Description
SEND DI5() TO CMU …………… Outputs the DI5 port status from the communication port.
13
Response:
RUN [cr/lf]
DI15()=&B00000000 [cr/lf]
END [cr/lf]
DI file 10-63
30 DO file
7
30.1 All DO information
8
Read-out 3 When used as a read-out file, all DO information is read out.
3 When used as a write file, the value is written to the specified DO port.
Write
Restricted* *Writing to DO0() and DO1() is prohibited.
Format
9 DO()
10 Data Format
DO0()=&Bnnnnnnnn [cr/lf]
DO1()=&Bnnnnnnnn [cr/lf]
11
:
DO27()=&Bnnnnnnnn [cr/lf]
[cr/lf]
13
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND DO() TO CMU …………… Outputs all DO information from the communication port.
Response:
RUN [cr/lf]
DO0()=&B10001001[cr/lf]
DO1()=&B00000010[cr/lf]
DO2()=&B00000000[cr/lf]
:
DO7()=&B00000000[cr/lf]
DO10()=&B00000000[cr/lf]
DO11()=&B00000000[cr/lf]
DO12()=&B00000000[cr/lf]
:
DO17()=&B00000000[cr/lf]
DO20()=&B00000000[cr/lf]
:
DO26()=&B00000000[cr/lf]
DO27()=&B00000000[cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, the specified DO port status is read out.
3 When used as a write file, the value is written to the specified DO port.
Write
Restricted* *Writing to DO0() and DO1() is prohibited.
Format
DOm() 9
11
Readout file
Data Format
DOm()=&Bnnnnnnnn[cr/lf]
12
Write file
Data Format
&Bnnnnnnnn[cr/lf] or k[cr/lf]
13
Port status
k Integer from 0 to 255
(Decimal counting)
Sample 1 Description
SEND DO5() TO CMU …………… Outputs the DO5 port status from the communication port.
Response:
RUN [cr/lf]
DO5()=&B00000000[cr/lf]
END [cr/lf]
Sample 2 Description
SEND CMU TO DO5() …………… Inputs the DO5 port status from the communication port.
&B00000111
Response:
OK [cr/lf]
DO file 10-65
31 MO file
7
31.1 All MO information
8
Read-out 3 When used as a read-out file, all MO information is read out.
3 When used as a write file, the value is written to the specified MO port.
Write
Restricted* *Writing to MO30() and DO37() is prohibited.
Format
9 MO()
10 Data Format
MO0()=&Bnnnnnnnn [cr/lf]
MO1()=&Bnnnnnnnn [cr/lf]
11
:
MO37()=&Bnnnnnnnn [cr/lf]
[cr/lf]
13
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND MO() TO CMU …………… Outputs all MO information from the communication port.
Response:
RUN [cr/lf]
MO0()=&B10001001 [cr/lf]
MO1()=&B00000010 [cr/lf]
MO2()=&B00000000 [cr/lf]
:
MO7()=&B00000000 [cr/lf]
MO10()=&B00000000 [cr/lf]
MO11()=&B00000000 [cr/lf]
MO12()=&B00000000 [cr/lf]
:
MO17()=&B00000000 [cr/lf]
MO20()=&B00000000 [cr/lf]
:
MO27()=&B00000000 [cr/lf]
MO30()=&B00000000 [cr/lf]
:
MO36()=&B00000000 [cr/lf]
MO37()=&B00000000 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, the specified MO port status is read out.
3 When used as a write file, the value is written to the specified MO port.
Write
Restricted* *Writing to MO30() to MO37() is prohibited.
Format
MOm() 9
Meaning Expresses the status of one MO port.
10
Writing to MO30() to MO37() is prohibited. Only referencing is permitted.
Readout file 11
Data Format
MOm()=&Bnnnnnnnn[cr/lf]
12
Write file
Data Format
13
&Bnnnnnnnn[cr/lf] or k[cr/lf]
Port status
k Integer from 0 to 255
(Decimal counting)
Sample 1 Description
SEND MO5() TO CMU …………… Outputs the MO5 port status from the communication port.
Response:
RUN [cr/lf]
MO5()=&B00000000[cr/lf]
END [cr/lf]
Sample 2 Description
SEND CMU TO MO5() …………… Inputs the MO5 port status from the communication port.
&B00000111
Response:
OK [cr/lf]
MO file 10-67
32 LO file
7
32.1 All LO information
8
Read-out 3 When used as a read-out file, all LO information is read out.
Write 3 When used as a write file, the value is written to the specified LO port.
Format
LO()
9
Meaning Expresses all LO (internal output variable) information.
Data Format
10 LO0()=&Bnnnnnnnn [cr/lf]
LO1()=&Bnnnnnnnn [cr/lf]
[cr/lf]
12
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
13 SEND LO() TO CMU …………………………………… Outputs all LO status from the communication port.
Response:
RUN [cr/lf]
LO0()=&B10001001 [cr/lf]
LO1()=&B00100100 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, the specified LO port status is read out.
Write 3 When used as a write file, the value is written to the specified LO port.
Format
LOm()
9
Meaning Expresses the status of one LO port.
Readout file
Data Format 10
LOm()=&Bnnnnnnnn[cr/lf]
Write file 11
Data Format
&Bnnnnnnnn[cr/lf] or k[cr/lf]
12
Notation Value Range
m Port number 0, 1
n
Port status
(Binary counting)
"0" or "1" (total of 8 digits)
Corresponds to m7, m6, …,m0, reading from the left ("m": port No.).
13
Port status
k Integer from 0 to 255
(Decimal counting)
Sample 1 Description
SEND LO0() TO CMU …………… Outputs the LO0 port status from the communication port.
Response:
RUN [cr/lf]
LO0()=&B00000000[cr/lf]
END [cr/lf]
Sample 2 Description
SEND CMU TO LO0() …………… Inputs the LO0 port status from the communication port.
&B00000111
Response:
OK [cr/lf]
LO file 10-69
33 TO file
7
33.1 All TO information
8
Read-out 3 When used as a read-out file, all TO information is read out.
Write 3 When used as a write file, the value is written to the specified TO port.
Format
TO()
9
Meaning Expresses all TO (timer output variable) information.
Data Format
10 TO0()=&Bnnnnnnnn [cr/lf]
TO1()=&Bnnnnnnnn [cr/lf]
[cr/lf]
11
Notation Value Range
Port status "0" or "1" (total of 8 digits)
n
(Binary counting) Corresponds to m7, m6, …,m0, reading from the left ("m": port No.).
12
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
13 SEND TO() TO CMU …………………………………… Outputs all TO status from the communication port.
SEND CMU TO TO() …………………………………… Inputs all TO status from the communication port.
Response:
RUN [cr/lf]
TO0()=&B10001001 [cr/lf]
TO1()=&B10001001 [cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, the specified TO port status is read out.
Write 3 When used as a write file, the value is written to the specified TO port.
Format
TOm()
9
Meaning Expresses the status of one TO port.
Readout file
Data Format 10
TOm()=&Bnnnnnnnn[cr/lf]
Write file 11
Data Format
&Bnnnnnnnn[cr/lf] or k[cr/lf]
12
Notation Value Range
m Port number 0, 1
n
Port status "0" or "1" (total of 8 digits) 13
(Binary counting) Corresponds to m7, m6, …,m0, reading from the left ("m": port No.).
Port status
k Integer from 0 to 255
(Decimal counting)
Sample 1 Description
SEND TO0() TO CMU …………… Outputs the TO0 port status from the communication port.
Response:
RUN [cr/lf]
TO0()=&B00000000[cr/lf]
END [cr/lf]
Sample 2 Description
SEND CMU TO TO0() …………… Inputs the TO0 port status from the communication port.
&B00000111
Response:
OK [cr/lf]
TO file 10-71
34 SI file
7
34.1 All SI information
8
Read-out 3 When used as a read-out file, all SI information is read out.
Write - This file cannot be used as a write file.
Format
SI()
9
Meaning Expresses all SI (serial input variable) information.
Data Format
10 SI0()=&Bnnnnnnnn [cr/lf]
SI1()=&Bnnnnnnnn [cr/lf]
:
SI27()=&Bnnnnnnnn [cr/lf]
11 [cr/lf]
13
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND SI() TO CMU …………………………………… Outputs all SI status from the communication port.
Response:
RUN [cr/lf]
SI0()=&B10001001[cr/lf]
SI1()=&B00000010[cr/lf]
SI2()=&B00000000[cr/lf]
:
SI7()=&B00000000[cr/lf]
SI10()=&B00000000[cr/lf]
SI11()=&B00000000[cr/lf]
SI12()=&B00000000[cr/lf]
:
SI17()=&B00000000[cr/lf]
SI20()=&B00000000[cr/lf]
:
SI26()=&B00000000[cr/lf]
SI27()=&B00000000[cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, the specified SI port status is read out.
Write - This file cannot be used as a write file.
Format
SIm()
9
Meaning Expresses the status of one SI port.
Data Format
SIm()=&Bnnnnnnnn[cr/lf]
10
12
Sample Description
SEND SI5() TO CMU …………………… Outputs the SI5 port status from the communication port.
13
Response:
RUN [cr/lf]
SI5()=&B00000000 [cr/lf]
END [cr/lf]
SI file 10-73
35 SO file
7
35.1 All SO information
8
Read-out 3 When used as a read-out file, all SO information is read out.
3 When used as a write file, the value is written to the specified SO port.
Write
Restricted* *Writing to SO0() and SO1() is prohibited.
Format
9 SO()
10 Data Format
SO0()=&Bnnnnnnnn [cr/lf]
SO1()=&Bnnnnnnnn [cr/lf]
11
:
SO27()=&Bnnnnnnnn [cr/lf]
[cr/lf]
13
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND SO() TO CMU …………………………………… Outputs all SO status from the communication port.
Response:
RUN [cr/lf]
SO0()=&B10001001[cr/lf]
SO1()=&B00000010[cr/lf]
SO2()=&B00000000[cr/lf]
:
SO7()=&B00000000[cr/lf]
SO10()=&B00000000[cr/lf]
SO11()=&B00000000[cr/lf]
SO12()=&B00000000[cr/lf]
:
SO17()=&B00000000[cr/lf]
SO20()=&B00000000[cr/lf]
:
SO26()=&B00000000[cr/lf]
SO27()=&B00000000[cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, the specified SO port status is read out.
3 When used as a write file, the value is written to the specified SO port.
Write
Restricted* *Writing to SO0() and SO1() is prohibited.
Format
SOm() 9
11
Readout file
Data Format
SOm()=&Bnnnnnnnn[cr/lf]
12
Write file
Data Format
SOm()=&Bnnnnnnnn[cr/lf]
13
Port status
k Integer from 0 to 255
(Decimal counting)
Sample 1 Description
SEND SO5() TO CMU ………………………… Outputs the SO5 port status from the communication port.
Response:
RUN [cr/lf]
SO5()=&B00000000[cr/lf]
END [cr/lf]
Sample 2 Description
SEND CMU TO SO5() ………………………… Inputs the SO5 port status from the communication port.
&B00000111
Response:
OK [cr/lf]
SO file 10-75
36 SIW file
7
36.1 All SIW data
8
Read-out 3 When used as a read-out file, all SIW information is read out in hexadecimal digit.
Write - This file cannot be used as a write file.
Format
SIW()
9
Meaning Expresses all SIW (serial word input) data.
Data Format *
10 SIW(0)=&Hnnnn [cr/lf]
SIW(1)=&Hnnnn [cr/lf]
:
SIW(15)=&Hnnnn [cr/lf]
11 [cr/lf]
13 A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample * Description
SEND SIW() TO CMU ………………………………… Outputs all SIW data from the communication port.
Response:
RUN [cr/lf]
SIW(0)=&H1001[cr/lf]
SIW(1)=&H0010[cr/lf]
SIW(2)=&H0000[cr/lf]
:
SIW(15)=&H0000[cr/lf]
[cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, the specified SIW status is read out in hexadecimal digit.
Write - This file cannot be used as a write file.
Format
SIW(m)
9
Meaning Expresses one SIW status.
Data Format 10
SIW(m)=&Hnnnn [cr/lf]
Port status
12
n 0 to 9 and A to F: 4 digits (hexadecimal)
(Hexadecimal counting)
*When SIOW extension is enabled, the range of port number is extended to 2 -15, 24 - 127.
For details, refer to RCX3 user's /operator’s manual "Option board related parameters".
Sample Description
13
SEND SIW(5) TO CMU ………………………………………………… Outputs SIW(5) from the communication port.
Response:
RUN [cr/lf]
SIW(5)=&H1001[cr/lf]
END [cr/lf]
8
Read-out 3 When used as a read-out file, all SOW information is read out in hexadecimal digit.
3 When used as a write file, the value is written to the specified SOW port
Write
Restricted*1 *1) Writing to SOW(0) and SOW(1) is prohibited.
Format
9 SOW()
SOW(0)=&Hnnnn [cr/lf]
11
SOW(1)=&Hnnnn [cr/lf]
:
SOW(15)=&Hnnnn [cr/lf]
[cr/lf]
12
Notation Value Range
Port status
n 0 to 9 and A to F: 4 digits (hexadecimal)
(Hexadecimal counting)
13
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample *2 Description
SEND SOW() TO CMU …………………………………… Outputs all SOW data from the communication port.
Response:
RUN [cr/lf]
SOW(0)=&H1001[cr/lf]
SOW(1)=&H0010[cr/lf]
SOW(2)=&H0000[cr/lf]
:
SOW(15)=&H0000[cr/lf]
[cr/lf]
END [cr/lf]
*2) When SIOW extension is enabled, SIW(24) - SIW(127) are also read-out.
For details, refer to RCX3 user's /operator’s manual "Option board related parameters".
8
When used as a read-out file, the specified SOW port status is read out
Read-out 3
in hexadecimal digit.
3 When used as a write file, the value is written to the specified SOW port.
Write
Restricted *1 *1) Writing to SOW(0) and SOW(1) is prohibited.
Format
9
SOW(m)
Readout file
Data Format 11
SOW(m)=&Hnnnn [cr/lf]
Write file 12
Data Format
&Hnnnn
13
Notation Value Range
m Port number 2 to 15 *2
Port status
n 0 to 9 and A to F: 4 digits (hexadecimal)
(Hexadecimal counting)
*When SIOW extension is enabled, the range of port number is extended to 2 -15, 24 - 127.
For details, refer to RCX3 user's /operator’s manual "Option board related parameters".
A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
Sample Description
SEND SOW(5) TO CMU ………………………………………………… Outputs SOW(5) from the communication port.
Response:
RUN [cr/lf]
SOW(5)=&H1001[cr/lf]
END [cr/lf]
8 Format
EOF
9 Meaning T
his file is a special file consisting only of a ^Z (=1Ah) code.
When transmitting data to an external device through the communication port,
the EOF data can be used to add a ^Z code at the end of file.
10 Data Format
^Z (=1Ah)
11 Sample Description
12 NAME=TEST1[cr/lf]
A=1[cr/lf]
:
HALT[cr/lf]
13 [cr/lf]
^Z
A "^Z" code may be required at the end of the transmitted file, depending on the specifications of the receiving
device and application.
Format 8
CMU
9
Meaning • Expresses the serial communication port.
• Depends on the various data formats.
Sample Description
10
SEND PNT TO CMU ………………………… Outputs all point data from the communication port.
SEND CMU TO PNT ………………………… Inputs all point data from the communication port.
11
12
13
8 Format
ETH
Sample Description
10
SEND PNT TO ETH ………………………………………………………… Outputs all point data from the Ethernet port.
SEND ETH TO PNT ………………………………………………………… Inputs all point data from the Ethernet port.
11
12
13
START
9
STOP
33C01-R7-00
11
Sample
12
MOVE P, 300.000 300.000 50.000 90.000 0.000 0.000
MOVE P, 300.000 100.000 0.000 0.000 0.000 0.000
MOVE P, 200.000 200.000 10.000 -90.000 0.000 0.000
HALT
13
9
P1= 100.000 0.000 150.000 30.000 0.000 0.000
P2= 0.000 100.000 50.000 0.000 0.000 0.000
P3= 300.000 300.000 0.000 0.000 0.000 0.000
P4= 300.000 100.000 100.000 90.000 0.000 0.000
P5= 200.000 200.000 0.000 0.000 0.000 0.000
10
Processing flow
11 START
PTP movement to P0
PTP movement to P1
12 PTP movement to P2
PTP movement to P3
PTP movement to P4
PTP movement to P5
13 STOP
33C02-R7-00
Sample 1
MOVE P,P0
MOVE P,P1
MOVE P,P2
MOVE P,P3
MOVE P,P4
MOVE P,P5
HALT
Sample 2
FOR J=0 TO 5
MOVE P,P[J]
NEXT J
HALT
Although the same operation is executed by both SAMPLE 1 and SAMPLE 2, the program can be shortened by using
point numbers and the FOR statement.
9
S1= 140.000 -100.000 0.000 0.000
Shift Coordinate
10
Y+
P3
Shift Coordinate
S0
Shift Coordinate
P4
12
S1
X+
0
100
13
140
33C03-R7-00
Sample Description
Point Data
10
Work supply position:
P0= 0.000 0.000 0.000 0.000 0.000 0.000
X-axis pitch:
P10= 50.000 0.000 0.000 0.000 0.000 0.000
Y-axis pitch:
11 P20=
N1 position:
0.000 25.000 0.000 0.000 0.000 0.000
Y+
13
N11 N12 N13 N14 N15
N6 N7 N8 N9 N10
25 X+
N1 N2 N3 N4 N5
50 P0
33C04-R7-00
Processing flow
START
STOP
31C05-R7-00
NEXT J
P100=P200
9
HALT
10
11
12
13
Point Data
9 Work supply position:
P0= 0.000 0.000 200.000 0.000 0.000 0.000
Pallet definition:
PL0
10 NX= 3
NY= 4
NZ= 2
PLP=3996 (P3996 to P4000 are used)
11
P[1]= 100.000 50.000 200.000 0.000 0.000 0.000
P[2]= 200.000 50.000 200.000 0.000 0.000 0.000
P[3]= 100.000 200.000 200.000 0.000 0.000 0.000
P[4]= 200.000 200.000 200.000 0.000 0.000 0.000
P[5]= 100.000 50.000 100.000 0.000 0.000 0.000
12
Utilizing pallet movement N24
13 P4000 N16
N4 N5
N1 N2 N3
P0
P3996 P3997
NX
33C06-R9-00
Processing flow
START
STOP
33C07-R7-00
Sample Description
Processing flow
8
START
Y
DI2 (1)="1"?
END
12
N
Sample Description
9 Z
0
P3 30mm P4
10 50mm
P1 P2
11 Point A Point B
33C09-R7-00
• Precondition
12 1. Set the robot movement path.
• Movement path: P3→P1→P3→P4→P2→P4
• Locate P3 and P4 respectively at a position 50mm above P1 and P2 and set the P1 and P2 positions by teaching.
2. I/O signal
13 DO (20) Chuck (gripper) open/close 0: open, 1: close
A 0.1 second wait time is set during chuck open and close.
8
MOVE P,P1,A3=30.000 …………………… Arch motion at A3 = 30mm.
GOSUB *CLOSE
MOVE P,P2,A3=30.000 …………………… Arch motion at A3 = 30mm.
GOSUB *OPEN
MOVE P,P4
HALT
*OPEN: ………………………………………………………………………… Chuck OPEN routine.
9
DO2(0)=0
DELAY 100
RETURN
*CLOSE: ……………………………………………………………………… Chuck CLOSE routine. 10
DO2(0)=1
DELAY 100
RETURN
11
12
13
Application 11-9
2.2 Palletizing
7 • Overview
The following is an example for picking up parts supplied from the parts feeder and placing them on a pallet on the
conveyor. The pallet is ejected when full.
8 Palletizing
9 0
50mm
10
P1: Pallet reference position
P1 P0
11 Robot
12
Parts feeder
13 33C10-R7-00
• Precondition
1. I/O signal
DI (30) Component detection sensor 1: Parts are supplied
DI (31) Pallet sensor 1: Pallet is loaded
3. Vertical movement is performed to a position Z=50mm above the pallet and parts feeder.
8
WAIT DI(31)=1 ……………………… Wait until a pallet "present" status occurs.
WAIT DI(30)=1 ……………………… Wait until the supplied component "present" status occurs.
DO(30)=0 …………………………………… Robot hand OPENS.
DELAY 100
MOVE P,P0,A3=50.000 ……… Movement of robot 1 to supply position.
DO(30)=1 ……………………………………
DELAY 100
Robot hand CLOSES.
9
P100=P1+P10*B+P11*A ……… Next point is calculated.
MOVE P,P100,A3=50.000 … Movement of robot 1 to calculated point.
DO(30)=0 …………………………………… Robot hand OPENS.
DELAY 100 10
NEXT
NEXT
DRIVE (3,0) …………………………………………… Only 3 axis of robot 1 moves to 0.
11
DO(31)=1 …………………………………………………… Pallet is ejected.
DELAY 500
DO(31)=0
WEND ……………………………………………………………………… Loop is repeated.
HALT
12
Application 11-11
2.3 Pick and place of stacked parts
7 • Overview
The following is an example for picking up parts stacked in a maximum of 6 layers and 3 blocks and placing them on
the conveyor.
The number of parts per block may differ from others.
8 Parts are detected with a sensor installed on the robot hand.
9 Z=0.0
10
P5 P1 P2 P3
Conveyor
Block 1 Block 2 Block 3
33C11-R7-00
11
• Precondition
1. I/O signal
DI (30) Component detection sensor 1: Parts are supplied
12 DI (31) Robot hand open/close 0: Open / 1: Close
Robot hand open/close time is 0.1 seconds.
3. Movement proceeds at maximum speeds but slows down when in proximity to the part.
Processing flow
High speed
P4=WHERE
Set the current position
P4=WHERE
into point data (P4)
Slow down
Move to P1
P5 P1
33C12-R7-00
4. Use a STOPON condition in the MOVE statement for sensor detection during movement.
12
*OPEN:
DO3(0)=0
DELAY 100
RETURN
*CLOSE:
DO3(0)=1
DELAY 100
13
RETURN
Application 11-13
2.4 Parts inspection (Multi-tasking example)
7 • Overview
One robot is used to inspect two different parts and sort them according to the OK/NG results judged by a testing
device.
The robot picks up the part at point A and moves it to the testing device at point B. The testing device checks the part
8 and sends it to point C if OK or to point D if NG.
The part at point A’ is picked up and moved to the testing device at point B' in the same way. The testing device
checks the part and sends it to point C’ if OK or to point D’ if NG.
It is assumed that 10 to 15 seconds are required for the testing device to issue the OK/NG results.
9
Parts inspection (Multi-tasking example)
10
P1 P2 P3 P4
A B C D
11
A’ B’ C’ D’
12
Part supply 2 Testing device 2 Part 2 OK Part 2 NG
33C13-R7-00
• Precondition
13 1. I/O signal
I/O signal 7 6 5 4 3 2 1 0
DO2
Testing device 1 start (0.1 second) 1: Start *1
Robot chuck open/close 0: Open / 1: Close *2
7 6 5 4 3 2 1 0
DO3
Testing device 2 start (0.1 second) 1: Start *1
7 6 5 4 3 2 1 0
DI2
Testing device 1 test completed *3
Testing device 1 OK/NG signal
Part supply 1
Part 1 OK
Part 1 NG
7 6 5 4 3 2 1 0
DI3
Testing device 2 test completed *3
Testing device 2 OK/NG signal
Part supply 2
Part 2 OK
Part 2 NG
33C14-R7-00
0.1 seconds
*1: As the start signal, supply a 0.1 second pulse signal to the testing device. ON
*2: Chuck open and close time is 0.1 seconds. OFF
*3: Each time a test is finished, the test completion signal and OK/NG signal are sent from the testing device.
After testing, the test completion signal turns ON (=1), and the OK/ NG signal turns ON (=1) when the result is OK and
Processing flow 9
START
10
Exclusive control flag reset FLAG1=0 FLAG2=0
Subtask start
N
Part 1 supplied?
Y
11
Y
Task 2 busy?
N
Exclusive control flag set
Chuck open
FLAG1=1
12
Move to parts supply position P1
Chuck close
N
Test completed?
Y
Task 2 busy?
N
Exclusive control flag set FLAG1=1
Chuck close
N
Part OK?
Y
Y
Y Y
OK parts? NG parts?
N
Move to OK parts position N
33C15-R7-00
Application 11-15
Sample
7 <Maintask> <Subtask>
FLAG1=0 Program name:SUB_PGM
FLAG2=0
UPPOS=0.000
8
START <SUB_PGM>,T2 …… Subtask Start=======================>
*L1: *S1:
WAIT DI2(2)=1 …… Part supply standby WAIT DI3(2)=1
WAIT FLAG2=0 …… Other tasks waiting for standby status WAIT FLAG1=0
FLAG1=1 …… Exclusive control flag set FLAG2=1
9 GOSUB *OPEN
MOVE P,P1,Z=UPPOS
……
……
Chuck open
Move to part supply position
GOSUB *OPEN
MOVE P,P11,Z=UPPOS
GOSUB *CLOSE …… Chuck close GOSUB *CLOSE
MOVE P,P2,Z=UPPOS …… Move to testing device MOVE P,P12,Z=UPPOS
GOSUB *OPEN …… Chuck open GOSUB *OPEN
10 DRIVEI (3,-10000) …… Move axis 3 upward 10,000 pulses DRIVEI (3,-10000)
FLAG1=0 …… Exclusive control flag reset FLAG2=0
DO2(0)=1 …… Testing device start DO3(0)=1
DELAY 100 DELAY 100
11
DO2(0)=0 DO3(0)=0
WAIT DI2(0)=1 …… Test completion standby WAIT DI3(0)=1
WAIT FLAG2=0 …… Task completion standby WAIT FLAG1=0
FLAG1=1 …… Exclusive control flag set FLAG2=1
MOVE P,P2,Z=UPPOS …… Move to testing device MOVE P,P12,Z=UPPOS
12 GOSUB *CLOSE
IF DI2(1)=1 THEN
……
……
Chuck close
Test
GOSUB *CLOSE
IF DI3(1)=1 THEN
'GOOD 'GOOD
WAIT DI4(2)=0 …… Part movement standby WAIT DI3(3)=0
MOVE P,P3,Z=UPPOS …… Move to OK parts position MOVE P,P13,Z=UPPOS
13 ELSE ELSE
'NG 'NG
WAIT DI2(4)=0 …… Part movement standby WAIT DI3(4)=0
MOVE P,P4,Z=UPPOS …… Move to NG parts position MOVE P,P14,Z=UPPOS
ENDIF ENDIF
GOSUB *OPEN …… Chuck open GOSUB *OPEN
DRIVEI (3,-10000) …… Move axis 3 upward 10,000 pulses DRIVEI (3,-10000)
FLAG1=0 …… Exclusive control flag reset FLAG2=0
GOTO *L1 GOTO *S1
<common routine>
Program name:COMMON
*OPEN:
DO2(1)=0
DELAY 100
RETURN
*CLOSE:
DO2(1)=1
DELAY 100
RETURN
Sealing
8
P5 P4
P3
9
P2
20mm
P6 P7
P0 P1
10
10mm
33C11-R9-00
• Precondition
1. I/O signal 11
DO (20) Valve open/close 1: Open / 0: Close
Application 11-17
2.6 Connection to an external device through RS-232C (example 1)
7 • Overview
Point data can be written in a program by using an external device connected to the controller via the RS-232C port.
• Precondition
8 1. Input to the external device from the controller
SDATA/X/Y [cr/lf]
n NOTE
9
[cr/lf] indicates CR code (=0Dh) + LF code (=0Ah).
11 Sample Description
’INIT
VCMD$="SDATA/X/Y" …………………………………………………………………… A request for the position to move
• "SEND xxx TO CMU" outputs the contents specified by "xxx" through the RS-232C.
• "SEND CMU TO xxx" sends data into the files specified by "xxx" through the RS-232C.
• Precondition 8
1. Input to the external device from the controller
SDATA/X/Y [cr/lf]
n NOTE
[cr/lf] indicates CR code (=0Dh) + LF code (=0Ah).
10
• "SEND xxx TO CMU" outputs the contents specified by "xxx" through the RS-232C.
• "SEND CMU TO xxx" sends data into the files specified by "xxx" through the RS-232C.
11
• The LEN ( ) function obtains the length of the character string.
• The MID$ ( ) function obtains the specified character string from among the character strings.
12
• The VAL ( ) function obtains the value from the character string.
Sample Description
'INIT
13
VCMD$="SDATA/X/Y" ……………………………………………………………………… A request for the position to move
P0= 0.000 0.000 0.000 0.000 0.000 0.000 … An initial position
P11=100.000 100.000 0.000 0.000 0.000 0.000 … A reception position
'MAIN ROUTINE
MOVE P,P0 …………………………………………………………………………………………… Moves to the initial position.
*ST:
SEND VCMD$ TO CMU ……………………………………………………………………… Sends the command.
SEND CMU TO VIN$ ………………………………………………………………………… Receives the Response:
"X=156.420,Y=243.910".
FOR I%=1 TO LEN(VIN$)-2
IF MID$(VIN$,I%,2)="X=" THEN EXIT FOR ……… If "X=", then exits from the roop.
NEXT I%
LOC1(P11)=VAL(MID$(VIN$,I%+2)) …………………………………… Converts "X=" downward to the numeric
value and assigns to axis 1 of P11.
FOR I%=1 TO LEN(VIN$)-2
IF MID$(VIN$,I%,2)="Y=" THEN EXIT FOR ……… If "Y=", then exits from the roop.
NEXT I%
LOC2(P11)=VAL(MID$(VIN$,I%+2)) …………………………………… Converts "Y=" downward to numeric
value and assigns to axis 2 of P11.
MOVE P,P11 ………………………………………………………………………………………… Moves to the reception position.
GOTO *ST
Application 11-19
Sample
7 ’INT
VCMD$="SDATA/X/Y"
VIN$=""
VX$=""
VY$=""
8 P0= 0.000 0.000 0.000 0.000 0.000 0.000
P11= 100.000 100.000 0.000 0.000 0.000 0.000
’MAIN ROUTINE
MOVE P, P0
9 *ST:
SEND VCMD$ TO CMU
SEND CMU TO VIN$
I=1
VMAX=LEN(VIN$)
10 *LOOP:
IF I>VMAX THEN GOTO *E_LOOP
C$=MID$(VIN$,I ,1)
IF C$="X" THEN
I=I+2
11 J=I
*X_LOOP:
C$=MID$(VIN$, J, 1)
IF C$="," THEN
12
*X1_LP:
L=J-I
VX$=MID$(VIN$, I, L)
I=J+1
GOTO *LOOP
13 ENDIF
J=J+1
IF J>VMAX THEN GOTO *X1_LP
GOTO *X_LOOP
ENDIF
IF C$="Y" THEN
I=I+2
J=I
*Y_LOOP:
C$=MID$(VIN$, J, 1)
IF C$=","THEN
*Y1_LP:
L=J-I
VY$=MID$(VIN$, I, L)
I=J+1
GOTO *LOOP
ENDIF
J=J+1
IF J>VMAX THEN GOTO *Y1_LP
GOTO *Y_LOOP
END IF
I=I+1
GOTO *LOOP
*E_LOOP:
WX=VAL(VX$)
WY=VAL(VY$)
LOC1(P11)=WX
LOC2(P11)=WY
MOVE P, P11
GOTO *ST
HALT
Ethernet
CR (0Dh) and LF (0Ah) are added to the end of the line. 11
When data is received, then the data up to CR (0Dh) is treated as one line regardless of the "Termination code"
parameter setting, so LF (0Ah) is ignored. 12
The termination code is expressed as [cr/lf] in the detailed description of each online command stated in "2 Operation
and setting commands" onwards in this Chapter.
[robot number ] k, f
Move to absolute reset position ABSADJ 3
(robot number: 1-4, k: 1-6, f: 0/1)
[robot number ] k
Return-to-origin ORGRTN 3
(robot number: 1-4, k: 1-6)
9 [robot number ] k
Change inching movement amount IDIST 2
(robot number: 1-4, k: 1-10000)
INCH
[robot number ] km
Manual movement (inching) INCHXY 3
10 INCHT
(robot number: 1-4, k: 1-6, m: +/-)
JOG
[robot number ] km
Manual movement (jog) JOGXY 3
(robot number: 1-4, k: 1-6, m: +/-)
JOGT
TEACH [robot number ] m
11 Point data teaching
TCHXY (robot number: 1-4, m: 0-29999)
2
12 1.3 Utility
Operation type Command Option Condition
<program name1 >
TO <program name2 >
13 Copy program PGm
(m : 1-100) 2
COPY Pm-Pn TO Pk (*Refer to
Copy points "m - n" to point "k" previous page)
(m : 0-29999, n : 0-29999, k : 0-29999)
PCm-PCn TO PCk
Copy point comments "m - n" to point comment "k"
(m : 0-29999, n : 0-29999, k : 0-29999)
<program name >
Delete program PGm
(m : 1-100)
Pm-Pn
Delete points "m - n"
(m : 0-29999, n : 0-29999)
PCm-PCn
Delete point comments "m - n"
(m : 0-29999, n : 0-29999)
ERA PNm-PNn 2
Delete point names "m - n"
(m : 0-29999, n : 0-29999)
PLm
Delete pallet "m"
(m : 0-39)
GPm
Delete general Ethernet port "m"
(m : 0-15)
RTm-RTn
Delete real time output "m - n"
(m : 24-127, n : 24-127)
Rename "program 1" to "program 2" REN <program 1> TO <program 2> 2
<program name >
,k
Check program syntax SYNCHK PGm 2
(m : 1-100, k : 1-100)
Compile sequence program SEQCMPL 2
<program name >
TO s
Change program attribute ATTR PGm 2
(m : 1-100, s: RW / RO / H )
m
Setting main program MAINPG 2
( m : 1-100)
7
Initialize data Program PGM
Point PNT
Point comment PCM
Point name PNM
Shift coordinate SFT
Hand HND
Work WRKDEF 8
Pallet INIT PLT 3
General Ethernet port GEP
Input/output name ION
Area check output ACO
Real time output
All data except parameters
RTO
MEM
9
Parameter PRM
All data (MEM+PRM) ALL
CMU
INIT 3
10
Initialize data Communication parameter
ETH
Initialize data Alarm history INIT LOG 3
SET d
CAN
Setting Input data INPUT CLR 2
12
Setting password SETPW 2
k
Setting Sequence execution flag SEQUENCE 2
(k: 0 / 1 / 3)
Reset alarm ALMRST 2
yy / mm / dd
Check or set date DATE 2
(yy: 00-99, mm: 01-12, dd: 00-31)
Check or set time TIME
hh : mm : ss
2
13
(hh: 00-23, mm: 00-59, ss: 00-59)
10
(robot number: 1-4)
Acquire task in RUN or SUSPEND status TASKS
TSKECD Tk
Task end condition
(k : 1-16)
TSKMON Tk
11
Task operation status
(k : 1-16)
Version information VER
WRKDEF [work number ]
Work data
(work number: 0-39)
12 Numerical data
Character string data
numerical expression
character string expression
Point data point expression
Shift coordinate data shift expression
13
Read-out data READ read-out file 2
Write data WRITE write file 2
<program name>
@LOAD ,Tn, p [cr/lf]
PGm
9
Response Format
OK[cr/lf]
10
Notation Value Range
m Program number 1 to 100
n Task number 1 to 16 11
p Task priority ranking 1 to 64
Meaning Registers the specified program into "task n" with "priority p". 12
The registered program enters the STOP status.
[When "task number n" is omitted] The task with the smallest number of those that have not been started is specified
automatically. 13
[When "task priority p" is omitted] "32" is specified.
[Task priority ranking] The smaller value, the higher priority. The larger value, the lower priority (high 1 to low 64).
When the task with a high task priority is in the RUNNING status, the task with a low task
priority still remains in the READY status.
Sample Description
Command @LOAD <PG_MAIN>, T1[cr/lf] …… Registers the program to task 1.
Response OK[cr/lf]
@RESET[cr/lf]
8 Command Format 2
Tn
@RESET <program name> [cr/lf]
PGm
9
Response Format
OK[cr/lf]
10
Notation Value Range
n Task number 1 to 16
11 m Program number 1 to 100
Sample 1 Description
Command @RESET[cr/lf]…………………………………… Resets all programs.
Response OK[cr/lf]
Sample 2 Description
Command @RESET T3[cr/lf] ……………………… Resets only the program that is executed in T3.
Response OK[cr/lf]
Command Format 2
8
Tn
@RUN <program name> [cr/lf]
PGm
9
Response Format
OK[cr/lf]
10
Notation Value Range
n Task number 1 to 16
11
m Program number 1 to 100
13
Sample 1 Description
Command @RUN[cr/lf]………………………… Executes all programs in the STOP status.
Response OK[cr/lf]
Sample 2 Description
@RUN T3[cr/lf]………………… Executes only the program in the STOP status that is
Command
registered in T3.
Response OK[cr/lf]
@STOP[cr/lf]
8 Command Format 2
Tn
@STOP <program name> [cr/lf]
PGm
9
Notation Value Range
n Task number 1 to 16
10 m Program number 1 to 100
12 Sample 1 Description
Command @STOP[cr/lf]……………………… Stops all programs.
Response OK[cr/lf]
13 Sample 2 Description
Command @STOP T3[cr/lf]……………… Stops only the program that is executed in T3.
Response OK[cr/lf]
OK[cr/lf]
9
Notation Value Range
n Task number 1 to 16
Sample Description
12
Command @STEP T3[cr/lf]………… Executes one line of the program that is executed in T3.
Response OK[cr/lf]
13
Tn
@NEXT <program name> [cr/lf]
8 PGm
Response Format
OK[cr/lf]
9 Notation Value Range
n Task number 1 to 16
11
This is a same processing as setting the breakpoint on the next line in the program currently suspended and
executing the program (@RUN).
12 @STEP stops the program at the beginning line of the sub-procedure called by GOSUB or CALL statement.
Sample Description
Executes the program in execution at T3
13 Command @NEXT T3[cr/lf]………………………………………
until the next line.
Response OK[cr/lf]
Tn
RUNTO <program name> k[cr/lf]
PGm
Response Format
OK[cr/lf]
Meaning Executes the specified program to the line before the specified line.
Sample Description
Executes the program that is executed by T3
Command @RUNTO T3, 15[cr/lf]…………………………
to the 14th line and stops at the 15th line.
Response OK[cr/lf]
OK[cr/lf]
9
Notation Value Range
n Task number 1 to 16
10
Meaning Skips one line of the specified program.
When skipping one line of the GOSUB statement or CALL statement, all subroutines or sub-procedures are
skipped.
Sample Description
11
Skips one line of the program
Command @SKIP T3[cr/lf]………………………………………
that is executed by T3.
Response OK[cr/lf] 12
13
2.1.9 Skip program to line before specified line
Command Format
Tn
@SKIPTO <program name> k[cr/lf]
PGm
Response Format
OK[cr/lf]
Meaning Skips the specified program to the line before the specified line.
Sample Description
@SKIPTO T3, 15[cr/lf]………………………… Skips the program that is executed by T3 to
Command
the 14th line and stops at the 15th line.
Response OK[cr/lf]
<program name>
@BREAK (n,n,n,...), k[cr/lf]
PGm
8 Command Format 2
<program name>
@BREAK 0[cr/lf]
PGm
9 Command Format 3
@BREAK 0[cr/lf]
10 Response Format
OK[cr/lf]
Meaning Sets a break point to pause the program during program execution.
[Command Format 1] Sets or cancels a break point in the specified line of the specified program.
13 Multiple lines can also be specified.
[Command Format 2] Cancels all break points set in the specified program.
[Command Format 3] Cancels all break points.
Sample Description
Sets a break point at the first and
Command @BREAK PG3(1, 3), 1[cr/lf]…………………………
third lines of PG3.
Response OK[cr/lf]
RUN [cr/lf]
nnnn:gg.bbb [cr/lf]
nnnn:gg.bbb [cr/lf] 9
:
nnnn:gg.bbb [cr/lf]
nnnn:gg.bbb [cr/lf]
END [cr/lf] 10
Notation Value Range
11
m Program number 1 to 100
Sample Description
@SYNCHK PG1, 100[cr/lf]………………………… Sets a Maximum number of error at 100
Command
and checks syntax of the program 1.
RUN[cr/lf]
1:5.239 [cr/lf] ………………………… Detects syntax errors
2:5.239 [cr/lf] "5.239: Illegal identifier"
Response 3:5.239 [cr/lf] at 1th, 2nd, 3rd and 8th lines.
8:5.239 [cr/lf]
6:5.222 [cr/lf] ………………………… Detects syntax error "5.222:IF without
END [cr/lf] ENDIF" at 6th line.
@MAINPG[cr/lf]
8 Response Format
OK[cr/lf]
Meaning Specifies the program which is always selected when all programs are reset. When "0" is specified at the
main program number or program specified at the main program number doesn't exist, the program that
10 has been executed last (current program) in the task 1 is selected after resetting all programs.
n NOTE
"Main program" corresponds conventional function "_SELECT" of RCX240, etc.
11
Sample Description
Command @MAINPG 1[cr/lf]…………… Sets program number 1 at the main program.
12 Response OK[cr/lf]
13
2.1.13 Compile sequence program
Command Format
@EQCMPL[cr/lf]
Response Format
RUN[cr/lf]
END[cr/lf]
Sample Description
Command @SEQCMPL[cr/lf]…………………………………………………… Compiles the sequence program.
RUN[cr/lf]
Response
END[cr/lf]
9
OK[cr/lf]
Sample 11
Command @MAINPG 50[cr/lf]
Response OK[cr/lf]
12
Response Format
OK[cr/lf]
Meaning Registers the current robot position as point data for the specified point number. If point data is already
registered in the specified point number, then that point data will be overwritten.
The unit of the point data may vary depending on the command.
TEACH "pulse" units
TCHXY "mm" units
Sample
Response OK[cr/lf]
8 Response Format
OK[cr/lf]
10 Meaning Changes the inching movement amount of the robot specified by the <robot number>.
The unit of the movement amount may vary depending on the command.
INCH "pulse" units: 1 to 10000 pulse
11 INCHXY "mm" units: 0.001 to 10.000mm
INCHXT "mm" units: 0.001 to 10.000mm
12 Sample
Response OK[cr/lf]
13
Response Format 8
RUN[cr/lf]
END[cr/lf]
9
Meaning Resets the alarm.
However, this command cannot be used for the alarms which require the restart of system.
In this case, turn off the controller and turn it on again.
10
Sample
Command @ALMRST[cr/lf]
RUN[cr/lf]
11
Response
OK[cr/lf]
12
2.4 Clearing output message buffer
Command Format 13
@MSGCLR[cr/lf]
Response Format
OK[cr/lf]
Values Clears the output message buffer of the controller. After the messages have been output by the PRINT
statement, etc., the messages remaining in the buffer are cleared.
Sample
Command @MSGCLR[cr/lf]
Response OK[cr/lf]
SET d
@INPUT CAN [cr/lf]
8 CLR
Response Format
OK[cr/lf]
9
11 Meaning Sets the input data for responding to a data request by INPUT statement of robot program.
The controller parameter "INPUT/PRINT using channel" should be set a current communication channel
(CMU, ETH or iVY).
12 SET: Sets the data which is input to the variable when INPUT statement is executed.
CAN: Cancels the data request by INPUT statement.
CLR: Clears the data specified @INPUT SET downward.
13
Sample Description
Response Format 8
OK[cr/lf]
9
Notation Value Range / Meaning
k Access level 0: Maintainer level, 1: Operator level
10
pppppppp Password Alphanumeric characters of 8 characters or less
12
Sample Description
@SETPW[cr/lf]
8 Response Format
READY[cr/lf]
pppppppp[cr/lf]
kkkkkkkk[cr/lf]
9 nnnnnnnn[cr/lf]
[cr/lf] ……………………………… line-feed
OK[cr/lf]
10
Notation Value Range
old password
pppppppp Alphanumeric characters of 8 characters or less
(current password)
new password
nnnnnnnn Alphanumeric characters of 8 characters or less
(confirmation)
12
Meaning Changes the password for the access level changing to the maintainer level.
• The current password is input for the old password, and the revised password is input for the
new password and for the new password of confirmation.
13 In the next line of the new password (confirmation), inserts line feeds only.
•W
hen input password as the old password is different from the current password or new password
and new password (confirmation) are not same, "6.235: Password error" will occur.
Sample Description
Command @SETPW[cr/lf]
READY[cr/lf]
oldpass[cr/lf] …………………… Inputs "oldpass" as old password.
newpass[cr/lf] …………………… Inputs "newpass" as new password.
Response
newpass[cr/lf] …………………… Inputs "newpass" as new password (confirmation).
[cr/lf] ……………………………………… line-feed
ok[cr/lf]
Response Format 1
x[cr/lf]
9
OK[cr/lf]
Command Format 2 10
@?ORIGIN robot number[cr/lf]
Response Format 2 11
x y{,y{,{...}}}[cr/lf]
OK[cr/lf]
12
Notation Value Range / Meaning
robot number 1 to 4 (If not input, robot 1 is specified.)
Sample Description
@?SERVO[robot number][cr/lf]
8 Response Format
x y,y,y,y,y,y[cr/lf]
OK[cr/lf]
9
Notation Value Range / Meaning
robot number 1 to 4 (If not input, robot 1 is specified.)
10 Shows the status of the axis 1, axis 2, …, axis 6 from the left.
11
(Omitted when the axis is not connected.)
Sample Description
12 Command @?SERVO[3][cr/lf]
13
@?MOTOR[cr/lf]
Response Format
x[cr/lf]
OK[cr/lf]
Sample
Command @?MOTOR[cr/lf]
2[cr/lf]
Response
OK[cr/lf]
Response Format 1 8
k[cr/lf]
OK[cr/lf]
9
Notation Value Range / Meaning
k Access level 0: Maintainer level, 1: Operator level
Sample 11
Command @?ACCESS[cr/lf]
1[cr/lf]
Response
12
OK[cr/lf]
<program name>
@?BREAK [cr/lf]
PGm
Response Format
n{,n{,{...}}}[cr/lf]
OK[cr/lf]
32 characters or less
Program name Program name to delete
consisting of alphanumeric characters and _ (underscore).
Sample
12,35[cr/lf]
Response
OK[cr/lf]
@?MODE[cr/lf]
8 Response Format
k[cr/lf]
OK[cr/lf]
9
Notation Value Range / Meaning
0: MANUAL mode
1: AUTO mode (Control source: Programming box)
10
k Mode status
2: AUTO mode (Control source release)
-1: Restricted mode
Command @?MODE[cr/lf]
12 Response
1[cr/lf]
OK[cr/lf]
ETH
@?LINEMODE [cr/lf]
CMU
Response Format
k[cr/lf]
OK[cr/lf]
Sample
1[cr/lf]
Response
OK[cr/lf]
Response Format 8
m[cr/lf]
OK[cr/lf]
Meaning Acquires the program number which is registered in the main program. 10
Sample
Command @?MAINPG[cr/lf]
11
1[cr/lf]
Response
OK[cr/lf]
@?SEQUENCE[cr/lf]
13
Response Format
1,s[cr/lf]
OK[cr/lf]
3,s[cr/lf]
OK[cr/lf]
0[cr/lf]
OK[cr/lf]
Sample
Command @?SEQUENCE[cr/lf]
0[cr/lf]
Response
OK[cr/lf]
@?SEQCMPSTS[cr/lf]
8 Response Format
x[cr/lf]
OK[cr/lf]
Sample Description
Command
11
@?SEQCMPSTS[cr/lf] …… Acquires the compilation status of the sequence program.
12
@?VER[cr/lf]
Response Format
cv,cr-mv-dv1,dr1/dv2,dr2[cr/lf]
Notation Value
cv Host version number
Sample
Command @?VER[cr/lf]
V8.02,R1021-V5.10-V1.01,R0001/V1.01,R0001[cr/lf]
Response
OK[cr/lf]
Response Format 8
n{,n{,{...}}}[cr/lf]
OK[cr/lf]
9
Notation Value Range
10
Meaning Acquires the tasks in RUN or SUSPEND status.
Sample
Command @?TASKS[cr/lf] 11
1,3,4,6[cr/lf]
Response
OK[cr/lf]
12
@?TSKMON Tk[cr/lf]
Response Format
m,n,f,p[cr/lf]
OK [cr/lf]
Sample
5,11,R,32[cr/lf]
Response
OK[cr/lf]
@?TSKECD Tk[cr/lf]
8 Response Format
gg.bbb[cr/lf]
OK[cr/lf]
Reference For details about alarm group number and classification number of the task end condition,
11 refer to the user’s or the operator’s manual.
When the specified task ends by error, acquires this alarm number.
12
Sample Description
13 Response
1.5[cr/lf]……………………… The end condition of task 1 is 1.5: Program ended
OK[cr/lf] by "HALT".
@?SHIFT[robot number][cr/lf]
Response Format
m[cr/lf]
OK[cr/lf]
0 to 39
m Shift number selected for the specified robot
Shift not selected: -1
Meaning Acquires the shift status of the robot specified by the <robot number>.
Sample
Command @?SHIFT[cr/lf]
1[cr/lf]
Response
OK[cr/lf]
Response Format
8
m[cr/lf]
OK[cr/lf]
m Hand data
12
3.17 Acquiring the hand status
Command Format 13
@?HAND[robot number][cr/lf]
Response Format
m[cr/lf]
OK[cr/lf]
0 to 31
m Hand number selected for the specified robot
Hand not selected: -1
Meaning Acquires the hand status of the robot specified by the <robot number>.
Sample
Command @?HAND[cr/lf]
1[cr/lf]
Response
OK[cr/lf]
@?WRKDEF[work number][cr/lf]
8 Response Format
m[cr/lf]
OK[cr/lf]
m work data
Sample Description
Command
11
@?WRKDEF[0][cr/lf] …… Acquires the data of work 0.
12
@?RBTWRK[robot number][cr/lf]
Response Format
m[cr/lf]
OK[cr/lf]
0 to 39
m Work number selected for the specified robot
Work not selected: -1
Meaning Acquires the work status of the robot specified by the <robot number>.
Sample
Command @?RBTWRK[cr/lf]
1[cr/lf]
Response
OK[cr/lf]
Response Format
8
k/m[cr/lf]
Notation Value 9
k Remaining source area (unit: bytes)
Command @?MEM[cr/lf]
11
102543/1342[cr/lf]
Response
OK[cr/lf]
12
3.21 Acquiring the alarm status
Command Format
@?ALM[cr/lf]
13
Response Format
gg.bbb[cr/lf]
OK[cr/lf]
Notation Value
gg Alarm group number
The requirable alarms are number 400 or more of alarm classification number. If multiple alarms occur,
the alarm with larger alarm classification number (more serious alarm) is acquired.
Sample
Command @?ALM[cr/lf]
12.600[cr/lf]
Response
OK[cr/lf]
@?EMG[cr/lf]
8 Response Format
k[cr/lf]
OK[cr/lf]
Meaning Acquires the emergency stop status by checking the internal emergency stop flag.
10
Sample
Command @?EMG[cr/lf]
11 Response
1[cr/lf]
OK[cr/lf]
13 @?MSPEED[robot number][cr/lf]
Response Format
k[cr/lf]
OK[cr/lf]
Meaning Acquires the value of the manual movement speed specified by <Robot number>.
Sample
Command @?MSPEED[cr/lf]
50[cr/lf]
Response
OK[cr/lf]
Response Format
8
mmmmm[cr/lf]
OK[cr/lf]
10
Meaning Acquires the inching movement amount specified by <Robot number>.
Sample
Command @?IDIST[2][cr/lf] 11
100[cr/lf]
Response
OK[cr/lf]
12
3.25 Acquiring the last reference point number (current point number)
Command Format 13
@?CURPNT[cr/lf]
Response Format
k[cr/lf]
OK[cr/lf]
Meaning Acquires the point number which is referred last. The current point number (the point number of last
reference) is renewed by operations which uses the point data (point edit, for example).
The current point number is renewed by following operations: the point reference and the point setting
movement by remote commands, the trace movement or teaching by programming box or RCX-Studio Pro, etc.
Sample
Command @?CURPNT[cr/lf]
100[cr/lf]
Response
OK[cr/lf]
@?MSG[cr/lf]
8 Response Format
sssss …… ssssss[cr/lf]
OK[cr/lf]
9 Notation Value
s Message character string
Meaning Acquires one line of message which is input from the output message buffer of the controller
10 by the PRINT statement, etc.
Sample Description
11 Command @?MSG[cr/lf]
12
• For executing this command, it is required that the "INPUT/PRINT using channel" parameter is set at the port
to execute command.
13 • When the output message buffer is empty, only "OK" is output as the response.
@?INPUT[cr/lf]
Response Format
d[cr/lf]
OK[cr/lf]
Notation Value
d Input data
Sample
Command @?INPUT[cr/lf]
INPUT_SAMPLE[cr/lf]
Response
OK[cr/lf]
@?numerical expression[cr/lf] 8
Response Format
numerical value[cr/lf]
OK[cr/lf] 9
Meaning Acquires the value of the specified numerical expression.
The numerical expression's value format is "decimal" or "real number".
10
Sample 1
Command @?SQR(100*5)[cr/lf]
Response
2.236067E01[cr/lf] 11
OK[cr/lf]
Sample 2
Command @?LOC1(WHERE)[cr/lf] 12
102054[cr/lf]
Response
OK[cr/lf]
13
Response Format
character string[cr/lf]
OK[cr/lf]
Meaning Acquires the value (character string) of the specified character string expression.
Command @?A$+B$+"123"[cr/lf]
ABCDEF123[cr/lf]
Response
OK[cr/lf]
@?point expression[cr/lf]
8 Response Format
point data[cr/lf]
OK[cr/lf]
9 Meaning Acquires the value (point data) of the specified point expression.
Sample
10
Command @?P1+WHRXY[cr/lf]
11
@?shift expression[cr/lf]
13 Response Format
shift data[cr/lf]
OK[cr/lf]
Meaning Acquires the value (shift coordinate data) of the specified shift expression.
Sample
Command @?s1[cr/lf]
9
Response Format
k Axis number 1 to 6
11
Meaning Performs the absolute reset operation of the specified axis of the robot specified by <robot number>.
This command is available only to axes whose return-to-origin method is set as "Mark".
ABSADJ: Moves the specified robot axis to an absolute reset position. 12
MRKSET: Performs absolute reset on the specified robot axis.
13
Sample Description
8 Response Format
k Axis number 1 to 6
10 Meaning Performs the return-to-origin operation of the specified axis of the robot specified by <robot number>.
For the axis with the semi-absolute specifications, when the return-to-origin is executed, the absolute
search operation is performed.
11 Sample Description
12
RUN[cr/lf]……………………… Movement start
Response
END[cr/lf]……………………… Movement end
13
k Axis number 1 to 6 10
m Movement direction +, –
Meaning Manually moves (inching motion) the specified axis of the robot specified by the <robot number>.
The robot performs the same motion as when moved manually in inching motion with the programming 11
box's jog keys (moves a fixed distance each time a jog key is pressed).
The unit of the movement amount and operation type by command are shown below.
INCH: "pulse" units. Only the specified axis moves. 12
INCHXY: "mm" units. According to the robot configuration, the arm tip of the robot moves
in the direction of the Cartesian coordinate system.
INCHT: "mm" units. According to the robot configuration, the hand attached to the arm tip of
the robot moves. 13
Sample Description
Response Format
10 k Axis number 1 to 6
m Movement direction +, –
Meaning Manually moves (jog motion) the specified axis of the robot specified by the <robot number>.
11 The robot performs the same motion as when holding down the programming box's jog keys in manual
mode.
To continue the operation, it is necessary for the JOG command to input the execution continue process
12 (^V(=16H)) by the online command at intervals of 200ms. If not input, the error stop occurs.
Additionally, after the movement has started, the robot stops when any of the statues shown below arises.
• When software limit was reached.
13 • When stop signal was turned off.
• When STOP key on the programming box was pressed.
• When an online command (^C (=03H)) to interrupt execution was input.
The unit of the movement amount and operation type by command are shown below.
JOG : "pulse" units.
Only the specified axis moves.
JOGXY: "mm" units.
According to the robot configuration, the arm tip of the robot moves in the direction of
the Cartesian coordinate system.
JOGT: "mm" units.
According to the robot configuration, the hand attached to the arm tip of the robot
moves.
Sample Description
Meaning Copies the program specified by <program name 1> or program number to <program name 2>.
Sample Description
12
Command @COPY <TEST1> TO <TEST2>[cr/lf]
Response Format
Meaning Copies the point data between Pmmmmm and Pnnnnn to Pkkkkk.
Sample Description
8 Response Format
11 Sample Description
13 5.2 Erase
<program name>
@ERA [cr/lf]
PGn
Response Format
Sample Description
Response Format
8
RUN[cr/lf] ……………………… At prosess start
END[cr/lf] ……………………… At prosess end
10
Meaning Erases the point data between Pmmmmm and Pnnnnn.
Sample Description
12
13
5.2.3 Erasing point comments
Command Format
@ERA PCmmmmm-PCnnnnn[cr/lf]
Response Format
Sample Description
@ERA PNmmmmm-PNnnnnn[cr/lf]
8 Response Format
Sample Description
12
@ERA PLm[cr/lf]
Response Format
Sample Description
Response Format
8
RUN[cr/lf] ……………………… At prosess start
END[cr/lf] ……………………… At prosess end
Sample Description
12
@ERA RTmmm-RTnnn[cr/lf]
Response Format
Meaning Erases the real time output setteng between RTmmm and RTnnn.
Sample Description
11 Sample Description
<program name>
@ATTR TO s[cr/lf]
PGn
Response Format
OK[cr/lf]
Meaning Changes the attribute of the program specified by the <program name> or program number.
Sample
Response OK[cr/lf]
10
PGM Initializes the program area.
MEM Initializes the above areas (PGM ... all data up to GEP). 13
PRM Initializes the parameter area.
Sample Description
8 Response Format
Sample Description
13
5.5.3 Initializing the alarm history
Command Format
@INIT LOG[cr/lf]
Response Format
Sample Description
Response Format
8
BEGIN[cr/lf] ……………………… At prosess start
(Data output: The contents may vary depending on the read-out file.)
END[cr/lf] …………………………… At prosess end
9
Meaning Reads out the data from the designated file.
•O
nline commands that are input through the RS-232C port have the same meaning as the following command.
SEND <read-out file> TO CMU
• Commands via Ethernet have the same meaning as the following command. 10
SEND <read-out file> TO ETH
Reference Chapter 10 "Data file description"
Sample Description
@READ PGM[cr/lf]……………………… Reads out all programs.
Command @READ P100[cr/lf]…………………… Reads out the point 100.
@READ DINM2(0)[cr/lf]………… Reads out the input/output name of DI2(0).
8 Response Format
11
• At the DO, MO, TO, LO, SO, SOW ports, an entire port (DO(), MO(), etc.) cannot be designated as a WRITE file.
• Some separate files (DOn(), MOn(), etc.) cannot be designated as a WRITE file. For details, refer to Chapter 10
"Data file description".
12
Definition format
Type Write file name
13 User memory All file
All
ALL
Separate file
--------
Program PGM <bb…b>>
Point data PNT Pn
Point comment PCM PCn
Point name PNM PNn
Parameter PRM /cccccccc/
Shift definition SFT Sn
Hand definition HND Hn
Work definition WRKDEF Wn
Pallet definition PLT PLn
General Ethernet port GEP GPn
Input/output name ION iNMn(n)
Area check output ACO ACn
Real time output RTO RTn
Variable, constant Variable VAR ab...by
Array variable ARY ab...by(x)
Device DO port -------- DOn()
MO port -------- MOn()
TO port -------- TOn()
LO port -------- LOn()
SO port -------- SOn()
SOW port -------- SOWn()
a: Alphabetic character b: Alphanumeric character or underscore ( _ ) c: Alphanumeric character or symbol
i: I/O type n: Number x: Expression (Array argument) y: variable type
Sample Description
@WRITE PRM[cr/lf]………………… Writes all parameters.
Command @WRITE P100[cr/lf]……………… Writes the point 100.
@WRITE DINM2(0)[cr/lf]……… Writes the input/output name of DI2(0).
@SEQUENCE k[cr/lf]
8
Response Format
OK[cr/lf]
9
Notation Value Range / Meaning
k Execution flag 0: disable, 1: enable, 3: enable (DO reset)
Response OK[cr/lf] 11
6.2 Setting the date
Command Format 12
@DATE yy/mm/dd[cr/lf]
Response Format
OK[cr/lf] 13
Notation Value Range
yy/mm/dd Date to be set year, month, day
mm Month 01 to 12
dd Day 01 to 31
n NOTE
To change only the year or month, the slash ( / ) following it can be omitted.
Example:
• To set the year to 2016, enter 16[cr/lf]. • To set the month to June, enter /06[cr/lf].
• The currently set values are used for the omitted items.
• If only [cr/lf] is transmitted, then the date remains unchanged.
• If an improbable date is entered, then "5.202: Data error" occurs.
Sample 2 Description
Response OK[cr/lf]
@TIME hh:mm:ss[cr/lf]
8 Response Format
OK[cr/lf]
hh Hour 00 to 23
mm Minute 00 to 59
10
ss Second 00 to 59
11
• The currently set values are used for the omitted items.
• If only [cr/lf] is transmitted, then the time remains unchanged.
• If an improbable time is entered, then "5.202: Data error" occurs.
12
13
Sample 1: To change only the minute,
Sample 2
Response OK[cr/lf]
8
Command Format
@robot language[cr/lf]
Response Format 1 9
OK[cr/lf] or NG=gg.bbb[cr/lf]
Response Format 2
10
RUN[cr/lf] or NG=gg.bbb[cr/lf] ……………………… At process start
END[cr/lf] or NG=gg.bbb[cr/lf] ……………………… At process end
11
Notation Value Range
OK, END Command ended correctly
NG An error occurred
13
Meaning Robot language commands can be executed.
• Only independently executable commands are executed.
• Command format depends on each command to be executed.
Sample 1
Response OK[cr/lf]
Sample 2 Description
@?robot language[cr/lf]
8
Response Format
X[cr/lf]
9 OK[cr/lf]
NG An error occurred
11
gg Alarm group number 0 to 99
13
Sample Description
^C (=03H)
8
Response Format
NG=1.8
9
Meaning Interrupts execution of the current command.
10
Sample Description
@MOVE P,P100,S=20[cr/lf]
Command
^C
Response NG=1.8[cr/lf] 11
12
13
A D HOLDALL MRKSET
ABS DATE I MSG 8
ABSADJ DBP IDIST MSGCLR
ABSRPOS DECEL IF MSPEED
ACCEL DEF IMP MTRDUTY
ACCESS
ACD
DEGRAD
DELAY
INCH
INCHT
N
NAME
9
ACO DI INCHXY NEXT
ALL DIM INIT NOT
ALM
ALMRST
DIR
DIST
INPUT
INROFST
O
OFFLINE
10
AND DO INT ON
ARCHP1 DPM ION ONLINE
ARCHP2
ARM
DRIVE
DRIVEI
J
JOG
OPEN
OPT
11
ARMCND DRV JOGT OR
ARMSEL E JOGXY ORD
ARMTYP
ARP
ELSE
ELSEIF
JTOXY
L
ORGORD
ORGRTN
12
ARY EMG LEFT ORIGIN
ASPEED END LEFTY OUT
ATN ENDIF LEN OUTPOS
ATN2 EOF LET P 13
ATTR EQV LINEMODE P
AXWGHT ERA LO PATH
B ERL LOAD PCM
BIN ERR LOC1 PDEF
BREAK ERROR LOC2 PGM
C ETH LOC3 PGMTSK
CALL ETHSTS LOC4 PGN
CASE EXIT LOC5 PLT
CFG EXITTASK LOC6 PMOVE
CHANGE F LOCF PNM
CHGPRI FN LOG PNT
CHGWRK FOR LSHIFT PPNT
CHR G M PRINT
CLOSE GEP MAINPG PRM
CMU GEPSTS MCHREF PSHFRC
CNT GO MEM PSHJGSP
CORRECTXY GOSUB MID PSHMTD
CONTPLS GOTO MO PSHRSLT
COPY H MOD PSHSPD
COS HALT MODE PSHTIME
CREWRK HALTALL MOTOR PUSH
CURPNT HAND MOVE R
CURTQST HEX MOVEI RADDEG
CURTRQ HND MOVET RBT
CUT HOLD MRF RBTWRK
7 REF
REM
SGI
SGR
TCHXY
TCOUNTER
WHRXY
WHRXYEX
REN SHARED TEACH WRITE
RESET SHIFT THEN WRKDEF
8 RESTART
RESUME
SI
SID
TIME
TIMER
X
XOR
RETURN SIN TO XYTOJ
RIGHT SIW TOLE
9 RIGHTY
RSHIFT
SKIP
SKIPTO
TORQUE
TSKECD
RTO SO TSKMON
RUN SOD TSKPGM
10
RUNTO SOW V
S SPEED VAL
S SQR VAR
SCK START VER
SCRINR STEP VMCDEF
11 SELECT STOP VMCPNO
SEND STR VMCORRECT
SEQCMPL SUB VMCSTS
SEQCMPSTS SUSPEND W
12 SEQUENCE SWI WAIT
SERVO SYNCHK WEIGHT
SET T WEIGHTG
SETGEP TAG WEND
13 SETPW TAN WHERE
Since the following names are used as system variable names, they cannot be used at the beginning of other
variable names
■ Keywords reserved as system variables cannot be used at the beginning of other variable names, even if
alphanumeric characters are added to them.
Example: "FN" cannot be used. "FNA" and "FN123" also cannot be used.
12
2 Multiple Robot Control
In conventional models (RCX240, etc.), robot has consisted of a main group (one main robot, main auxiliary axes) and
a sub group (one sub robot, sub auxiliary axes). 13
In RCX340/RCX320, robot consists of robot 1 to 4 (normal axes, auxiliary axes).
Due to this change, commands for each group have changed to ones for each robot.
For details regarding the command for each robot, refer to "2. Command list with a robot setting" in Chapter 5 of this
manual for RCX340/RCX320, and regarding the command for each group, refer to "Command list for each group” of
the programming manual for conventional models (RCX240, etc.), respectively.
MOVE P, P1 …………………………… Axes of a main group move to the position specified at P1.
MOVE2 P, P5 ………………………… Axes of a sub group move to the position specified at P5.
MOVE P, P1 …………………………… Axes of the robot 1 move to the position specified at P1.
MOVE[2] P, P5 ……………………… Axes of the robot 2 move to the position specified at P5.
Robot number can be omitted in the commands with a robot setting. When omitted, robot 1 is specified.
8
Priority 17 to 47 1 to 63
Task definition During the program In another program
Reference For details regarding the multi-tasking, refer to Chapter 6 "Multi-tasking" in this manual
10 or in a programming manual for conventional models (RCX240, etc.).
4 Robot Language
11
The following robot languages are not supported in RCX340/RCX320.
ABSINIT ABSINIT2 ABSRST ABSRPOS2
ACCEL2 ARMCND2 ARMTYP2 ASPEED2
12 AXWGHT2 CHANGE2 CURTRQ2 DECEL2
DECLARE DRIVE2 DRIVEI2 HAND2
JTOXY2 LEFTY2 MCHREF2 MOVE2
MOVEI2 ORGORD2 OUTPOS2 PMOVE2
13 RIGHTY2 SERVO2 SHIFT2 SPEED2
TOLE2 TORQUE2 TRQSTS TRQSTS2
TRQTIME TRQTIME2 WAIT ARM2 WEIGHT2
WHERE2 WHRXY2 XYTOJ2 _SYSFLG
5 Online commands
The following online commands are not supported in RCX340/RCX320.
AUTO EMGRST EXELV MANUAL
? ARM ? CONFIG ? EXELVL ? OPSLOT
? SELFCHK ? WHRXYEX
6 Data file
• "Alarm history file" replaced "Error message history file" and "Error message history details file" of conventional
models.
• In RCX340/RCX320, the point number ranges from 0 to 29999 (0 to 9999: Conventional models).
Ver. 1.20 Mar. 2016 Chapter 7 "Sequence function" was added. "PATH control" and "Torque
control" were added to robot language in Chapter 8. Chapter 9 "PATH
Statements" was added. "2.5 Sealing" was added in Chapter 11. "2 Changes
from conventional models" was added in Chapter 13.
Ver. 1.31 Mar. 2017 Conditions of PUSH statement were changed in Chapter 8. Descriptions on "
I/O name" were added in Chapter 10.
Ver. 1.33 Mar. 2018 Descriptions of current value were added to CURTQST/CURTRQ/MTRDUTY
statements, descriptions of online/offline modes were added to OFFLINE/
ONLINE statements in Chapter 8.
Ver. 1.37 Nov. 2018 Commands for work definition were added.
Ver. 2.03 Apr. 2020 Added the functions (real time output/SIOW area extension) and commands
(CONTPLS/CORRECTXY/SCRINR/INROFST).
Ver. 2.06 Feb. 2021 Added the function (Task status acquisition REFTSK) and the online
commands (HND/WRKDEF).
Ver. 2.07 Oct. 2021 Added the work data as the usable target of LOCx (Ch. 8).
Ver. 2.09 Apr. 2022 Added ACD (Data file/ Online command) and SEQCMPSTS (Online
command). Added the descriptions of sample programs to Ch. 8
Programming Manual
RCX 3 Series
4-axis/2-axis Robot Controller
Apr. 2022
Ver. 2.09