Omron SCARA YRCX Series Programming Manual
Omron SCARA YRCX Series Programming Manual

Omron SCARA YRCX Series Programming Manual

Robot controller
Hide thumbs Also See for SCARA YRCX Series:
Table of Contents

Quick Links

Table of Contents
loading

Summary of Contents for Omron SCARA YRCX Series

  • Page 3 Be sure to read this manual carefully as well as related manuals and comply with their instructions for using the OMRON robot controllers safely and correctly. For details on how to operate OMRON robot controllers, refer to the separate controller user's manual that comes with the OMRON robot controller.
  • Page 4: Safety Precautions

    Safety precautions Be sure to read before using Before using the OMRON robot controller, be sure to read this manual and related manuals, and follow their instructions to use the robot controller safely and correctly. Warning and caution items listed in this manual relate to OMRON robot controllers.
  • Page 5: Table Of Contents

    CONTENTS YRCX Programming Manual Introduction Safety precautions Chapter 1 Writing Programs 1 The OMRON Robot Language 2 Characters 3 Program Basics 4 Program Names 5 Identifiers 6 LABEL Statement 7 Comment 8 Command Statement Format Chapter 2 Constants 1 Outline 2 Numeric constants...
  • Page 6 CONTENTS YRCX Programming Manual Numeric variables Character variables 5 Array variables 6 Value Assignments 7 Type Conversions 8 Value Pass-Along & Reference Pass-Along 9 System Variables Point variable Shift variable Parallel input variable Parallel output variable Internal output variable 3-10 Arm lock output variable 3-11 Timer output variable...
  • Page 7 CONTENTS YRCX Programming Manual 2 Character string operations Character string connection Character string comparison 3 Point data format 4 DI/DO conditional expressions Chapter 5 Multiple Robot Control 1 Overview 2 Command list with a robot setting Chapter 6 Multi-tasking 1 Outline 2 Task definition method 3 Task status and transition Starting tasks Task scheduling Condition wait in task...
  • Page 8 CONTENTS YRCX Programming Manual 4 Programming a sequence program Assignment statements Input/output variables 4.2.1 Input variables 4.2.2 Output variables 4.3 Timer definition statement Logical operators Priority of logic operations 4.6 Sequence program specifications Chapter 8 Robot Language Lists How to read the robot language table Command list in alphabetic order Operation-specific Functions: in alphabetic order...
  • Page 9 CONTENTS YRCX Programming Manual Terminates another task which is currently being executed 8-37 19 CUT Acquires the date 8-38 20 DATE$ Specifies/acquires the deceleration rate parameter 8-39 21 DECEL Defines functions which can be used by the user 8-40 22 DEF FN Angle conversion (degree →...
  • Page 10 CONTENTS YRCX Programming Manual Performs axis unit system conversions (pulse → mm) 8-80 50 JTOXY Extracts character strings from the left end 8-81 51 LEFT$ Sets the SCARA robot hand system as a left-handed system 8-82 52 LEFTY Acquires a character string length 8-83 53 LEN Assigns values to variables...
  • Page 11 CONTENTS YRCX Programming Manual Acquires the program number from a specified program name 8-161 83 PGN Executes a pallet movement command for the robot 8-162 84 PMOVE Defines points within a program 8-166 85 Pn Creates pallet point data 8-168 86 PPNT Displays the specified expression value at the programming box 8-169 87 PRINT...
  • Page 12 CONTENTS YRCX Programming Manual Acquires a specified serial input's word information 8-203 116 SIW Defines the shift coordinates in the program 8-204 117 Sn Outputs a specified value 118 SO to serial port or acquires the output status 8-205 Outputs a specified serial output's double-word information 119 SOD or acquires the output status 8-207...
  • Page 13 CONTENTS YRCX Programming Manual Chapter 9 PATH Statements 1 Overview 2 Features 3 How to use 4 Cautions when using this function Chapter 10 Data file description 1 Overview 10-1 1.1 Data file types 10-1 Cautions 10-2 2 Program file 10-3 All programs 10-3 One program 10-4 3 Point file 10-5 All points...
  • Page 14 CONTENTS YRCX Programming Manual 9 Pallet definition file 10-20 9.1 All pallet definitions 10-20 9.2 One pallet definition 10-22 10 General Ethernet port file 10-24 11 Input/output name file 10-26 11.1 All input/output name data 10-26 11.2 One input/output type 10-27 11.3 One input/output port 10-28 11.4 One input/output bit 10-29 12 Area check output file 10-30 12.1 All area check output data...
  • Page 15 CONTENTS YRCX Programming Manual 24 Constant file 10-52 24.1 One character string 10-52 25 Array variable file 10-53 25.1 All array variables 10-53 25.2 One array variable 10-54 26 DI file 10-55 26.1 All DI information 10-55 26.2 One DI port 10-56 27 DO file 10-57 27.1 All DO information 10-57...
  • Page 16 CONTENTS YRCX Programming Manual 35 EOF file 10-73 35.1 EOF data 10-73 36 Serial port communication file 10-74 36.1 Serial port communication file 10-74 37 Ethernet port communication file 10-75 37.1 Ethernet port communication file 10-75 Chapter 11 User program examples 1 Basic operation 11-1 Directly writing point data in program 11-1 Using point numbers 11-2 Using shift coordinates 11-3 Palletizing 11-4...
  • Page 17 CONTENTS YRCX Programming Manual 3 Reference commands 12-23 Acquiring return-to-origin status 12-23 Acquiring the servo status 12-24 Acquire motor power status 12-24 Acquiring the access level 12-25 Acquiring the break point status 12-25 Acquiring the mode status 12-26 Acquiring the communication port status 12-26 Acquiring the main program number 12-27...
  • Page 18 CONTENTS YRCX Programming Manual 6 Utility commands 12-52 6.1 Setting the sequence program execution flag 12-52 Setting the date 12-52 Setting the time 12-53 7 Individual execution of robot language 12-54 8 Control codes 12-55 Chapter 13 Appendix 1 Reserved word list 13-1 2 Changes from conventional models 13-3 Program name 13-3 A) FUNCTION 13-3...
  • Page 19 Chapter 1 Writing Programs The OMRON Robot Language ....1-1 Characters ..........1-1 Program Basics ......... 1-1 Program Names ........1-2 Identifiers ........... 1-4 LABEL Statement ........1-4 Comment ..........1-5 Command Statement Format ....1-5...
  • Page 21: The Omron Robot Language

    The OMRON robot language is similar to BASIC (Beginner’s All-purpose Symbolic Instruction Code) and makes even complex robot movements easy to program. This manual explains how to write robot control programs with the OMRON robot language, including actual examples on how its commands are used.
  • Page 22: Program Names

    Program Names Each program to be created in the robot controller must have its own name. Programs can be named as desired provided that the following conditions are satisfied: Program names may contain no more than 32 characters, comprising a combination of ■...
  • Page 23 B) COMMON Functions A separate "COMMON" program can be created to perform the same processing in multiple robot 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.
  • Page 24: Identifiers

    Identifiers "Identifiers" are a combination of characters and numerals used for label names, variable names, and procedure names. Identifiers can be named as desired provided that the following conditions are satisfied: Identifiers must consist only of alphanumeric characters and underscores (_). Special symbols ■...
  • Page 25: Comment

    Comment Characters which follow REM or an apostrophe (') are processed as a comment. Comment statements are not executed. Moreover, comments may begin at any point in the line. SAMPLE REM *** MAIN PROGRAM *** (Main program) ’*** SUBROUTINE *** (Subroutine) HALT ’HALT COMMAND ············...
  • Page 27: Chapter 2 Constants

    Chapter 2 Constants Outline ............2-1 Numeric constants ........2-1 Character constants ........ 2-2...
  • Page 29: Outline

    Outline 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 type type -2,147,483,648 to 2,147,483,647 Binary constants &B0 to &B11111111 Hexadecimal constants &H80000000 to &H7FFFFFFF Real type Single-precision real numbers...
  • Page 30: Character Constants

    255 bytes in length, and it may contain upper-case alphabetic characters, numerals, special characters, or katakana (Japanese) characters. To include a double quotation mark (") in a string, enter two double quotation marks in succession. SAMPLE "OMRON ROBOT" "EXAMPLE OF""A""" ·················· EXAMPLE OF "A" PRINT "COMPLETED" "OMRON ROBOT"...
  • Page 31 Chapter 3 Variables Outline ............3-1 User Variables & System Variables ..3-2 Variable Names ........3-3 Variable Types .......... 3-4 Array variables ......... 3-5 Value Assignments ........3-5 Type Conversions ........3-6 Value Pass-Along & Reference Pass-Along..3-6 System Variables ........3-7 Bit Settings ..........
  • Page 33 Outline 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 editing, program resets, and program switching. "Static variables" are not cleared unless the memory is cleared.
  • Page 34: Chapter 3 Variables

    User Variables & System Variables User Variables Numeric type variables consist of an "integer type" and a "real type", and these two types have different usable numeric value ranges. Moreover, each of these types has different usable variables (character string variables, array variables, etc.), and different data ranges, as shown below. Category Variable Type Details/Range...
  • Page 35: Variable Names

    Variable Names Dynamic Variable Names Dynamic variables can be named as desired, provided that the following conditions are satisfied: The name must consist only of alphanumeric characters and underscores (_). Special symbols ■ cannot be used. The name must not exceed 32 characters (all characters beyond the 32th character are ignored). ■...
  • Page 36: Variable Types

    Character variables and character array elements can handle a character string of up to 255 characters. Character strings may include alphabetic characters, numbers, symbols and katakana (Japanese phonetic characters). Examples: R1$ = "OMRON" R2$(2) = R1$ + "MOTOR" ··········· "OMRON MOTOR" Chapter 3 Variables...
  • Page 37: Array Variables

    Array variables Both numeric and character type arrays can be used at dynamic variables. Using an array allows multiple same-type continuous data to be handled together. Each of the array elements is referenced in accordance with the parenthesized subscript which appears after each variable name.
  • Page 38: Type Conversions

    Type Conversions When different-type values are assigned to variables, the data type is converted as described below. • When a real number is assigned to an integer type: The decimal value is rounded off to the nearest whole number. • When an integer is assigned to a real type: The integer is assigned as it is, and is handled as a real number.
  • Page 39: System Variables

    System Variables The following system variables are pre-defined, and other variable names must not begin with the characters used for these system variable names. Variable Type Format Meaning Point variable Pnnn / P [expression] Specifies a point number Shift variable Sn / S [expression] Specifies the shift number as a constant or as an expression...
  • Page 40: Shift Variable

    Shift variable This variable specifies a shift coordinate number with a numeric constant or expression. Format Snn or S[expression] Values n: Shift number ..... 0 to 9 Functions A shift number is expressed with an "S" followed by a 2-digits number or an expression surrounded by brackets ([expression]).
  • Page 41: Parallel Output Variable

    Parallel output variable Specifies the parallel output signal or indicates the output status. Format 1 DOm(b,···,b) Format 2 DO(mb,···,mb) Values m : port number ....0 to 7, 10 to 17, 20 to 27 b : bit definition ....0 to 7 If the bit definition is omitted in Format 1, bits 0 to 7 are all selected.
  • Page 42: Internal Output Variable

    Internal output variable Specifies the controller's internal output signals and indicates the signal status. Format 1 MOm(b,···,b) Format 2 MO(mb,···,mb) Values m : port number ....0 to 7, 10 to 17, 20 to 27, 30 to 33 b : bit definition ....0 to 7 •...
  • Page 43: Arm Lock Output Variable

    Examples: A%=MO2 () →Internal output status of MO(27) to MO(20) is assigned to variable A%. A%=MO5(7,4,0) →Internal output status of MO(57), MO(54) and MO(50) is assigned to variable A%. (If all above signals are 1 (ON), then A%=7.) A%=MO(37,25,20) →Internal output status of MO(37), MO(25) and MO(20) is assigned to variable A%.
  • Page 44: Timer Output Variable

    • When specifying multiple bits, specify them from left to right in descending order (high to low). MEMO • 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.
  • Page 45: Serial Input Variable

    Serial input variable This variable is used to indicate the status of serial input signals. Format 1 SIm(b,···,b) Format 2 SI(mb,···,mb) Values m : port number ....0 to 7, 10 to 17, 20 to 27 b : bit definition ....0 to 7 •...
  • Page 46: Serial Output Variable

    Serial output variable This variable is used to define the serial output signals and indicate the output status. Format 1 SOm(b,···,b) Format 2 SO(mb,···,mb) Values m : port number ....0 to 7, 10 to 17, 20 to 27 b : bit definition ....0 to 7 •...
  • Page 47: Serial Word Input

    9.10 Serial word input This variable indicates the status of the serial input word information. Format SIW(m) Values m : port number ....2 to 15 The acquisition range is 0 (&H0000) to 65,535 (&HFFFF). Examples: A%=SIW(2) →The input status from SIW (2) is assigned to variable A%.
  • Page 48: Serial Word Output

    9.12 Serial word output Outputs to the serial output word information or indicates the output status. Format SOW(m) Values m : port number ....2 to 15 The output range is 0 (&H0000) to 65,535 (&HFFFF). Note that if a negative value is output, the low-order word information will be output after being converted to hexadecimal.
  • Page 49: Bit Settings

    Bit Settings Bits can be specified for input/output variables by any of the following methods. 1. Single bit 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. Programming example: DOm(b)DOm(b) Example: DO(25) Specifies bit 5 of port 2.
  • Page 50: Valid Range Of Variables

    Valid range of variables 11.1 Valid range of dynamic (array) variables Dynamic (array) variables are divided into global variables and local variables, according to their declaration position in the program. Global and local variables have different valid ranges. Variable Type Explanation Global variables Variables are declared outside of sub-procedures (outside of...
  • Page 51: Clearing Variables

    Clearing variables 12.1 Clearing dynamic variables In the cases below, numeric variables are cleared to zero, and character variables are cleared to a null string. The array is cleared in the same manner. When a program reset occurs. ■ When dedicated input signal DI15 (program reset input) was turned on while the program was ■...
  • Page 53 Chapter 4 Expressions and Operations Arithmetic operations ......4-1 Character string operations ....4-4 Point data format ........4-5 DI/DO conditional expressions ....4-6...
  • Page 55: Arithmetic Operations

    Arithmetic operations Arithmetic operators Operators Usage Example Meaning Adds A to B Subtracts B from A Multiplies A by B Divides A by B Obtains the B exponent of A (exponent operation) Reverses the sign of A A MOD B Obtains the remainder A divided by B When a "remainder"...
  • Page 56: Logic Operations

    Logic operations Logic operators are used to manipulate 1 or 2 values bit by bit. For example, the status of an I/O port can be manipulated. Depending on the logic operation performed, the results generated are either 0 or 1. ■...
  • Page 57: Priority Of Arithmetic Operation

    Priority of arithmetic operation Operations are performed in the following order of priority. When two operations of equal priority appear in the same statement, the operations are executed in order from left to right. Priority Rank Arithmetic Operation Expressions included in parentheses Functions, variables ^ (exponents) Independent "+"...
  • Page 58: Character String Operations

    F$=A$+" "+D$ PRINT E$ PRINT F$ Results: OMRON ROBOT LANGUAGE OMRON MOUNTER Character string comparison Characters can be compared with the same relational operators as used for numeric values. Character string comparison can be used to find out the contents of character strings, or to sort character strings into alphabetical order.
  • Page 59: Point Data Format

    Point data format There are two types of point data formats: joint coordinate format and Cartesian coordinate format. NOTE Point numbers are in the range of 0 to 29999. • T h e d a t a f o r m a t i s c o m m o n f o r a x e s 1 Coordinate Format Data Format...
  • Page 60: Di/Do Conditional Expressions

    DI/DO conditional expressions DI/DO conditional expressions may be used to set conditions for WAIT statements and STOPON options in MOVE statements. Numeric constants, variables and arithmetic operators that may be used with DI/DO conditional expressions are shown below. • Constant Decimal integer constant, binary integer constant, hexadecimal integer constant •...
  • Page 61: Chapter 5 Multiple Robot Control

    Chapter 5 Multiple Robot Control Overview ........... 5-1 Command list with a robot setting ..5-2...
  • Page 63: Overview

    Overview YRCX 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.
  • Page 64: Command List With A Robot Setting

    Command list with a robot setting 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. Operator Command name Robot movement DRIVE DRIVEI...
  • Page 65 Chapter 6 Multi-tasking Outline ............6-1 Task definition method ......6-1 Task status and transition ......6-2 Multi-task program example ....6-8 Sharing the data ........6-8 Cautionary Items ........6-9...
  • Page 67: Outline

    Outline 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.
  • Page 68: Task Status And Transition

    Task status and transition 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. READY status A task is present and ready to be allocated to the CPU for task processing.
  • Page 69: Task Scheduling

    Task scheduling Task scheduling determines the priority to be used in allocating tasks in the READY (execution enabled) status to the CPU and executing them. When there are two or more tasks which are put in the READY status, ready queues for CPU allocation are used to determine the priority for executing the tasks.
  • Page 70: Condition Wait In Task

    Condition wait in task A task is put in the WAIT status (waiting for an event) when a command causing WAIT status is executed for that task. At this time, the transition to READY status does not take place until the wait condition is canceled.
  • Page 71: Suspending Tasks (Suspend)

    Suspending tasks (SUSPEND) The SUSPEND command temporarily stops tasks other than task 1 and places them in SUSPEND status. When the SUSPEND command is executed, the status transition takes place as follows. Task that executed the SUSPEND command → RUN status ■...
  • Page 72: Deleting Tasks

    Deleting tasks Task self-delete (EXIT TASK) Tasks can delete themselves and set to the NON EXISTENT (no task registration) status by using the EXIT TASK command. When the EXIT TASK command is executed, the status transition takes place as follows. Task that executed the EXIT TASK command →...
  • Page 73: Stopping Tasks

    Stopping tasks All tasks stop if any of the following cases occurs. HALTALL command is executed. (stop & reset) All programs are reset and task is put in the NON EXISTENT status. When the main program is specified, the HALTALL command registers the main program in the task 1 and all tasks are put in the STOP status at the beginning line.
  • Page 74: Multi-Task Program Example

    Multi-task program example Tasks are executed in their scheduled order. An example of a multi-task program is shown below. SAMPLE ’TASK1 START ,T2 START ,T3 *ST1: DO(20) = 1 WAIT MO(20) = 1 MOVE P,P1,P2,Z=0 IF MO(21)=1 THEN *FIN GOTO *ST1 *FIN: CUT T2 HALTALL...
  • Page 75: Cautionary Items

    Cautionary Items A freeze may occur if subtasks are continuously started (START command) and ended (EXIT TASK command) by a 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.
  • Page 77: Sequence Function

    Chapter 7 Sequence function Sequence function ........7-1 Creating a sequence program ....7-1 Executing a sequence program ..... 7-4 Programming a sequence program ..7-5...
  • Page 79: Creating A Sequence Program

    Sequence function Besides normal robot programs, the YRCX controller can execute high-speed processing programs NOTE (sequence programs) in response to the robot input/output (DI, DO, MO, LO, TO, SI, SO) signals. • While the "DI10: sequence control input" is ON, a •...
  • Page 80 Step 3 Step 3 E n t e r " S E Q U E N C E " o n t h e Creating new program program name entry screen, and press the [OK] button. 34703-R9-00 Step 4 Program selection Step 4 U s e t h e c u r s o r k e y s ( s / t ) t o s e l e c t "...
  • Page 81: Compiling

    Compiling Compile and create an executable sequence program. Step 1 Press the F3 key (SEQ CMP) on Step 1 Program selection t h e " P R O G R A M S E L E C T I O N " screen.
  • Page 82: Executing A Sequence Program

    Executing a sequence program All the following conditions must be satisfied to execute a sequence program. The sequence program has been compiled. The sequence program execution flag is enabled. (For details regarding the sequence program execution flag, refer to the YRCX operator’s manual.) The external sequence control input (DI10) contact is ON.
  • Page 83: Programming A Sequence Program

    Programming a sequence program When programming a sequence program, you may use only assignment statements comprised of input/output variables and logical operators. Assignment statements Format output variable = expression Values expression ......Any one of the following can be used. •...
  • Page 84: 4.2.2 Output Variables

    4.2.2 Output variables ● Parallel output variables Format DO(mb) m: Port number ·············· 0 to 7, 10 to 17, 20 to 27 b: bit definition ············ 0 to 7 A parallel output is specified, or the output status is referenced. Ports 0 and 1 are for referencing only, and no outputs can occur there.
  • Page 85: Timer Definition Statement

    Timer usage example SAMPLE TIM02 = 2500 ···················· Timer 02 is set to 2.5 seconds. TO(02) = DI(23) ················· Timer starts when DI(23) switches ON. • When DI(23) is ON, after 2.5 seconds, TO(02) is set ON. • When DI(23) is OFF, TO(02) is also OFF. •...
  • Page 86: Priority Of Logic Operations

    Priority of logic operations Priority Ranking Operation Content Expressions in parentheses NOT, ~ (Logical NOT) AND, & (Logical AND) OR, | (Logical OR) XOR (Exclusive OR) EQV (Logical equivalence operator) IMP (Logical implication operator) ● Example with a ladder statement substitution SAMPLE DO(23)=DI(16)&DO(35) MO(34)=DO(25) | ~DI(24)
  • Page 87 Chapter 8 Robot Language Lists How to read the robot language table ..8-1 Command list in alphabetic order ....8-2 Operation-specific ........... 8-7 Functions: in alphabetic order ...... 8-13 Functions: operation-specific ......8-16 ABS ............8-18 ABSRPOS ..........8-19 ACCEL ..........
  • Page 88 COS ............. 8-34 CURTQST ..........8-35 CURTRQ ..........8-36 CUT ............8-37 DATE$ ........... 8-38 DECEL ..........8-39 DEF FN ..........8-40 DEGRAD ..........8-41 DELAY ..........8-42 DI ............8-43 DIM ............8-44 DIST ............8-45 DO ............8-46 DRIVE ...........
  • Page 89 LEFT$ ............ 8-81 LEFTY ............ 8-82 LEN ............8-83 LET ............8-84 LO ............8-87 LOCx ............ 8-89 LSHIFT ........... 8-91 MCHREF ..........8-92 MID$ ............ 8-93 MO ............8-94 MOTOR ..........8-96 MOVE ........... 8-97 MOVEI ..........8-112 MOVET ..........8-122 MTRDUTY ..........
  • Page 90 PPNT ........... 8-168 PRINT ..........8-169 PSHFRC ..........8-170 PSHJGSP ..........8-171 PSHMTD ..........8-172 PSHRSLT ..........8-173 PSHSPD ..........8-174 PSHTIME ..........8-175 PUSH ..........8-176 RADDEG ..........8-181 REM ............ 8-182 RESET ..........8-183 RESTART ..........8-184 RESUME ..........8-185 RETURN ..........
  • Page 91 SOW ........... 8-208 SPEED ..........8-209 SQR ............ 8-210 START ..........8-211 STR$ ............ 8-212 SUB to END SUB ......... 8-213 SUSPEND ..........8-215 SWI ............. 8-216 TAN ............ 8-217 TCOUNTER ......... 8-218 TIME$ ..........8-219 TIMER ..........8-220 TO ............8-221 TOLE ...........
  • Page 93: How To Read The Robot Language Table

    How to read the robot language table The key to reading the following robot language table is explained below. Name Description Online Type Command Declares array variable (1) No. Indicates the Item No. where this robot language is explained in detail. Example of "No."...
  • Page 94: Command List In Alphabetic Order

    Command list in alphabetic order Name Description Online Type Acquires the absolute value of a specified value. Function Acquires the machine reference value for specified robot ABSRPOS axes. (Valid only for axes whose return-to-origin method is Function set as "mark".) Specifies/acquires the acceleration coefficient parameter of Command / ACCEL...
  • Page 95 Name Description Online Type DRIVEI Moves a specified axis of a specified robot to a relative position. Command 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 Function occurred / the line number where an error occurred.
  • Page 96 Name Description Online Type Acquires the return-to-origin or absolute-search machine reference value for specified robot axes. (Valid only for axes MCHREF Function whose return-to-origin method is set as "sensor" or "stroke- end".) Extracts a character string of a desired length from a MID$ Function specified character string.
  • Page 97 Name Description Online Type Command / PSHFRC Specifies/acquires the "Push force" parameter. Function Specifies/acquires the push judge speed threshold Command / PSHJGSP parameter. Function Command / PSHMTD Specifies/acquires the push method parameter. Function PSHRSLT Acquires the status at the end of the PUSH statement. Function Command / PSHSPD...
  • Page 98 Name Description Online Type SPEED Changes the program movement speed of a specified robot. Command Acquires the square root of a specified value. Function Specifies the task number and priority ranking of a specified START Command program, and starts that program. STR$ Converts a specified value to a character string (↔VAL).
  • Page 99: Operation-Specific

    Operation-specific Program commands General commands Command Description Online Type Declares the array variable name and the number of Command elements. Executes a specified assignment statement. Command Expresses a comment statement. Command Arithmetic commands Command Description Online Type Acquires the absolute value of a specified value. Function Acquires the arctangent of the specified value.
  • Page 100 Command Description Online Type Acquires the character code of the first character in a Function specified character string. Extracts a character string comprising a specified number RIGHT $ Function of digits from the right end of a specified character string. STR $ Converts a specified value to a character string (↔VAL).
  • Page 101 Error control Command Description Online Type Acquires the error code number of an error which has ERR / ERL Function occurred / the line number where an error occurred. This command allows the program to jump to the error ON ERROR processing routine specified by the label without stopping Command GOTO...
  • Page 102 Robot control Robot operations Command Description Online Type DRIVE Moves a specified axis of a specified robot to an absolute position. Command DRIVEI Moves a specified axis of a specified robot to a relative position. Command MOTOR Controls the motor power status. Command MOVE Performs absolute movement of all axes of a specified robot.
  • Page 103 Command Description Online Type Specifies/acquires the arch position 2 parameter of a Command / ARCHP2 specified robot. Function Specifies/acquires the AUTO movement speed of a Command / ASPEED specified robot. Function Specifies/acquires the axis tip weight parameter of a Command / AXWGHT specified robot.
  • Page 104 Input/output & communication control Input/output control Command Description Online Type DELAY Waits for the specified period (units: ms). Command Outputs a specified value to the DO port or acquires the DO Command / status. Function Outputs a specified value to the LO port to enable/disable Command / axis movement or acquires the LO status.
  • Page 105: Functions: In Alphabetic Order

    Functions: in alphabetic order Function Type Description Arithmetic function Acquires the absolute value of a specified value. Acquires the machine reference value for specified robot axes. ABSRPOS Arithmetic function (Valid only for axes whose return-to-origin method is set as "mark".) ACCEL Arithmetic function Acquires the acceleration coefficient parameter of a specified robot.
  • Page 106 Function Type Description Acquires point data for a specified axis or shift data for a LOCx Point function specified element. LSHIFT Arithmetic function Shifts a value to the left by the specified bit count. (↔RSHIFT) Acquires the return-to-origin or absolute-search machine MCHREF Arithmetic function reference for specified robot axes.
  • Page 107 Function Type Description Character string Acquires the current time as an "hh:mm:ss" format character TIME$ function string. TIMER Arithmetic function Acquires the current time in seconds, counting from midnight. TOLE Arithmetic function Acquires the tolerance parameter of a specified robot. Acquires the maximum torque command value which can be set TORQUE Arithmetic function...
  • Page 108: Functions: Operation-Specific

    Functions: operation-specific Point related functions Function name Description Converts joint coordinate data to Cartesian coordinate data of a specified robot. JTOXY (↔XYTOJ) LOCx Acquires point data for a specified axis or shift data for a specified element. PPNT Creates point data specified by a pallet definition number and pallet position number. Reads out the current position of the arm of a specified robot in joint coordinates WHERE (pulse).
  • Page 109 Program related functions Function name Description PGMTSK Acquires the task number in which a specified program is registered. Acquires the program number from a specified program name. TSKPGM Acquires the program number which is registered in a specified task. Numeric calculation related functions Function name Description Acquires the absolute value of a specified value.
  • Page 110: Abs

    Acquires absolute values Format ABS (expression) Explanation Returns a value specified by an as an absolute value. SAMPLE A=ABS(-326.55) ·················· The absolute value of -362.54 (=362.54) is assigned to variable A. 8-18 Chapter 8 Robot Language Lists...
  • Page 111: Absrpos

    ABSRPOS Acquires the machine reference value (axes: mark method) Format ABSRPOS [robot number] (axis number) Values Robot number ......1 to 4 (If not input, robot 1 is specified.) Axis number ......1 to 6 Explanation Acquires the machine reference value of axes specified by an . This function is valid only for axes whose return-to-origin method is set as "Mark", not for "Sensor"...
  • Page 112: Accel

    ACCEL Specifies/acquires the acceleration coefficient parameter Format 1. ACCEL [robot number] expression 2. ACCEL [robot number] (axis number)=expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 expression ......1 to 100 (units: %) Explanation Changes the acceleration coefficient parameter of the robot axis specified by the ...
  • Page 113: Archp1 / Archp2

    ARCHP1 / ARCHP2 Specifies/acquires the arch position parameter Format 1. ARCHP1 [robot number] expression 2. ARCHP1 [robot number] (axis number)=expression Format 1. ARCHP2 [robot number] expression 2. ARCHP2 [robot number] (axis number)=expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 expression ......0 to 99999999 (Unit: pulses) Explanation...
  • Page 114: 4 Archp1 / Archp2

    ARCHP1 / ARCHP2 SAMPLE ARCHP1(3(=10 ···················· The arch position 1 parameter value of the 3rd axis of robot 1 changes to 10 pulses. ARCHP2(3(=20 ···················· The arch position 2 parameter value of the 3rd axis of robot 1 changes to 20 pulses.
  • Page 115: Armcnd

    ARMCND Acquires the current arm status Format ARMCND [robot number] Values robot number ......1 to 4 (If not input, robot 1 is specified.) Explanation This function acquires the current arm status of the SCARA robot. The robot to acquire an arm status is specified by the . The arm status is "1"...
  • Page 116: Armsel

    ARMSEL Sets/acquires the current hand system selection Format ARMSEL [robot number] expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) expression ......1: right hand system; 2: left hand system Explanation This function sets the current hand system selection of the SCARA robot. A robot to set a hand system is specified by the .
  • Page 117: Armtyp

    ARMTYP Sets/acquires the hand system selection during program reset Format ARMTYP [robot number] expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) expression ......1: right hand system; 2: left hand system 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 .
  • Page 118: Aspeed

    ASPEED Sets/acquires the AUTO movement speed of a specified robot Format ASPEED [robot number] expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) expression ......1 to 100 (units: %) Explanation Changes the automatic movement speed of the robot specified by the ...
  • Page 119: Atn / Atn2

    ATN / ATN2 Acquires the arctangent of the specified value Format ATN (expression) Format ATN2 (expression 1, expression 2) Explanation ATN: Acquires the arctangent values of the specified values. The acquired values are radians within the following range: - π / 2 to + π / 2 ATN2: Acquires the arctangent values of the specified ...
  • Page 120: Axwght

    AXWGHT Sets/acquires the axis tip weight Format AXWGHT [robot number] (axis number)=expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 expression ......Varies according to the specified robot. Explanation Changes the axis tip weight parameter for the specified axis to the value.
  • Page 121: Call

    CALL Calls a sub-procedure NOTE Format • When a value is passed CALL label (actual argument , actual argument…) on to a sub-procedure, the original value of the actual argument will not Explanation This statement calls up sub-procedures defined by the SUB to END SUB statements. be changed even if it is changed in the sub- The
  • Page 122: Change

    CHANGE Switches the hand Format CHANGE [robot number] Values robot number ......1 to 4 (If not input, robot 1 is specified.) n: hand number ....0 to 31 Explanation CHANGE is used to switch the robot hand specified by the . If OFF is specified, the hand setting is not enabled.
  • Page 123: Chgpri

    CHGPRI Changes the priority ranking of a specified task Format CHGPRI Values m: Program number ....0 to 100 n: Task number .....1 to 16 p: Task priority ranking ..1 to 64 Explanation Directly changes the priority ranking of the specified task ("n") to "p". The smaller the priority number, the higher the priority (high priority: 1 ⇔...
  • Page 124: Chr

    CHR$ Acquires a character with the specified character code Format CHR$ (expression) Values expression ......0 to 255 Explanation Acquires a character with the specified character code. An error occurs if the value is outside the 0 to 255 range. SAMPLE A$=CHR$(65) ·····················...
  • Page 125: Close

    CLOSE Closes the specified General Ethernet Port Format CLOSE GPm Values m: General Ethernet Port number ....0 to 7 Explanation Closes the communication port of the specified General Ethernet Port. SAMPLE OPEN GP1 ····················· Opens the General Ethernet Port 1. SEND "123"...
  • Page 126: Cos

    Acquires the cosine value of a specified value Format COS (expression) Values expression ......Angle (units: radians) Explanation Acquires a cosine value for the value. SAMPLE A(0)=B*COS(C) ··················· The product of the C variable's cosine value and variable B is assigned to array A (0).
  • Page 127: Curtqst

    CURTQST Acquires the current torque value of a specified axis to the rated torque Format CURTQST [robot number] (axis number) Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 Explanation Acquires the current torque value (-1000 to 1000) to the rated torque value of the specified axis .
  • Page 128: Curtrq

    CURTRQ Acquires the current torque of the specified axis Format CURTRQ [robot number] (expression) Values robot number ......1 to 4 (If not input, robot 1 is specified.) expression ......1 to 6 Explanation Acquires the current torque value (-100 to 100) of the axis specified by the .
  • Page 129: Cut

    Terminates another task which is currently being executed Format Values m: Program number ....0 to 100 n: Task number ......1 to 16 Explanation Terminates another task which is currently being executed or which is temporarily stopped. A task can be specified by the name or the number of a program in execution.
  • Page 130: Date

    DATE$ Acquires the date Format DATE$ 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. Date setting is performed from an operation terminal such as a programming box. SAMPLE A$=DATE$ PRINT DATE$...
  • Page 131: Decel

    DECEL Specifies/acquires the deceleration rate parameter Format 1. DECEL [robot number] expression 2. DECEL [robot number] (axis number)=expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 expression ......1 to 100 (units: %) Explanation Change the deceleration rate parameter of the specified robot axis to the ...
  • Page 132: Def Fn

    DEF FN Defines functions which can be used by the user Format DEF FN name % (dummy argument, dummy argument…)=function definition expression Values name ........Function name. Max. of 16 characters including "FN". dummy argument ....Numeric or character string variable. Explanation Defines the functions which can be used by the user.
  • Page 133: Degrad

    DEGRAD Angle conversion (degree → radian) Format DEGRAD (expression) Values expression ......Angle (units: degrees) Explanation The value is converted to radians. • To convert radians to degrees, use RADDEG. MEMO SAMPLE A=COS(DEGRAD(30)) ··············· A cosine value which is converted 30° to radians is assigned to variable A.
  • Page 134: Delay

    DELAY Program execution waits for a specified period of time Format DELAY expression Values expression ......0 to 3600000 (units: ms) Explanation A "program wait" status is established for the period of time specified by the . The minimum wait period is 1ms. SAMPLE DELAY 3500 3,500ms (3.5 secs) wait A-50...
  • Page 135 Acquires the input status from the parallel port Format 1. LET expression = DIm(b,···,b) 2. LET expression = DI(mb,···,mb) Values m: port number ..... 0 to 7, 10 to 17, 20 to 27 b: bit definition ...... 0 to 7 (If omitted, all 8 bits are processed.) If multiple bits are specified, they are expressed from the left in descending order (high to low).
  • Page 136: Dim

    Declares array variable Format DIM array definition , array definition,… Array definition name (constant , constant, constant) Values constant : Array subscript ..0 to 32,767 (positive integer) 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.
  • Page 137: Dist

    DIST Acquires the distance between 2 specified points Format DIST (point expression 1, point expression 2) Values point expression 1 ....Cartesian coordinate system point point expression 2 ....Cartesian coordinate system point Explanation Acquires the distance (units: mm) between the 2 points (X,Y,Z) specified by ...
  • Page 138 Outputs to parallel port or acquires the output status Format 1. LET DOm (b,···,b) =expression 2. LET DO (mb,···,mb) =expression Values m: port number ..... 2 to 7, 10 to 17, 20 to 27 b: bit definition ...... 0 to 7 (If omitted, all 8 bits are processed.) If multiple bits are specified, they are expressed from the left in descending order (high to low).
  • Page 139 Functions Format LET DOm (b,···,b) LET DO (mb,···,mb) Values m: port number ..... 0 to 7, 10 to 17, 20 to 27 b: bit definition ...... 0 to 7 (If omitted, all 8 bits are processed.) If multiple bits are specified, they are expressed from the left in descending order (high to low).
  • Page 140: Drive

    DRIVE Executes absolute movement of specified axes Format DRIVE [robot number] (axis number, expression) ,(axis number, expression)..., option, option Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 expression ......Motor position (mm, degrees, pulses) or point expression Explanation Executes absolute movement command for the specified axis...
  • Page 141 DRIVE The WAIT ARM statement is used to execute the next command after the axis enters the tolerance range.    DRIVE command DRIVE(1,P1) DRIVE(1,P1) Target position DO(20)=1 WAIT ARM DO(20)=1 Tolerance OUT position DO(20) turns ON DO(20) turns ON DRIVE(1,P1) DRIVE(1,P1) Target position WAIT ARM...
  • Page 142 DRIVE ● Point definition Point data is specified in . The axis data specified by the 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. However, when using the optional XY setting, movement occurs from the Cartesian coordinate origin position.
  • Page 143 DRIVE ● STOPON condition setting Format STOPON conditional expression Explanation Stops movement when the conditions specified by the are met. Because this is a deceleration type stop, there will be some movement (during deceleration) after the conditions are met. If the conditions are already met before movement begins, no movement occurs, and the command is terminated.
  • Page 144: Drivei

    DRIVEI Moves the specified robot axes in a relative manner Format DRIVEI [robot number] (axis number, expression), (axis number, expression)..., option, option Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 expression ......Target position (mm, deg, pulses) or point expression Explanation Executes relative movement, including the auxiliary axes.
  • Page 145 DRIVEI The WAIT ARM statement are used to execute the next command after the axis enters the tolerance range. DRIVEI command WAIT ARM statement DRIVEI(1,P1) DRIVEI(1,P1) Target position DO(20)=1 WAIT ARM DO(20)=1 Tolerance OUT position DO(20) turns ON DO(20) turns ON DRIVEI(1,P1) DRIVEI(1,P1) Target position...
  • Page 146 DRIVEI Point data setting types ● Direct numeric value input The target position is specified in . If the target position's numeric value is a real number, this is interpreted as a "mm/ deg" units, and each axis will move from its current position to a pulse-converted position. SAMPLE DRIVEI(1,10000) ··············...
  • Page 147 DRIVEI Option types ● Speed setting Format SPEED=expression S=expression Values expression ......1 to 100 (units: %) NOTE • This defines the maximum Explanation The program's movement speed is specified by the . s p e e d , a n d d o e s n o t The actual speed is as follows: g u a r a n t e e t h a t a l l movement will occur at...
  • Page 148 DRIVEI ● STOPON condition setting Format STOPON conditional expression Explanation Stops movement when the conditions specified by the are met. Because this is a deceleration type stop, there will be some movement (during deceleration) after the conditions are satisfied. If the conditions are already satisfied before movement begins, no movement occurs, and the command is terminated.
  • Page 149: End Select

    END SELECT Ends the SELECT CASE statement Format SELECT CASE expression CASE expression's list 1 command block 1 CASE expression's list 2 command block 2 CASE ELSE command block n END SELECT Explanation Directly ends the SELECT CASE command block. For details, refer to section "104 SELECT CASE to END SELECT".
  • Page 150: End Sub

    END SUB Ends the sub-procedure definition Format SUB label (dummy argument, dummy argument…) command block END SUB Explanation Ends the sub-procedure definition which begins at the SUB statement. For details, refer to section "125 SUB to END SUB". SAMPLE 1 CALL *TEST PRINT I...
  • Page 151: Err / Erl

    ERR / ERL Acquires the error code / error line number Format ERR(task number) ERL(task number) Values task number ......1 to 4 Explanation Variables ERR and ERL are used in error processing routines specified by the ON ERROR GOTO statement. ERR of the task specified by the ...
  • Page 152: Ethsts

    ETHSTS Acquires the Ethernet port status Format ETHSTS Explanation Acquires the Ethernet port status. -2 ..Ethernet port is not opened yet. -1 ..LAN cable is not connected. 0..The connection is not established. 1..The connection is established. 2..
  • Page 153: Exit For 36 Exit Sub

    EXIT FOR Terminates the FOR to NEXT statement loop Format EXIT FOR Explanation Terminates the FOR to NEXT statement loop, then jumps to the command which follows the NEXT statement. This statement is valid only between the FOR to NEXT statements. •...
  • Page 154 EXIT SUB Terminates the sub-procedure defined by the SUB to END SUB statement Format EXIT SUB 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.
  • Page 155: Exit Task

    EXIT TASK Terminates its own task which is in progress Format EXIT TASK Explanation Terminates its own task which is currently being executed. SAMPLE ’TASK1 ROUTINE *ST: MO(20)=0 START ,T2 MOVE P,P0,P1 WAIT MO(20)=1 GOTO *ST HALTALL Program name:SUB_PGM ’TASK2 ROUTINE *SUBTASK2: P100=JTOXY(WHERE) IF LOCZ(P100)>=100.000 THEN...
  • Page 156: For To Next

    FOR to NEXT Performs loop processing until the variable exceeds the specified value Format FOR control variable = start value TO end value STEP step command block NEXT control variable Explanation These statements repeatedly execute commands between the FOR to NEXT statements for the ...
  • Page 157: Gepsts

    GEPSTS Acquires the General Ethernet Port status Format GEPSTS(General Ethernet Port number) Values General Ethernet Port number ....0 to 7 Explanation Acquires the specified General Ethernet port status. -2 ..The specified General Ethernet port is not opened yet. -1 ..
  • Page 158: Gosub To Return

    GOSUB to RETURN Jumps to a subroutine Format GOSUB label * GOSUB can also be expressed as "GO SUB". label: RETURN Explanation Jumps to the
  • Page 159: Goto

    GOTO Executes an unconditional jump to the specified line Format GOTO label * GOTO can also be expressed as "GO TO". Explanation Executes an unconditional jump to the line specified by
  • Page 160: Halt

    HALT Stops the program and performs a reset Format HALT expression character string Explanation Stops the program and resets it. If restarted after a HALT, the program runs from its beginning. If an or a is written, the operation result of ...
  • Page 161: Haltall

    HALTALL Stops all programs and performs reset Format HALTALL expression character string Explanation Stops and resets all programs. Dynamic variables, array variables, output variables are also rest. 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.
  • Page 162: Hand

    HAND Defines the hand Format Definition statement: HAND[ robot number ] Hn = 1st parameter 2nd parameter 3rd parameter Selection statement: CHANGE[robot number] Hn Values robot number ......1 to 4 n: hand number .....0 to 31 R: Indicates whether a hand is attached to the R-axis. Explanation The HAND statement only defines the hand.
  • Page 163 HAND SAMPLE HAND H1= 150.000 0.0000 HAND H2= -5000 20.000 0.000 150.000 300.000 0.000 0.000 0.000 0.000 CHANGE H2 ····················· Hand of robot 1 changes to hand 2. MOVE P,P1 ····················· Tip of hand 2 of robot 1 moves to P1. CHANGE H1 ·····················...
  • Page 164 HAND 2. When the <4th parameter> "R" is specified The hands that are offset from the R-axis rotating center are selected (see below). 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.
  • Page 165: Hold

    HOLD Temporarily stops the program Format HOLD expression character string Explanation Temporarily stops the program. When restarted, processing resumes from the next line after the HOLD statement. If an or is written in the statement, the contents of the or display on the programming box screen.
  • Page 166: Holdall

    HOLDALL Temporality stops all programs Format HOLD expression character string Explanation Temporality stops all programs. When restarted, the program that has executed HOLDALL is executed from the next line after the statement, and other programs are resumed from the line that has interrupted execution. If an or ...
  • Page 167: Simple If Statement

    Evaluates a conditional expression value, and executes the command in accordance with the conditions 47.1 Simple IF statement Format IF conditional expression THEN label 1 ELSE label 2 command statement 1 command statement 2 Explanation If the condition specified by the is met (true), processing jumps either to the
  • Page 168: Block If Statement

    47.2 Block IF statement Format IF conditional expression 1 THEN command block 1 ELSEIF conditional expression 2 THEN command block 2 ELSE command block n ENDIF Explanation If the condition specified by is met (true), this statement executes the instructions specified in , then jumps to the next line after ENDIF.
  • Page 169: Input

    INPUT Assigns a value to a variable specified from the programming box Format INPUT prompt statement variable variable ,... point variable point variable shift variable shift variable Explanation Assigns a value to the variable specified from the programming box. The input definitions are as follows: 1.
  • Page 170: 48 Input

    INPUT SAMPLE INPUT A ····················· C o n v e r t s t h e e n t e r e r e d c h a r a c t e r string to a real number and assigns to variable A!.
  • Page 171: Int

    Truncates decimal fractions Format INT (expression) Explanation This function acquires an integer value with decimal fractions truncated. The maximum integer value which does not exceed the value is acquired. SAMPLE A=INT(A(0)) B=INT(-1. 233) ·················· "-2" is assigned to B. 8-79...
  • Page 172: Jtoxy

    JTOXY Performs axis unit system conversions (pulse → mm) Format JTOXY [robot number] (point expression) Values robot number ......1 to 4 (If not input, robot 1 is specified.) Explanation Converts the joint coordinate data (unit: pulse) specified by the into Cartesian coordinate data (unit: mm, degree) of the robot specified by the .
  • Page 173: Left

    LEFT$ Extracts character strings from the left end Format LEFT$ ( , ) Values expression ......0 to 255 Explanation This function extracts a character string with the digits specified by the from the left end of the character string specified by . The ...
  • Page 174: Lefty

    LEFTY Sets the SCARA robot hand system as a left-handed system Format LEFTY [robot number] Values robot number ......1 to 4 (If not input, robot 1 is specified.) Explanation Specifies the robot as a left-handed system. 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 within tolerance range).
  • Page 175: Len

    LEN(character string expression) Explanation Returns the character string length of the as a number of bytes. SAMPLE A$=“OMRON” B$=“OMRON MOTOR” C$=“OMRON CO., LTD.” PRINT LEN(A$) ··················· Indicates “6”. PRINT LEN(B$) ··················· Indicates “12”. PRINT LEN(C$) ··················· Indicates “16”. 8-83...
  • Page 176: Let

    Assigns values to variables Format arithmetic assignment statement character string assignment statement point assignment statement shift assignment statement 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.
  • Page 177 Other arithmetic operators and parentheses cannot be used. SAMPLE A$ ="OMRON" B$ ="ROBOT" D$ = A$ + "-" + B$ Execution result: OMRON-ROBOT • The "+" arithmetic operator is used to link character strings. MEMO 3. Point assignment statement Format...
  • Page 178 SAMPLE 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. P30=P30-P3 ················· Each element of point 3 is subtracted from point 30 and assigned to P30. P80=P70*4 ··················...
  • Page 179 Arm lock output or acquires the output status Format LOm (b,···,b) =expression LO (mb,···,mb) =expression REFERENCE Values m: port number ..... 0, 1 • For details regarding bit b: bit definition ...... 0 to 7 (If omitted, all 8 bits are processed.) definitions, see Chapter 3 "10 Bit Settings".
  • Page 180 Functions Format LOm (b,···,b) LO (mb,···,mb) Values m: port number ..... 0 to 7, 10 to 17, 20 to 27 b: bit definition ...... 0 to 7 (If omitted, all 8 bits are processed.) If multiple bits are specified, they are expressed from the left in descending order (high to low).
  • Page 181: Locx

    LOCx Specifies/acquires point data for a specified axis or shift data for a specified element Format 1. LOCx (point expression) =expression 2. LOCx (shift expression) =expression Values Format 1: x ......1 to 6 (axis setting) F (hand system flag setting) F1 (first arm rotation information) F2 (second arm rotation information) Format 2: x ......
  • Page 182: 56 Locx

    LOCx Functions Format 1. LOCx (point expression) 2. LOCx (shift expression) Values Format 1: x ......1 to 6 (axis setting) F (hand system flag setting) F1 (first arm rotation information) F2 (second arm rotation information) Explanation Format 1: Acquires the value of the point data specified axis, the hand system flag, and the first arm and the second arm rotation information.
  • Page 183: Lshift

    LSHIFT Left-shifts a bit Format LSHIFT (expression 1, expression 2) Explanation Shifts the bit value to the left by the amount of . Spaces left blank by the shift are filled with zeros (0). SAMPLE A=LSHIFT(&B10111011,2) ·········· The 2-bit-left-shifted &B10111011 value (&B11101100) is assigned to A.
  • Page 184: Mchref

    MCHREF Acquires the machine reference value (axes: sensor method / stroke-end method) Format MCHREF [robot number] (axis number) Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 Explanation This function returns the return-to-origin or absolute-search machine reference value (unit:%) of axes specified by an .
  • Page 185: Mid

    MID$ Acquires a character string from a specified position Format MID$ (character string expression, expression 1, expression 2) Values expression 1 ......1 to 255 expression 2 ......0 to 255 Explanation This function extracts a character string of a desired length (number of characters) from the character string specified by .
  • Page 186 Outputs a specified value to the MO port or acquires the output status Format MOm(b,···,b) =expression MO(mb,···,mb) =expression REFERENCE Values m: port number ..... 2 to 7, 10 to 17, 20 to 27, 30 to 37 • For details regarding bit b: bit definition ......
  • Page 187 Functions Format MOm (b,···,b) MO (mb,···,mb) Values m: port number ..... 2 to 7, 10 to 17, 20 to 27, 30 to 37 b: bit definition ...... 0 to 7 (If omitted, all 8 bits are processed.) If multiple bits are specified, they are expressed from the left in descending order (high to low).
  • Page 188: Motor

    MOTOR Controls the motor power status Format MOTOR Explanation This command controls the motor power on/off. The servo on/off of all robots can also be controlled at the same time. • ON ..Turns on the motor power. All robot servos are also turned on at the same time.
  • Page 189: Move

    MOVE Performs absolute movement of robot axes Format MOVE [ robot number] (( axis number ,...) , point definition ,option,option... Values robot number ......1 to 4 ( If not input, robot 1 is specified.) axis number ......1 to 6 ( •...
  • Page 190: 62 Move

    MOVE Movement type ● PTP (point-to-point) movement Execution START condition: Movement of all specified axes is complete (within the tolerance range). Execution END condition: All specified axes have entered the OUT position range. When two or more axes are specified, they will reach their target positions simultaneously. The movement path of the axes is not guaranteed.
  • Page 191 MOVE SAMPLE MOVE P,P0 ···················· Robot 1 moves from its current position to the position specified by P0. (the same occurs for MOVE PTP, P0). • PTP movement is faster than interpolation movement, but when executing continuous MEMO movement to multiple points, a positioning stop occurs at each point. CAUTION ●...
  • Page 192 MOVE ● ● Circular interpolation movement CAUTION Execution START condition: Movement of all specified axes is complete (within the tolerance range). • In YRCX, the motion of Execution END condition: Movement of all specified axes has begun. interpolation movement All movement axes arrive at the same time. c o m m a n d a n d E N D condition are different In circular interpolation, an arc is generated based on 3 points: the current position, an...
  • Page 193 MOVE Point data setting types ● Direct numeric value input PTP Linear interpolation Circular interpolation Format p1 p2 p3 p4 p5 p6 f NOTE • I f b o t h i n t e g e r s a n d Values p1 to p6 .........Space-separated coordinate values for each axis real numbers are used...
  • Page 194 MOVE SAMPLE MOVE P,10000 10000 1000 1000 ···················· PTP movement of robot 1 occurs from current position to the 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 specified position with Left-handed system.
  • Page 195 MOVE Option types ● Speed setting 1 Linear interpolation Circular interpolation Format SPEED =expression S =expression Values expression ......1 to 100 (units: %) NOTE • This option specifies only Explanation Specifies the program speed in an . t h e m a x i m u m s p e e d The actual speed will be as follows: and does not guarantee movement at the specified...
  • Page 196 MOVE ● Speed setting 3 Linear interpolation Circular interpolation Format VEL =expression Values expression ......1 to maximum speed depending on the model (units: mm/sec) NOTE • This option specifies only Explanation Specifies the maximum composite speed (in "mm/sec" units) of the XYZ axes the maximum composite in an .
  • Page 197 MOVE ● Arch motion setting Linear interpolation Circular interpolation Format x =expression {expression(, expression2} Values x ..........Specifies an axis from A1 to A6 expression ......Arch position Integer value: "pulse" units. Real number (with decimal point): "mm/deg" units. expression1, expression2 ..Arch distance 1, Arch distance 2 Integer value: "pulse"...
  • Page 198 MOVE • When multiple points are specified in PTP movement, the axis in arch motion setting also MEMO moves to the target position. PTP movement MOVE P, P10, P11, A3 = 0 A3=0 All axes move to P10. ● STOPON condition setting linear interpolation Circular interpolation CAUTION...
  • Page 199 MOVE ● CONT setting Linear interpolation Circular interpolation Format CONT CAUTION Explanation When movement is executed with CONT setting option, Movable axes will • In YRCX, the motion of begin to execute the next command without waiting the completion their interpolation movement movement (entering the tolerance range).
  • Page 200 SAMPLE MOVE P,P10,P11,CONT ···················· Robot 1 Moves from the current position to the position specified by P10, and then moves to P11 without waiting for the moving axes to arrive in the tolerance range. SAMPLE:MOVE P CONT *1: “CONT pulse range” if the value is specified in the OUT position range (*1) CONT pulse parameter.
  • Page 201 MOVE ● Acceleration setting Linear interpolation Circular interpolation Format ACC =expression Values expression ......1 to 100 (units: %) Explanation Specifies the robot acceleration rate in the . The actual robot acceleration is determined by the acceleration coefficient parameter setting. This option can only be used for PTP movement and linear interpolation movement and is enabled only for the specified MOVE statement.
  • Page 202 MOVE ● Coordinate plane setting Linear interpolation Circular interpolation Format Values XY ..........XY coordinate plane YZ ..........YZ coordinate plane ZX ..........ZX coordinate plane Explanation When circular interpolation is executed by setting coordinates, this option NOTE executes circular interpolation so that the projection on the specified coordinate •...
  • Page 203 MOVE ● Port output setting Linear interpolation Circular interpolation Format 1 m(b,···,b)=expression 1 @ expression 2 Format 2 (mb,···,mb)=expression 1 @ expression 2 Values m: port number ..... 2 to 7, 10 to 17, 20 to 27 b: bit definition ...... 0 to 7 (If omitted, all 8 bits are processed.) If multiple bits are specified, they are expressed from the left in descending order (high to low).
  • Page 204: 63 Movei

    MOVEI Performs relative movement of robot axes Format MOVEI [ robot number ] ( axis number, ... ) PTP , point definition , option, option … Values robot number ......1 to 4 ( If not input, robot 1 is specified.) axis number ......
  • Page 205 MOVEI Movement type ● PTP (point-to-point) movement Execution START condition: Movement of all specified axes is complete (within the tolerance range). Execution END condition: All specified axes have entered the OUT position range. When two or more axes are specified, they will reach their target positions simultaneously. The movement path of the axes is not guaranteed.
  • Page 206: Movei

    MOVEI SAMPLE MOVEI P,P0 ···················· From its current position, the axis of robot 1 moves (PTP movement) the amount specified by P0. • PTP movement is faster than interpolation movement, but when executing continuous MEMO movement to multiple points, a positioning stop occurs at each point. CAUTION ●...
  • Page 207 MOVEI Point data setting types ● Direct numeric value input Linear interpolation Format p1 p2 p3 p4 p5 p6 f Values p1 to p6 .........Space-separated coordinate values for each axis NOTE f ..........Hand system flag • I f b o t h i n t e g e r s a n d real numbers are used Explanation Directly specifies coordinate values by a numeric value.
  • Page 208 MOVEI ● ●● ● Point definition Linear interpolation CAUTION Format • When moving the robot by linear interpolation to point expression , point expression... a point where a hand system flag is specified, be sure that the same Explanation Specifies a . Two or more data items can be designated by hand system is used at b o t h t h e c u r r e n t a n d separating them with a comma ( , ).
  • Page 209 MOVEI Option types ● Speed setting 1 ● Linear interpolation Format SPEED =expression S =expression Values expression ......1 to 100 (units: %) NOTE • This option specifies only Explanation Specifies the program speed in an . t h e m a x i m u m s p e e d The actual speed will be as follows: and does not guarantee movement at the specified...
  • Page 210 MOVEI ● Speed setting 3 Linear interpolation Format VEL =expression Values expression ......1 to maximum speed depending on the model (units: mm/sec) Explanation Specifies the maximum composite speed (in "mm/sec" units) of the XYZ axes in NOTE an . This option is specifiable when the movement type is linear •...
  • Page 211 MOVEI ● CONT setting Linear interpolation Format CONT CAUTION Explanation When movement is executed with CONT setting option, Movable axes will begin • In YRCX, the motion of to execute the next command without waiting the completion their movement interpolation movement (entering the tolerance range).
  • Page 212 MOVEI SAMPLE MOVEI P,P10,P11,CONT ········ From its current position, the axis of robot 1 moves (PTP movement) the amount specified by P10, and then moves the amount specified by P11 without waiting for the moving axes to arrive in the tolerance range. *1: “CONT pulse range”...
  • Page 213 MOVEI ● Acceleration setting Linear interpolation Format ACC =expression Values expression ......1 to 100 (units: %) Explanation Specifies the robot acceleration rate in an . The actual robot acceleration is determined by the acceleration coefficient parameter setting. This option is enabled only for the specified MOVEI statement. SAMPLE MOVEI L,P100,ACC=10 ···········...
  • Page 214: Performs Relative Movement Of All Robot Axes In Tool Coordinates

    MOVET Performs relative movement of all robot axes in tool coordinates Format MOVET [robot number](axis number,...) PTP , point definition , option, option... Values robot number ......1 to 4 ( If not input, robot 1 is specified.) axis number ......1 to 6 ( •...
  • Page 215 MOVET Movement type ● PTP (point-to-point) movement Execution START condition: Movement of all specified axes is complete (within the tolerance range). Execution END condition: All specified axes have entered the OUT position range. When two or more axes are specified, they will reach their target positions simultaneously. The movement path of the axes is not guaranteed.
  • Page 216 MOVET SAMPLE MOVET P,P0 ···················· From its current position, the axis of robot 1 moves (PTP movement) the amount specified by P0 in the tool coordinates. • PTP movement is faster than interpolation movement, but when executing continuous MEMO movement to multiple points, a positioning stop occurs at each point. ●...
  • Page 217 MOVET Point data setting types ● Direct numeric value input Linear interpolation Format p1 p2 p3 p4 p5 p6 f Values p1 to p6 .........Space-separated coordinate values for each axis NOTE f ..........Hand system flag • I f b o t h i n t e g e r s a n d real numbers are used Explanation Directly specifies coordinate values by a numeric value.
  • Page 218 MOVET ● Point definition Linear interpolation CAUTION Format • When moving the robot by linear interpolation to point expression , point expression... a point where a hand system flag is specified, be sure that the same Explanation Specifies a . Two or more data items can be designated by hand system is used at b o t h t h e c u r r e n t a n d separating them with a comma ( , ).
  • Page 219 MOVET Option types ● Speed setting 1 Linear interpolation Format SPEED =expression S =expression Values expression ......1 to 100 (units: %) NOTE • This option specifies only Explanation Specifies the program speed in an . t h e m a x i m u m s p e e d The actual speed will be as follows: and does not guarantee movement at the specified...
  • Page 220 MOVET ● Speed setting 3 Linear interpolation Format VEL =expression Values expression ......1 to maximum speed depending on the model NOTE (units: mm/sec) • This option specifies only the maximum composite Explanation Specifies the maximum composite speed (in "mm/sec" units) of the XYZ axes in s p e e d a n d d o e s n o t guarantee movement at an .
  • Page 221 MOVET ● CONT setting Linear interpolation Format CONT NOTE Explanation When movement is executed with CONT setting option, Movable axes will • The CONT setting can begin to execute the next command without waiting the completion their b e u s e d t o r e d u c e movement (entering the tolerance range).
  • Page 222 MOVET SAMPLE MOVET P,P10,P11,CONT ····· From its current position, the axis of robot 1 moves (PTP movement) the amount specified by P10 in the tool coordinates, and then moves the amount specified by P11 in the tool coordinates without waiting for the moving axes to arrive in the tolerance range.
  • Page 223 MOVET ● Acceleration setting Linear interpolation Format ACC =expression Values expression ......1 to 100 (units: %) Explanation Specifies the robot acceleration rate in an . The actual robot acceleration is determined by the acceleration coefficient parameter setting. This option is enabled only for the specified MOVET statement. SAMPLE MOVET L,P100,ACC=10 ···········...
  • Page 224: Acquires The Motor Load Factor Of The Specified Axis

    MTRDUTY Acquires the motor load factor of the specified axis Format MTRDUTY [robot number] (axis number) Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 Explanation Acquires the motor load factor (1 to 100) of the axis specified by the . SAMPLE A=MTRDUTY(1) ···················...
  • Page 225: Sets A Specified Communication Port To The "Offline" Mode

    OFFLINE Sets a specified communication port to the "offline" mode Format OFFLINE Explanation Changes the communication mode parameter in order to switch the communication mode to OFFLINE. ETH ......Changes the Ethernet communication mode parameter to OFFLINE and clears the transmission and reception buffers. CMU ......
  • Page 226: Jumps To A Specified Label When An Error Occurs

    ON ERROR GOTO Jumps to a specified label when an error occurs Format 1. ON ERROR GOTO label 2. ON ERROR GOTO 0 Values Error output information ..ERR: Error code number ERL: Line number where error occurred Explanation Even if an error occurs during execution of the robot language, this statement allows the program to jump to the error processing routine specified by the
  • Page 227: Executes The Subroutine Specified By The Value

    ON to GOSUB Executes the subroutine specified by the value Format ON expression GOSUB label 1, label 2... * GOSUB can also be expressed as "GO SUB". Values expression ......Expression whose result is 0 or positive integer Explanation The value determines the program's jump destination. An ...
  • Page 228: Jumps To The Label Specified By The Value

    ON to GOTO Jumps to the label specified by the value Format ON expression GOTO label 1, label 2... * GOTO can also be expressed as "GO TO". Values expression ......Expression whose result is 0 or positive integer Explanation The ...
  • Page 229: Sets The Specified Communication Port To The "Online" Mode

    ONLINE Sets the specified communication port to the "online" mode Format ONLINE Explanation Changes the communication mode parameter in order to switch the communication mode to ONLINE. ETH ......Changes the Ethernet communication mode parameter to ONLINE and clears the transmission and reception buffers. CMU ......
  • Page 230: Opens The Specified General Ethernet Port

    OPEN Opens the specified General Ethernet Port Format OPEN GPm Values m: General Ethernet Port number ....0 to 7 Explanation Opens the communication port of the specified General Ethernet Port. SAMPLE OPEN GP1 ····················· Opens the General Ethernet Port 1. SEND "123"...
  • Page 231: Acquires A Character Code

    Acquires a character code Format ORD (character string expression) Explanation Acquires the character code of the first character in a . SAMPLE A=ORD("B") ····················· 66 (=&H42) is assigned to A. Related commands CHR$ 8-139...
  • Page 232: Specifies/Acquires The Robot's Return-To-Origin Sequence

    ORGORD Specifies/acquires the robot's return-to-origin sequence Format ORGORD [robot number] expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) expression ......n to nnnnnn (n : 0 to 6) Explanation Sets the axis sequence parameter for return-to-origin and absolute search operation of the robot specified by the .
  • Page 233: Performs Return-To-Origin

    ORIGIN Performs return-to-origin Format ORIGIN [robot number], motor type Values robot number ......0: all robots 1 to 4: specified robot only motor type ......0: all types 1: incremental motor only 2: absolute motor only 9: incomplete return-to-origin axis only (If omitted, 0 (all types) is specified.) Explanation This statement performs return-to-origin of a robot...
  • Page 234: Turns On The Specified Port Output

    Turns ON the specified port output Format OUT DOm(b,···,b) ,expression DO(mb,···,mb) MOm(b,···,b) MO(mb,···,mb) SOm(b,···,b) SO(mb,···,mb) LO0(b,···,b) LO(0b,···,0b) TO0(b,···,b) TO(0b,···,0b) Values m: port number ..... 2 to 7, 10 to 17, 20 to 27 b: bit definition ...... 0 to 7 (If omitted, all 8 bits are processed.) If multiple bits are specified, they are expressed from the left in descending order (high to low).
  • Page 235: Specifies/Acquires The Out Enable Position Parameter Of The Robot

    OUTPOS Specifies/acquires the OUT enable position parameter of the robot Format 1. OUTPOS [robot number] expression 2. OUTPOS [robot number] (axis number) =expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 expression ......1 to 9999999 (Unit: pulses) Explanation Changes the "OUT position"...
  • Page 236 OUTPOS SAMPLE ’CYCLE WITH DECREASING OUTPOS DIM SAV(3) GOSUB *SAVE_OUTPOS FOR A=1000 TO 10000 STEP 1000 GOSUB *CHANGE_OUTPOS MOVE P,P0 DO3(0)=1 MOVE P,P1 DO3(0)=0 NEXT A GOSUB *RESTORE_OUTPOS HALT *CHANGE_OUTPOS: FOR B=1 TO 4 OUTPOS(B)=A NEXT B RETURN *SAVE_OUTPOS: FOR B=1 TO 4 SAV(B-1)=OUTPOS(B) NEXT B RETURN...
  • Page 237: Specifies The Motion Path

    PATH Specifies the motion path Format PATH [robot number](axis number,...) ● L , point definition , option, option... Values robot number ......1 to 4 ( If not input, robot 1 is specified.) axis number ......1 to 6 ( •...
  • Page 238 PATH Point data setting types ● Direct numeric value input Linear interpolation Circular interpolation Format p1 p2 p3 p4 p5 p 6 f Values p1 to p6 .........Space-separated coordinate values for each axis f ..........Hand system flag Explanation Directly specifies coordinate data by a numeric value. If an integer is used, this is interpreted as "pulse"...
  • Page 239 PATH SAMPLE PATH L,10000 10000 1000 1000 0 0 ···················· Sets the linear interpolation movement path of robot 1 in "pulse" units. PATH 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 coordinate values specified by the right-handed system in "mm"...
  • Page 240 PATH Option types ● Speed setting Linear interpolation Circular interpolation Format SPEED =expression S =expression Values expression ......1 to 100 (units: %) NOTE • This defines the maximum Explanation The program's movement speed is specified as the value (units: %). s p e e d , a n d d o e s n o t The actual speed is determined as shown below.
  • Page 241 PATH ● Coordinate plane setting Linear interpolation Circular interpolation Format Values XY ..........XY coordinate plane YZ ..........YZ coordinate plane ZX ..........ZX coordinate plane Explanation Specifies the coordinate plane on which to draw a circular arc for circular interpolation movement. If no coordinate plane is specified, 3-dimensional circular interpolation movement is used.
  • Page 242 PATH ● Port output setting Linear interpolation Circular interpolation Format 1 m(b,···,b)=expression 1 @ expression 2 Format 2 (mb,···,mb)=expression 1 @ expression 2 CAUTION Values m: port number ..... 2 to 7, 10 to 17, 20 to 27 • Output to ports "0" and "1" b: bit definition ......
  • Page 243: Ends The Path Setting

    PATH END Ends the path setting Format PATH [robot number] Values robot number ......1 to 4 (If not input, robot 1 is specified.) 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 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.
  • Page 244: Starts The Path Setting

    PATH SET Starts the path setting Format NOTE PATH [point definition] SET point definition • The PATH SET statement is available in software version 1.11 onwards. Values robot number ......1 to 4 (If not input, robot 1 is specified.) Explanation Starts the path setting of specified robot's PATH motion.
  • Page 245 PATH SET ● Direct numeric value input Format p1 p2 p3 p4 p5 p 6 f NOTE Values p1 to p6 .........Space-separated coordinate values for each axis. f ..........Hand system flag. • I f b o t h i n t e g e r s a n d real numbers are used t o g e t h e r ( m i x e d ) , a l l Explanation...
  • Page 246 PATH SET CAUTION ● Point definition • The hand system used Format during PATH motion must be the same as the hand point expression system used at the path motion route's start point. Differing hand systems Explanation The PATH motion's start-point is specified by the . will cause an error and disable motion.
  • Page 247: Starts The Path Motion

    PATH START Starts the PATH motion Format PATH [robot number] START, option, option... Values robot number ......1 to 4 (If not input, robot 1 is specified.) Explanation Starts PATH motion of specified robot. Before PATH START can be executed, the PATH motion path must be specified by the PATH SET command, PATH commands (PATH L, PATH C) and the PATH END command.
  • Page 248 PATH START Option types ● STOPON condition setting CAUTION Format • Addition of the STOPON condition setting disables STOPON conditional expression the CONT setting. 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 conditions are met.
  • Page 249 PATH START ● CONT setting Format CONT NOTE Explanation When PATH movement is executed with CONT setting option, after all movable • The CONT setting can axes begin to execute the final movement specified by PATH statement, movable b e u s e d t o r e d u c e axes will begin to execute the next command without waiting the completion their t h e m o v e m e n t S TA R T po si t i o n i n g ti m e.
  • Page 250 PATH START SAMPLE PATH START,CONT MOVE P,P10 ···················· PATH motion starts, and movement to P10 begins after the moving axes enter the deceleration zone of final PATH motion. SAMPLE:PATH START, CONT With CONT setting: PATH motion Deceleration zones target position Next movement begins after entering the deceleration zones Without CONT setting:...
  • Page 251: Defines The Pallet

    PDEF Defines the pallet Format PDEF(Pallet definition number) =expression 1, expression 2 , expression 3, point definition Values Pallet definition number ..0 to 39 expression 1 ....... Number of elements (NX) between P[1] and P[2]. expression 2 ....... Number of elements (NY) between P[1] and P[3]. expression 3 .......
  • Page 252: Acquires The Task Number In Which A Specified Program Is Registered

    PGMTSK Acquires the task number in which a specified program is registered Format PGMTSK (program number) Values program number ....1 to 100 Explanation Acquires the task number in which the program specified by is registered. • If the program number which is not registered in the task is specified, "3.203: Program doesn't exist" MEMO error occurs SAMPLE...
  • Page 253: Pgn

    Acquires the program number from a specified program name Format PGN ("program name") Values program name ......32 characters or less consisting of alphanumeric characters and underscore ( _ ) Explanation Acquires the program number of the program specified by . The program name must be enclosed in double quotation marks ( "...
  • Page 254: Pmove

    PMOVE Executes a pallet movement command for the robot Format PMOVE [robot number] (pallet definition number, pallet position number),option, option... Values robot number ......1 to 4 (If not input, robot 1 is specified.) pallet definition number ..0 to 39 pallet position number ...1 to 32767 Explanation Executes "pallet move"...
  • Page 255 PMOVE Movement type ● PTP (point-to-point) movement PTP movement begins after positioning of all movement axes is complete (within the tolerance range), and the command terminates when the movement axes enter the OUT position range. Although the movement axes reach their target positions simultaneously, their paths are not guaranteed.
  • Page 256 PMOVE Option types ● Speed setting Format SPEED =expression S =expression Values expression ......1 to 100 (units: %) NOTE • This option specifies only Explanation Specifies the program speed in an . The movement speed is the t h e m a x i m u m s p e e d automatic movement speed multiplied by the program movement speed.
  • Page 257 PMOVE SAMPLE: PMOVE Z 2. Other axes movement Arch distance 1 Arch distance 2 1. Z-axis movement 3. Z-axis movement Current position Target position 33704-R9-00 ● STOPON condition setting Format STOPON conditional expression Explanation Stops movement when the conditions specified by the conditional expression are met.
  • Page 258 Defines points within a program Format LET Pn = p1 p2 p3 p4 p5 p6 f Values n ..........Point number: 0 to 29999. p1 to p6 .........Point data: the range varies according to the format. f ..........Hand system flag: 1 or 2. Explanation Defines the point data.
  • Page 259 SAMPLE NOTE P1 = • A l l i n p u t v a l u e s a r e P2 = 100.000 200.000 50.000 0.000 0.000 0.000 handled as constants. P3 = 10.000 0.000 0.000 0.000 0.000 0.000 •...
  • Page 260 PPNT Creates pallet point data Format PPNT(pallet definition number,pallet position number) Explanation Creates the point data specified by the pallet definition number and the pallet position number. SAMPLE P10=PPNT(1,24) ·················· C r e a t e s , a t P 1 0 , t h e p o i n t d a t a specified by pallet position number 24 of pallet definition number 1.
  • Page 261 PRINT Displays the specified expression value at the programming box Format PRINT expression expression... Values expression ......character string, numeric value, variable Explanation Displays a specified variable on the programming box screen. Output definitions are as follows: 1. If numbers or character strings are specified in an , they display as they are.
  • Page 262 PSHFRC Specifies/acquires the pushing force parameter Format 1. PSHFRC [robot number] expression 2. PSHFRC [robot number] (axis number) =expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 expression ......-1000 to 1000 (unit: %) Explanation Changes the "push force"...
  • Page 263 PSHJGSP Specifies/acquires the push judge speed parameter Format 1. PSHJGSP [robot number] expression 2. PSHJGSP [robot number] (axis number) =expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 expression ......0: Invalid, 1 to 100 (units: %) Explanation Changes the "push judge speed"...
  • Page 264 PSHMTD Specifies/acquires a pushing type parameter Format 1. PSHMTD [robot number] expression 2. PSHMTD [robot number] (axis number) =expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 expression ......0: Totalizing method, 1: Resetting method Explanation Changes the "push method"...
  • Page 265 PSHRSLT Acquires the status when PUSH statement ends Format PSHRSLT [robot number] (axis number) Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 Explanation Acquires the end status of PUSH statement executed for the axis specified by .
  • Page 266 PSHSPD Specifies/acquires the push speed parameter Format 1. PSHSPD [robot number] expression 2. PSHSPD [robot number] (axis number) =expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 expression ......1 to 100 (units: %) Explanation Changes the "push speed"...
  • Page 267 PSHTIME Specifies/acquires the push time parameter Format 1. PSHTIME [robot number] expression 2. PSHTIME [robot number] (axis number) =expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 expression ......1 to 32767 (unit: ms) Explanation Changes the "push time"...
  • Page 268 PUSH Executes a pushing operation for specified axes Format PUSH [robot number](axis number, expression), option, option Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 expression ......Motor position (mm, degree, pulse) or point expression Explanation Executes an absolute position movement of the specified axis with controlling the pushing thrust in the forwarding direction.
  • Page 269 PUSH If the next command following to the PUSH statement is an executable command such as a signal output command, the next command will start when the pushing conditions of an axis to be moved are satisfied, or when an axis arrives within the tolerance range of the target position. Example: Signal is output when the pushing conditions are satisfied or within the Signal output (DO, etc.)
  • Page 270 PUSH Option types ● Pushing thrust setting Format F =expression Values expression ......-1000 to 1000 (units: %) Explanation The pushing thrust in the forwarding direction of an axis is specified as an . The actual pushing thrust is determined as shown below. •...
  • Page 271 PUSH ● Speed setting Format 1. SPEED =expression 2. S =expression Values expression ......1 to 100 (units: %) Explanation The program movement speed is specified in . The actual speed is determined as shown below. • Max. speed of a robot (mm/s or deg./s) x Pushing movement speed (%) x automatic.
  • Page 272 PUSH ● STOPON conditions setting Format STOPON conditional expression 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 conditions are met. If the conditions are already met before movement begins, no movement occurs, and the command is terminated.
  • Page 273 RADDEG Performs a unit conversion (radians → degrees) Format RADDEG(expression) Values expression ......Angle (units: radians) Explanation Converts the value to degrees. SAMPLE LOC4(P0)=RADDEG(ATN(B)) ········· Converts the variable B arctangent value to degrees, and assigns it to 4th-axis data of P0. Related commands ATN, COS, DEGRAD, SIN, TAN RADDEG...
  • Page 274 Inserts a comment Format 1. REM character string 2. ' character string Explanation All characters which follow REM or an apostrophe (') are handled as a comment. This comment statement is used only to insert comments in the program, and it does not execute any command.
  • Page 275 RESET Turns OFF the bits of specified ports, or clears variables Format 1 RESET DOm(b,···,b) DO(mb,···,mb) MOm(b,···,b) MO(mb,···,mb) TOn(b,···,b) TO(n-b,···,nb) LOn(b,···,b) LO(nb,···,nb) SOm(b,···,b) SO(mb,···,mb) Format 2 RESET TCOUNTER Values m: port number ..... 2 to 7, 10 to 17, 20 to 27 n: port number ......
  • Page 276 RESTART Restarts another task during a temporary stop Format RESTART Values n: Task number ......1 to 16 ● ● m: Program number ....1 to 100 Explanation Restarts another task that has been temporarily stopped (SUSPEND status). A task can be specified by the name or the number of a program in execution. The program name must be enclosed in <...
  • Page 277 RESUME Resumes program execution after error recovery processing Format 1. RESUME 2. RESUME NEXT 3. RESUME label Explanation Resumes program execution after recovery from an error. REFERENCE Depending on its location, a program can be resumed in the following 3 ways: •...
  • Page 278 RETURN Processing which was branched by GOSUB, is returned to the next line after GOSUB Format GOSUB label * GOSUB can also be expressed as "GO SUB". label: RETURN Explanation Ends the subroutine and returns to the next line after the jump source GOSUB statement.
  • Page 279 RIGHT$ Extracts a character string from the right end of another character string Format RIGHT$(character string expression, expression) Values expression ......0 to 255 Explanation This function extracts a character string with the digits specified by the from the right end of the character string specified by . The ...
  • Page 280 RIGHTY Sets the SCARA robot hand system as a right-handed system Format RIGHTY [robot number] Values robot number ......1 to 4 (If not input, robot 1 is specified.) Explanation Specifies the robot as a roght-handed system. The robot moves to a point specified in the Cartesian coordinates.
  • Page 281 RSHIFT Shifts a bit value to the right Format RSHIFT(expression 1, expression 2) Explanation Shifts the bit value to the right by the amount of . Spaces left blank by the shift are filled with zeros (0). SAMPLE A=RSHIFT(&B10111011,2) ··········...
  • Page 282 SELECT CASE to END SELECT Executes the specified command block in accordance with the value Format SELECT CASE expression CASE expression list 1 command block 1 CASE expression list 2 command block 2 CASE ELSE command block n END SELECT Explanation These statements execute multiple command blocks in accordance with the ...
  • Page 283 SEND Sends readout file data to the write file Format SEND read-out file TO write file Explanation Sends data to the . NOTE An entire DO, MO, TO, LO, SO, or SOW port (DO(), MO(), etc.), cannot be specified •...
  • Page 284 Definition Format Read- Type File Name Write Individual File DI() DIn() Device DI port DO() DOn() DO port MO port MO() MOn() TO port TO() TOn() LO port LO() LOn() SI port SI() SIn() SO port SO() SOn() SIW port SIW() SIWn() SOW port...
  • Page 285 SERVO Controls the servo status Format SERVO [robot number] (axis number) FREE CAUTION Values robot number ......1 to 4 ( If not input, robot 1 is specified.) • Always check that the axis number ......1 to 6 ( •...
  • Page 286 Turns the bit at the specified output port ON Format DOm(b,···,b) , time DO (mb,···,mb) MOm(b,···,b) MO (mb,···,mb) TOn(b,···,b) TO (nb,···,nb) LOn(b,···,b) LO (nb,···,nb) SOm(b,···,b) SO (mb,···,mb) Values m: port number ..... 2 to 7, 10 to 17, 20 to 27 n: port number ......
  • Page 287 SETGEP Sets the General Ethernet Port Format SETGEP m, n, "IP adress", ppppp, e, t Values m: General Ethernet Port number ..0 to 7 n: mode ..........0: server, 1: client IP adress ..........0.0.0.0 to 255.255.255.255 ppppp: port number ......0 to 65535 e: Termination code ●...
  • Page 288 Assigns /acquires the value to a specified integer type static variable Format SGIn=xxxxxx Values n: integer type static variable number ..0 to 31 xxxxxx ........... integer of -2147483648 to 2147483647 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.
  • Page 289 Assigns /acquires the value to a specified real type static variable Format SGRn=xxxxxx Values n: real type static variable number ..0 to 31 xxxxxx ..........1. Single-precision real numbers -999999.9 to +999999.9 • 7 digits including integers and decimals. (For example, ".0000001"...
  • Page 290 SHARED Enables sub-procedure referencing without passing on the variable Format SHARED variable(), variable()... Explanation This statement allows variables declared with a program level code to be referenced NOTE with a sub-procedure without passing on the variables as dummy arguments. • The program level code is The program level variable used by the sub-procedure is specified by the ...
  • Page 291 SHIFT Sets the shift coordinates Format SHIFT [robot number] shift variable Values robot number ......1 to 4 (If not input, robot 1 is specified.) Explanation Sets the shift coordinates specified by to the robot specified by . When OFF is specified, the coordinates shift by ...
  • Page 292 Acquires specified SI status Format LET expression = SIm(b,···,b) LET expression = SI(mb,···,mb) Values m: port number ..... 0 to 7, 10 to 17, 20 to 27 b: bit definition ...... 0 to 7 (If omitted, all 8 bits are processed.) If multiple bits are specified, they are expressed from the left in descending order (high to low).
  • Page 293 Acquires a specified serial input's double-word information Format LET SID(m) Values m: port number ......2, 4, 6, 8, 10, 12, 14 Explanation Acquires the value at the SID port specified by "m". The acquisition range is -2,147,483,648 (&H80000000) to 2,147,483,647 (&H7FFFFFFF). •...
  • Page 294 Acquires the sine value for a specified value Format SIN(expression) Values expression ......Angle (units: radians) Explanation This function gives the sine value for the value. SAMPLE 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).
  • Page 295 Acquires a specified serial input's word information Format LET SIW(m) Values m: port number ......2 to 15 Explanation Acquires the value at the SIW port specified by "m". The acquisition range is 0 (&H0000) to 65535 (&HFFFF). • The information is handled as unsigned word data MEMO MEMO •...
  • Page 296 Defines the shift coordinates in the program Format Sn = x y z r Values n ..........0 to 39 x, y, z, r ........-99,999.99 to 99,999.99 NOTE Explanation Defines shift coordinate values in order to shift the coordinates for robot movement. •...
  • Page 297 Outputs a specified value to serial port or acquires the output status Format 1. LET SOm(b,···,b) =expression 2. LET SO (mb,···,mb) =expression Values m: port number ..... 2 to 7, 10 to 17, 20 to 27 b: bit definition ...... 0 to 7 (If omitted, all 8 bits are processed.) If multiple bits are specified, they are expressed from the left in descending order (high to low).
  • Page 298 Functions Format LET SOm (b,···,b) LET SO (mb,···,mb) Values m: port number ..... 0 to 7, 10 to 17, 20 to 27 b: bit definition ...... 0 to 7 (If omitted, all 8 bits are processed.) If multiple bits are specified, they are expressed from the left in descending order (high to low).
  • Page 299 Outputs a specified serial output's double-word information or acquires the output status Format LET SOD(m)=expression Values m: port number ......2, 4, 6, 8, 10, 12, 14 Explanation Outputs the value to the SOD port specified by "m". The output range is -2,147,483,648 (&H80000000) to 2,147,483,647 (&H7FFFFFFF). •...
  • Page 300 Outputs a specified serial output's word information or acquires the output status Format LET SOW(m)=expression Values m: port number ......2 to 15 Explanation Outputs the value to the SOW port specified by "m". The output range is 0 (&H0000) to 65535 (&HFFFF). Note that if a negative value is output, the low-order word information will be output after being converted to hexadecimal.
  • Page 301 SPEED Changes the program movement speed Format SPEED [robot number] expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) expression ......1 to 100 (units: %) Explanation Changes the program movement speed to the value indicated by . NOTE This speed change applies to all robot axes and auxiliary axes of the specified robot.
  • Page 302 Acquires the square root of a specified value Format SQR(expression) Values expression ......0 or positive number. Explanation Gives the square root of the value. An error occurs if the value is a negative number. SAMPLE A=SQR(X^2+Y^2) ·················· The square root of X^2+Y^2 is assigned to variable A.
  • Page 303 START Starts a new task Format START ,Tn, p Values m: Program number ....1 to 100 n: Task number ......1 to 16 p: Task priority ranking ..1 to 64 Explanation Starts task “n” specified by the program with the “p” priority ranking. If task number “n”...
  • Page 304 STR$ Converts a numeric value to a character string Format STR$(expression) Explanation Converts the value specified by the to a character string. The specifies an integer or real value. SAMPLE B$=STR$(10.01) Related commands 8-212 Chapter 8 Robot Language Lists...
  • Page 305 SUB to END SUB Defines a sub-procedure Format SUB label (dummy argument, dummy argument...) command block END SUB Explanation Defines a sub-procedure. The sub-procedure can be executed by a CALL statement. When the END SUB statement is executed, the program jumps to the next command after the CALL statement that was called.
  • Page 306 SUB to END SUB SAMPLE 2 X% = 4 Y% = 5 CALL *COMPARE( REF X%, REF Y% ) PRINT X%,Y% Z% = 7 W% = 2 CALL *COMPARE( REF Z%, REF W% ) PRINT Z%,W% HALT ’SUB ROUTINE: COMPARE SUB *COMPARE( A%, B% ) IF A% <...
  • Page 307 SUSPEND Temporarily stops another task which is being executed Format SUSPEND Values n: Task number ......1 to 16 m: Program number ....1 to 100 Explanation Temporarily stops (suspends) another task which is being executed. A task can be specified by the name or the number of a program in execution.
  • Page 308 Switches the program being executed Format SWI Explanation This statement switches from the current program to the specified program, starting from the first line. Although the output variable status is not changed when the program is switched, the dynamic variables and array variables are cleared.
  • Page 309 Acquires the tangent value for a specified value Format TAN(expression) Values expression ......Angle (units: radians) Explanation Gives a tangent value for the value. An error will occur if the value is a negative number. SAMPLE A(0)=B-TAN(C) ··················· The difference between the tangent values of variable B and variable C is assigned to array A (0).
  • Page 310 TCOUNTER Timer & counter Format TCOUNTER 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. SAMPLE MOVE P,P0 WAIT ARM RESET TCOUNTER MOVE P,P1 WAIT ARM A = TCOUNTER...
  • Page 311 TIME$ Acquires the current time Format TIME$ 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. The clock can be set in the SYSTEM mode's initial processing. SAMPLE A$=TIME$ PRINT TIME$...
  • Page 312 TIMER Acquires the current time Format CAUTION TIMER • The time indicated by the internal clock may differ somewhat from the Functions Acquires the current time in seconds, counting from midnight. This function is used to actual time. measure a program's run time, etc. The clock can be set in the SYSTEM mode's initial processing.
  • Page 313 Outputs a specified value to the TO port or acquires the output status Format 1. LET TOm(b,···,b) =expression 2. LET TO (mb,···,mb) =expression Values m: port number ..... 0, 1 b: bit definition ...... 0 to 7 (If omitted, all 8 bits are processed.) If multiple bits are specified, they are expressed from the left in descending order (high to low).
  • Page 314 TOLE Specifies/acquires the tolerance parameter Format 1. TOLE [robot number] expression 2. TOLE [robot number] (axis number) =expression Values robot number ....1 to 4 (If not input, robot 1 is specified.) axis number ....1 to 6 expression ....Varies according to the motor which has been specified (unit: pulse) Explanation Change the "tolerance"...
  • Page 315 TORQUE Specifies/acquires the maximum torque command value Format TORQUE [robot number] (axis number) =expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) axis number ......1 to 6 expression ......1 to 100 (units: %) CAUTION Explanation Changes the maximum torque command value of the specified axis to the •...
  • Page 316 TORQUE SAMPLE TORQUE (1) = 50 ················· Changes the max. torque of axis 1 of robot 1 to 50%. DRIVE (1,P1) ···················· Moves the axis 1 of robot 1 from its current position to the point specified by P1. (Changes the max. torque at the same time with the start of the movement.) WAIT ARM ·····················...
  • Page 317 TSKPGM Acquires the program number which is registered in a specified task number Format TSKPGM(task number) Values task number ......Task number which acquires the program number Explanation Acquires the program number which is registered in the task specified by the task number.
  • Page 318 Converts character strings to numeric values Format VAL (character string expression) Explanation Converts the numeric value of the character string specified in the into an actual numeric value. The value may be expressed in integer format (binary, decimal, hexadecimal), or real number format (decimal point format, exponential format).
  • Page 319 WAIT Waits until the conditional expression is met Format WAIT conditional expression , expression Values expression ......0 to 2147483647 (units: ms) Explanation Establishes "wait" status until the condition specified by the is met. Specify the time-out period (unit: ms) in the . This command terminates if the time-out period elapses before the WAIT condition is met.
  • Page 320 WAIT ARM Waits until the robot axis operation is completed Format WAIT ARM [robot number] (axis number) Values robot number ......1 to 4 ( If not input, robot 1 is specified.) axis number ......1 to 6 ( • Multiple axes not specifiable •...
  • Page 321 WEIGHT Specifies/acquires the tip weight parameter Format WEIGHT [robot number] expression Values robot number ......1 to 4 (If not input, robot 1 is specified.) expression ......The range varies according to the robot which has been specified. Explanation Changes the "tip weight" parameter of the robot to the value. This change does not apply to auxiliary axes.
  • Page 322 WEND Ends the WHILE statement's command block Format WHILE conditional expression command block WEND Explanation Ends the command block which begins with the WHILE statement. A WEND statement must always be paired with a WHILE statement. Jumping out of the WHILE to WEND loop is possible by using the GOTO statement, etc.
  • Page 323 WHERE Acquires the arm's current position (pulse coordinates) Format WHERE [robot number] Values robot number ......1 to 4 (If not input, robot 1 is specified.) Explanation Acquires the arm’s current position in the joint coordinates. SAMPLE P10=WHERE ····················· The current position's pulse coordinate value of robot 1 is assigned to P10.
  • Page 324 WHILE to WEND Repeats an operation for as long as a condition is met Format WHILE conditional expression command block WEND Explanation Executes the command block between the WHILE and WEND statements when the condition specified by the is met, and then returns to the WHILE statement to repeat the same operation.
  • Page 325 WHRXY Acquires the arm's current position in Cartesian coordinates Format WHRXY [robot number] Values robot number ......1 to 4 (If not input, robot 1 is specified.) Explanation Acquires the arm’s current position in the Cartesian coordinates. SAMPLE P10=WHRXY ····················· T h e c u r r e n t p o s i t i o n C a r t e s i a n...
  • Page 326 XYTOJ Converts the Cartesian coordinate data ("mm") to joint coordinate data ("pulse") Format XYTOJ [robot number] (point expression) Values robot number ......1 to 4 (If not input, robot 1 is specified.) Explanation This function converts the Cartesian coordinate data (unit: mm, deg.) specified by the ...
  • Page 327 Chapter 9 PATH Statements Overview ........... 9-1 Features ............. 9-1 How to use ..........9-1 Cautions when using this function ..9-2...
  • Page 329 Overview 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. Features Moves the robot at a constant speed along the entire movement path (except during acceleration ■...
  • Page 330 Cautions when using this function 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. Number of points specified by PATH C Number of points specified by PATH L ≦...
  • Page 331 Chapter 10 Data file description Overview ..........10-1 Program file ..........10-3 Point file ........... 10-5 Point comment file ......... 10-8 Point name file ........10-10 Parameter file........10-12 Shift coordinate definition file ....10-16 Hand definition file ....... 10-18 Pallet definition file .......
  • Page 332 Option board file ........10-41 Self check file ........10-42 Alarm history file ........10-43 Remaining memory size file ....10-45 Variable file ........... 10-46 Constant file .......... 10-52 Array variable file ......... 10-53 DI file ............10-55 DO file ............ 10-57 MO file ...........
  • Page 333 Overview Data file types This section explains data files used with a SEND statement and READ/WRITE online commands. There are 36 different types of data files. Definition Format Read- Type File Name Write Individual File --------------- All file User Program Point Point comment...
  • Page 334 Overview Cautions Observe the following cautions when handling data files. 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 ■...
  • Page 335 Program file All programs Read-out When used as a read-out file, all programs currently stored are read out. Write files are registered at the controller under the program name indicated Write at the "NAME = program name" line. Format Meaning •...
  • Page 336 Program file One program Read-out Write Format 1. 2.PGmmm Meaning • Expresses a specified program. • "mmm" represents a number from 1 to 100. • Program names are shown with 32 characters or less consisting of alphanumeric characters and _ (underscore), and must be enclosed in < > (angle brackets). •...
  • Page 337 Point file All points Read-out When used as a read-out file, all points currently stored are read out. Write When used as a write file, writing is performed with a point number. Format Meaning • Expresses all point data. DATA FORMAT Pmmmm= fxxxxxx fyyyyyy fzzzzzz frrrrrr faaaaaa fbbbbbb t xr yr [cr/lf] Pmmmm= fxxxxxx fyyyyyy fzzzzzz frrrrrr faaaaaa fbbbbbb t xr yr [cr/lf] Pmmmm= fxxxxxx fyyyyyy fzzzzzz frrrrrr faaaaaa fbbbbbb t xr yr [cr/lf]...
  • Page 338 Point file A line containing only [cr/lf] is added at the end of the file to indicate the end of the file. ■ SAMPLE SEND PNT TO CMU ················· O u t p u t s a l l p o i n t s f r o m t h e communication port.
  • Page 339 Point file One point Read-out Write Format Pmmmm Meaning • Expresses a specified point. • "mmmm" represents a number from 0 to 29999. DATA FORMAT Pmmmm= fxxxxxx fyyyyyy fzzzzzz frrrrrr faaaaaa fbbbbbb t xr yr [cr/lf] ■ NOTE Values mmmm ....Point number: 0 to 29999 •...
  • Page 340 Point comment file All point comments When used as a read-out file, all point comments currently stored are read Read-out out. When used as a write file, writing is performed with a point comment Write number. Format Meaning • Expresses all point comments. DATA FORMAT PCmmmm= sssssssssssssss[cr/lf] PCmmmm= sssssssssssssss[cr/lf]...
  • Page 341 Point comment file One point comment Read-out Write Format PCmmmm Meaning • Expresses a specified point comment. • "mmmm" represents a number from 0 to 29999. DATA FORMAT PCmmmm= sssssssssssssss[cr/lf] Values mmmm ........Point comment number: 0 to 29999 ss...ss ........Comment data: which can be up to 16 one-byte characters.
  • Page 342 Point name file All point names Read-out When used as a read-out file, all point names currently stored are read out. Write When used as a write file, writing is performed with a point name number. Format Meaning • Expresses all point names. DATA FORMAT PNmmmm= assssssss [cr/lf] PNmmmm= assssssss [cr/lf]...
  • Page 343 Point name file One point name Read-out Write Format PNmmmm Meaning • Expresses a specified point name. • "mmmm" represents a number from 0 to 29999. DATA FORMAT PNmmmm= asssssssssssssss [cr/lf] Values mmmm ........Point name number: 0 to 29999 a ..........Name data (the first character): Use only one-byte alphabetic character.
  • Page 344 Parameter file All parameters Read-out When used as a read-out file, all parameters currently stored are read out. When used as a write file, only the parameters specified by labels are Write written. Format Meaning • Expresses all parameters. DATA FORMAT /parameter label/ [cr/lf] RC=xxxxxx [cr/lf] /parameter label/ [cr/lf]...
  • Page 345 Parameter file • When writing parameter data, be sure that the servo is off. MEMO • 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"...
  • Page 346 Parameter file One parameter When used as a read-out file, only the parameter specified by a label is read Read-out out. Write When used as a write file, only the parameter specified by a label is written. Format /parameter label/, \parameter label\, #parameter label# Meaning •...
  • Page 347 Parameter file DATA FORMAT 7 #parameter label# [cr/lf] R?=xxxxxx[cr/lf] [cr/lf] DATA FORMAT 8 #parameter label# [cr/lf] R?A=xxxxxx,xxxxxx,xxxxxx,xxxxxx,xxxxxx,xxxxxx [cr/lf] [cr/lf] DATA FORMAT 9 /parameter label/ [cr/lf] C?O=xxxxxx,xxxxxx,xxxxxx,xxxxxx [cr/lf] [cr/lf] Values RC ..........Indicates the entire controller. R? ...........Robot setting (?: Robot number) C? ..........Controller setting (?: Controller number) A ..........
  • Page 348 Shift coordinate definition file All shift data Read-out When used as a read-out file, all shift data currently stored are read out. Write When used as a write file, writing is performed with a shift number. Format Meaning • Expresses all shift data. DATA FORMAT = fxxxxxx fyyyyyy...
  • Page 349 Shift coordinate definition file One shift definition Read-out Write Format Meaning • Expresses a specified shift definition. DATA FORMAT = fxxxxxx fyyyyyy fzzzzzz frrrrrr[cr/lf] Values m ...........Shift number: 0 to 39 f ..........Coordinate sign: + / - / space xxxxxx/yyyyyy/../rrrrrr .... Represent a numeric value of 7 digits or less, having 3 or less places below the decimal point.
  • Page 350 Hand definition file All hand data Read-out When used as a read-out file, all hand data currently stored are read out. Write When used as a write file, writing is performed with a hand number. Format Meaning • Expresses all hand data. DATA FORMAT = n,fxxxxxx, fyyyyyy, fzzzzzz ,{R}[cr/lf] = n,fxxxxxx, fyyyyyy, fzzzzzz ,{R}[cr/lf]...
  • Page 351 Hand definition file One hand definition Read-out Write Format Meaning • Expresses a specified hand definition. DATA FORMAT Hm = n,fxxxxxx, fyyyyyy, fzzzzzz ,{R}[cr/lf] Values m ........... Hand number: 0 to 31 n ..........Robot number: 1 to 4 f ..........Coordinate sign: + / - / space xxxxxx/yyyyyy/zzzzzz ....
  • Page 352 Pallet definition file All pallet definitions When used as a read-out file, all pallet definitions currently stored are read Read-out out. Write When used as a write file, writing is performed with a pallet number. Format Meaning • Expresses all pallet definitions. DATA FORMAT PLm [cr/lf] PLN = XY [cr/lf]...
  • Page 353 Pallet definition file Hand system flags are enabled only when specifying the coordinate data in "mm" units for SCARA ■ robots. Hand system flags and the first arm and the second arm rotation information are ignored during ■ movement where pallet definitions are used. If a number other than 1 or 2 is set, or if no number is designated, then 0 will be set to indicate ■...
  • Page 354 Pallet definition file One pallet definition Read-out Write Format Meaning • Expresses a specified pallet definition. • "m" represents a number from 0 to 39. DATA FORMAT PLm [cr/lf] XY [cr/lf] PLP = ppppp [cr/lf] nnn [cr/lf] 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] [cr/lf]...
  • Page 355 Pallet definition file Hand system flags are enabled only when specifying the coordinate data in "mm" units for SCARA ■ robots. Hand system flags and the first arm and the second arm rotation information are ignored during ■ movement where pallet definitions are used. If a number other than 1 or 2 is set, or if no number is designated, then 0 will be set to indicate ■...
  • Page 356 General Ethernet port file When used as a read-out file, all general Ethernet port definitions are read Read-out out. When used as a write file, writing is performed with a general Ethernet port Write number. Format Meaning • Expresses all general Ethernet port definitions. DATA FORMAT GPm [cr/lf] MODE=n [cr/lf]...
  • Page 357 General Ethernet port definition file A line containing only [cr/lf] is added at the end of the file, indicating the end of the file. ■ SAMPLE SEND GEP TO CMU ················· Outputs all files of the general Ethernet port from the communication port. Response: RUN [cr/lf] GP0 [cr/lf]...
  • Page 358 Input/output name file 11.1 All input/output name data When used as a read-out file, all input/output data currently stored are read Read-out out. Write When used as a write file, writing is performed with a input/output number. Format Meaning • Expresses all input/output name data. DATA FORMAT ioNMpp(b)=assssssssssssssss [cr/lf] ioNMpp(b)=assssssssssssssss [cr/lf]...
  • Page 359 Input/output name file 11.2 One input/output type Read-out Write Restricted* Format ioNM() Meaning • Expresses a specified input/output type. DATA FORMAT ioNMpp(b)=asssssssssssssss [cr/lf] ioNMpp(b)=asssssssssssssss [cr/lf] [cr/lf] NOTE Values io* ........Input/output type: DI, DO, SI, SO *Readable input/output pp* ........Port number: 2 to 7, 10 to 15 type and Port number d.........
  • Page 360 Input/output name file 11.3 One input/output port Read-out Write Restricted* Format ioNMpp() Meaning • Expresses a specified input/output type and port number. DATA FORMAT ioNMpp(b)=asssssssssssssss [cr/lf] ioNMpp(b)=asssssssssssssss [cr/lf] [cr/lf] NOTE Values io* ........Input/output type: DI, DO, SI, SO *Readable input/output pp* ........
  • Page 361 Input/output name file 11.4 One input/output bit Read-out When used as a write file, writing is performed with an input/output name Write number. Format ioNMpp(b) Meaning • Expresses a specified input/output type and bit number. DATA FORMAT ioNMpp(b)=asssssssssssssss [cr/lf] ioNMpp(b)=asssssssssssssss [cr/lf] [cr/lf] Values io ...........Input/outpu type: DI, DO, SI, SO...
  • Page 362 Area check output file 12.1 All area check output data When used as a read-out file, all area check output data currently stored are Read-out read out. When used as a write file, writing is performed with an area check output Write number.
  • Page 363 Area check output file 12.2 One area check output definition Read-out When used as a write file, writing is performed with an area check output Write number. Format Meaning • Expresses a specified area check output definition. DATA FORMAT ACm=r,p1,p2,t,n,l [cr/lf] Values m ........
  • Page 364 All file 13.1 All file Read-out Write Format Meaning Expresses the minimum number of data files required to operate the robot system. NOTE DATA FORMAT • F o r d e t a i l s o f e a c h [PGM] ····All program format fi l e , re fe r t o t h a t fi l e ' s NAME=<...
  • Page 365 All file [PLT] ····All pallet format PLm [cr/lf] P[5]= fxxxxxx fyyyyyy fzzzzzz frrrrrr faaaaaa fbbbbbb t [cr/lf] [cr/lf] [GEP] ····All general Ethernet port format MODE=n [cr/lf] TYPE=t [cr/lf] [cr/lf] [ION] ····All input/output name format ioNMpp(b)=asssssssssssssss [cr/lf] ioNMpp(b)=asssssssssssssss [cr/lf] [cr/lf] [ACO] ····All area check output format ACm=r,p1,p2,t,n,l [cr/lf] ACm=r,p1,p2,t,n,l [cr/lf] [cr/lf]...
  • Page 366 Program directory file 14.1 Entire program directory When used as a read-out file, information on entire program directory is read Read-out out. Write This file cannot be used as a write file. Format Meaning • Expresses entire program directory. DATA FORMAT nnn, yy/mm/dd, hh:mm, bbbbbbb, llll, xx, ff, sssss…sssssssss [cr/lf] nnn, yy/mm/dd, hh:mm, bbbbbbb, llll, xx, ff, sssss…sssssssss [cr/lf] [cr/lf]...
  • Page 367 Program directory file 14.2 One program directory Read-out Write Format <> Meaning • Expresses information on one program. • The program name is enclosed in << >> (double brackets). DATA FORMAT nnn, yy/mm/dd, hh:mm, bbbbbbb, llll, xx, ff, sssss…sssssssss [cr/lf] Values nnn.........
  • Page 368 Parameter directory file 15.1 Entire parameter directory When used as a read-out file, information on entire parameter directory is read Read-out out. Write This file cannot be used as a write file. Format Meaning • Expresses entire parameter directory. DATA FORMAT \mmmmmm\ a m n1 n2 n3 …...
  • Page 369 Machine reference file 16.1 Machine reference (axes: sensor method, stroke-end method) Read-out Write Format Meaning • Expresses all machine reference values of axes whose return-to-origin method is set as "Sensor" or "Stroke-end". DATA FORMAT RnA=mmm,mmm,mmm,mmm,mmm,mmm [cr/lf] RnA= mmm,mmm,mmm,mmm,mmm,mmm [cr/lf] [cr/lf] Values n ..........
  • Page 370 Machine reference file 16.2 Machine reference (axes: mark method) Read-out Write Format Meaning • Expresses all machine reference values of axes whose return-to-origin method is set as "Mark". DATA FORMAT RnA=mmm,mmm,mmm,mmm,mmm,mmm [cr/lf] RnA= mmm,mmm,mmm,mmm,mmm,mmm [cr/lf] [cr/lf] Values n ..........Robot number: 1 to 4 mmm ........
  • Page 371 System configuration information file Read-out Write Format Meaning • Expresses all system configuration information. DATA FORMAT Cm:nnnn, s, b, kkkkk, ff-ff-ff-ff-ff-ff [cr/lf] Cm:nnnn, s, b, kkkkk, ff-ff-ff-ff-ff-ff [cr/lf] Rr:aaaa,hhhhhh [cr/lf] Rr:aaaa,hhhhhh [cr/lf] [cr/lf] Values m ........Controllr number: 1 onward nnn.........
  • Page 372 Version information file Read-out Write Format Meaning • Expresses version information. DATA FORMAT Cm:cv, cr-mv-dv1, dr1/dv2, dr2 [cr/lf] Cm:cv, cr-mv-dv1, dr1/dv2, dr2 [cr/lf] [cr/lf] Values m ...........Controllr number: 1 onward cv ...........Host version cr ...........Host revision (Rxxxx) mv .........PLD version (Vx.xx) dv? (?: 1,2) ......Driver version (Vx.xx) dr? (?: 1,2) ......Driver revision (Rxxx) A line containing only [cr/lf] is added at the end of the file, indicating the end of the file.
  • Page 373 Option board file Read-out Write Format Meaning • Expresses all option boards. DATA FORMAT CmOn:aaaaaa,Vb.bb [cr/lf] CmOn:aaaaaa,Vb.bb [cr/lf] CmOn:aaaaaa,Vb.bb [cr/lf] CmOn:aaaaaa,Vb.bb [cr/lf] [cr/lf] Values m ........Controllr number: 1 onward n........Option board number inside the controller Slot number: 1 to 4 aaaaaa ......
  • Page 374 Self check file Read-out Write Format Meaning • Expresses self check file. DATA FORMAT gg.bbb:mmmm [cr/lf] gg.bbb:mmmm [cr/lf] gg.bbb:mmmm [cr/lf] gg.bbb:mmmm [cr/lf] [cr/lf] Values gg ........Alarm group number bbb......... Alarm classification number mmmm ......Alarm occurrence location RC: Entire controller R?: Robot (?: Robot number) C?: Controller (?: Controller number) A?: Axis (?: Axis number)
  • Page 375 Alarm history file Read-out Write Format Meaning • Expresses all alarm history. DATA FORMAT 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] 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] nnn:yy/mm/dd, hh:mm:ss, gg.bbb : aaaa,c, eee : ffff,...
  • Page 376 Alarm history file Values nnn......... Alarm history number: 1 to 500 yy/mm/dd ....... Alarm occurrence date hh:mm:ss ......Alarm occurrence time gg ........Alarm group number bbb......... Alarm classification number aaaa ....... Alarm occurrence location RC: Entire controller R?: Robot (?: Robot number) C?: Controller (?: Controller number) A?: Axis (?: Axis number) M?: Driver (?: Driver number)
  • Page 377 Remaining memory size file Read-out Write Format Meaning • Expresses remaining memory size DATA FORMAT PGM+PNT AREA=mmmmmmm/nnnnnnnn[cr/lf] VAR AREA=xxxxx/yyyyy[cr/lf] [cr/lf] Values mmmmmmm ......Remaining memory size of program and point area nnnnnnn ........Total memory size of program and point area xxxxx ........Remaining memory size of variable area 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.
  • Page 378 Variable file 23.1 Dynamic variables All dynamic variables Read-out When used as a read-out file, all dynamic variables currently stored are read out. Write When used as a write file, a specified dynamic variable is written. Format Meaning • Expresses all dynamic variables. DATA FORMAT variable name t = xxxxxx [cr/lf] variable name t = xxxxxx [cr/lf]...
  • Page 379 Variable file One dynamic variable Read-out Write Format variable name t Meaning • Expresses one dynamic variable. DATA FORMAT xxxxxx [cr/lf] Values Variable name ... Global variable defined in the program. Variable name is shown with 32 characters or less consisting of alphanumeric characters and _ (underscore).
  • Page 380 Variable file 23.2 Static variables 23.2.1 Integer type static variables (SGI) All integer type static variables When used as a read-out file, all integer type static variables currently stored Read-out are read out. Write When used as a write file, a specified integer type static variable is written. Format Meaning •...
  • Page 381 Variable file One integer type static variables Read-out Write Format SGIm Meaning • Expresses a specified integer type static variable. • "m" represents a number from 0 to 31. DATA FORMAT xxxxxx [cr/lf] Values xxxxxx ........Integer of -2147483647 to 2147483647 SAMPLE SEND SGI1 TO CMU ················...
  • Page 382 Variable file 23.2.2 Real type static variables (SGR) All real type static variables When used as a read-out file, all real type static variables currently stored Read-out are read out. Write When used as a write file, a specified real type static variable is written. Format Meaning •...
  • Page 383 Variable file One real type static variables Read-out Write Format SGRm Meaning • Expresses a specified real type static variable. • "m" represents a number from 0 to 31. DATA FORMAT xxxxxx [cr/lf] Values xxxxxx ......Real number of 7 digits or less including decimal fractions SAMPLE SEND SGR1 TO CMU ················...
  • Page 384 Values sssss...ssssss ......Character string: 255 characters or less Output of " symbol (double quotation) is shown with successive " symbol. ■ SAMPLE SEND """OMRON ROBOT""" TO CMU ····················· Outputs the specified character string from the communication port. Response: "OMRON ROBOT"[cr/lf]...
  • Page 385 Array variable file 25.1 All array variables Read-out When used as a read-out file, all array variables are read out. Write When used as a write file, a specified array variable is written. Format Meaning • Expresses all array variables. DATA FORMAT variable name t(l{,m{,n}}) = xxxxxx [cr/lf] variable name t(l{,m{,n}}) = xxxxxx [cr/lf]...
  • Page 386 Array variables defined by the DIM statement are registered during compiling. Array variables MEMO cannot be referred to unless they are registered. SAMPLE SEND C1$(2) TO CMU ·············· Outputs the specified array variable C1$(2) from the communication port. Response: RUN [cr/lf] OMRON ROBOT [cr/lf] END [cr/lf] 10-54 Chapter 10 Data file description...
  • Page 387 DI file 26.1 All DI information Read-out 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() Meaning • Expresses all DI (parallel input variable) information. DATA FORMAT DI0()=&Bnnnnnnnn [cr/lf] DI1()=&Bnnnnnnnn [cr/lf]...
  • Page 388 DI file 26.2 One DI port Read-out 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() Meaning • Expresses the status of one DI port. DATA FORMAT DIm()=&Bnnnnnnnn[cr/lf] Values...
  • Page 389 DO file 27.1 All DO information Read-out When used as a read-out file, all DO information is read out. Write When used as a write file, the value is written to the specified DO port. Format DO() Meaning • Expresses all DO (parallel output variable) information. •...
  • Page 390 DO file 27.2 One DO port Read-out When used as a read-out file, the specified DO port status is read out. Write When used as a write file, the value is written to the specified DO port. Format DOm() Meaning •...
  • Page 391 MO file 28.1 All MO information Read-out When used as a read-out file, all MO information is read out. Write When used as a write file, the value is written to the specified MO port. Format MO() Meaning • Expresses all MO (internal output variable) information. •...
  • Page 392 MO file 28.2 One MO port Read-out When used as a read-out file, the specified MO port status is read out. Write When used as a write file, the value is written to the specified MO port. Format MOm() Meaning •...
  • Page 393 LO file 29.1 All LO information Read-out When used as a read-out file, all LO information is read out. Write When used as a write file, the value is written to the specified LO port. Format LO() Meaning • Expresses all LO (internal output variable) information. DATA FOMAT LO0()=&Bnnnnnnnn [cr/lf] LO1()=&Bnnnnnnnn [cr/lf]...
  • Page 394 LO file 29.2 One LO port Read-out When used as a read-out file, the specified LO port status is read out. Write When used as a write file, the value is written to the specified LO port. Format LOm() Meaning •...
  • Page 395 TO file 30.1 All TO information Read-out When used as a read-out file, all TO information is read out. Write When used as a write file, the value is written to the specified TO port. Format TO() Meaning • Expresses all TO (timer output variable) information. DATA FORMAT TO0()=&Bnnnnnnnn [cr/lf] TO1()=&Bnnnnnnnn [cr/lf]...
  • Page 396 TO file 30.2 One TO port Read-out When used as a read-out file, the specified TO port status is read out. Write When used as a write file, the value is written to the specified TO port. Format TOm() Meaning •...
  • Page 397 SI file 31.1 All SI information Read-out 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() Meaning • Expresses all SI (serial input variable) information. DATA FORMAT SI0()=&Bnnnnnnnn [cr/lf] SI1()=&Bnnnnnnnn [cr/lf]...
  • Page 398 SI file 31.2 One SI port Read-out 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() Meaning • Expresses the status of one SI port. DATA FORMAT SIm()=&Bnnnnnnnn[cr/lf] Values...
  • Page 399 SO file 32.1 All SO information Read-out When used as a read-out file, all SO information is read out. Write When used as a write file, the value is written to the specified SO port. Format SO() Meaning • Expresses all SO (serial output variable) information. •...
  • Page 400 SO file 32.2 One SO port Read-out When used as a read-out file, the specified SO port status is read out. Write When used as a write file, the value is written to the specified SO port. Format SOm() Meaning •...
  • Page 401 SIW file 33.1 All SIW data When used as a read-out file, all SIW information is read out in hexadecimal Read-out digit. Write This file cannot be used as a write file. Format SIW() Meaning • Expresses all SIW (serial word input) data. DATA FORMAT SIW(0)=&Hnnnn [cr/lf] SIW(1)=&Hnnnn [cr/lf]...
  • Page 402 SIW file 33.2 One SIW data When used as a read-out file, the specified SIW status is read out in Read-out hexadecimal digit. Write This file cannot be used as a write file. Format SIW(m) Meaning • Expresses one SIW status. DATA FORMAT SIW(m)=&Hnnnn [cr/lf] Values...
  • Page 403 SOW file 34.1 All SOW When used as a read-out file, all SOW information is read out in Read-out hexadecimal digit. Write When used as a write file, the value is written to the specified SOW port. Format SOW() Meaning •...
  • Page 404 SOW file 34.2 One SOW data When used as a read-out file, the specified SOW port status is read out in Read-out hexadecimal digit. Write When used as a write file, the value is written to the specified SOW port. Format SOW(m) Meaning...
  • Page 405 EOF file 35.1 EOF data Read-out When used as a read-out file, ^Z (=1Ah) is read out. Write This file cannot be used as a write file. Format Meaning • This 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.
  • Page 406 Serial port communication file 36.1 Serial port communication file Read-out Write Format Meaning • Expresses the serial communication port. • Depends on the various data formats. SAMPLE SEND PNT TO CMU ················· O u t p u t s a l l p o i n t d a t a f r o m t h e communication port.
  • Page 407 Ethernet port communication file 37.1 Ethernet port communication file Read-out Write Format Meaning • Expresses the Ethernet port. • Depends on the various data formats. SAMPLE SEND PNT TO ETH ················· O u t p u t s a l l p o i n t d a t a f r o m t h e Ethernet port.
  • Page 409 Chapter 11 User program examples Basic operation........11-1 Application ..........11-8...
  • Page 411 Basic operation Directly writing point data in program Overview ■ The robot arm can be moved by PTP (point-to-point) motion by directly specifying point data in the program. Processing flow START 300.000 300.000 50.000 90.000 0.000 0.000 PTP movement 300.000 100.000 0.000 0.000...
  • Page 412 Using point numbers Overview ■ Coordinate data can be specified by using point numbers in a program. Coordinate data should be entered beforehand from the programming box or the support software "SCARA-YRCX Studio", for example as shown below (For details, refer to the YRCX operator's manual or the SCARA-YRCX Studio manual).
  • Page 413 Using shift coordinates Overview ■ In the example shown below, after PTP movement from P3 to P5, the coordinate system is shifted +140mm along the X-axis and -100mm along the Y-axis, and the robot then moves from P3 to P5 again. The shift coordinate data is set in S1 and P3, P4, P5 are set as described in the previous section ("1.2 Using point numbers").
  • Page 414 Palletizing 1.4.1 Calculating point coordinates Overview ■ Repetitive movement between a fixed work supply position P0 and each of the equally spaced points on a pallet can be performed with the following program. In the drawing below, points N1 to N20 are on Cartesian coordinates, consisting of 5 points positioned at a 50mm pitch in the X-axis direction and 4 points at a 25mm pitch in the Y-axis direction.
  • Page 415 SAMPLE P100=P1 P200=P1 FOR J=1 TO 4 FOR K=1 TO 5 MOVE P,P0 MOVE P,P100 P100=P100+P10 NEXT K P200=P200+P20 P100=P200 NEXT J HALT Basic operation 11-5...
  • Page 416 1.4.2 Utilizing pallet movement Overview ■ Repetitive movement between a fixed work supply position P0 and each of the equally spaced points on a pallet can be performed with the following program. In the drawing below, points N1 to N24 are on Cartesian coordinates, consisting of 3 points positioned at a 50mm pitch in the X-axis direction, 4 points at a 50mm pitch in the Y-axis direction, and 2 points at 100mm pitch in the Z-axis direction.
  • Page 417 DI/DO (digital input and output) operation Overview ■ The following example shows input/ output signal operations through the general-purpose input/ output device. Processing flow START Wait until DI2( ) is all at "0". Wait until DI20 to DI27 become "0". Set all of DO2 ( ) to "1".
  • Page 418 Application Pick and place between 2 points Overview ■ The following is an example for picking up a part at point A and placing it at point B. Pick and place between 2 points 30mm 50mm Point A Point B 33C09-R7-00 Precondition ■...
  • Page 419 SAMPLE: When using arch motion P4=P2 ····················· P2 coordinates are assigned to P4. LOC3(P4)=LOC3(P4)-50.000 ····· Axis 3 data of P4 is shifted 50mm in upper direction. GOSUB *OPEN 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...
  • Page 420 Palletizing 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. Palletizing 50mm P1: Pallet reference position Robot P0: Part supply position Parts feeder 33C10-R7-00 Precondition...
  • Page 421 SAMPLE 1: When point is calculated WHILE -1 ····················· All repeated (-1 is always TRUE). FOR A=0 TO 2 FOR B=0 TO 2 WAIT DI(31)=1 ············ Wait until a pallet "present" status occurs. WAIT DI(30)=1 ············ Wait until the supplied component "present"...
  • Page 422 Pick and place of stacked parts 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. Parts are detected with a sensor installed on the robot hand.
  • Page 423 SAMPLE FOR A=1 TO 3 SPEED 100 GOSUB *OPEN P6=P[A] LOC3(P6)=0.000 MOVE P,P6,A3=0.000 WHILE -1 SPEED 20 MOVE P,P[A],STOPON DI3(0)=1 IF DI3(0)=0 THEN *L1 ’SENSOR ON P4=JTOXY(WHERE) GOSUB *CLOSE SPEED 100 MOVE P,P5,A3=0.000 GOSUB *OPEN MOVE P,P4,A3=0.000 WEND *L1: ’SENSOR OFF NEXT A SPEED 100 DRIVE (3,0)
  • Page 424 Parts inspection (Multi-tasking example) 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 and sends it to point C if OK or to point D if NG.
  • Page 425 Flow chart Processing flow START FLAG1=0 FLAG2=0 Exclusive control flag reset Subtask start Part 1 supplied? Task 2 busy? FLAG1=1 Exclusive control flag set Chuck open Move to parts supply position P1 Chuck close Move to testing device 1 Chuck open Move upward 10000 pulses FLAG1=0 Exclusive control flag reset...
  • Page 426 Program example SAMPLE
    FLAG1=0 Program name:SUB_PGM FLAG2=0 UPPOS=0.000 START ,T2 ······ Subtask Start *L1: *S1: WAIT DI2(2)=1 WAIT DI3(2)=1 ······· Part supply standby WAIT FLAG2=0 WAIT FLAG1=0 ······ Other tasks waiting for standby status FLAG1=1 FLAG2=1 ······ Exclusive control flag set GOSUB *OPEN GOSUB *OPEN ······...
  • Page 427 Sealing Overview ■ The following is an example for sealing a part. Sealing 20mm 10mm 33C11-R9-00 Precondition ■ I/O signal DO (20) Valve open/close 1: Open / 0: Close Positions of P0 to P7 are set by teaching. SAMPLE MOVE P,P0,Z=0 SPEED 40 PATH SET ·····················...
  • Page 428 Connection to an external device through RS-232C (example 1) Overview ■ Point data can be written in a program by using an external device connected to the YRCX series controller via the RS-232C port. Precondition ■ 1. Input to the external device from the controller SDATA/X/Y [cr/lf] 2.
  • Page 429 Connection to an external device through RS-232C (example 2) Overview ■ Point data can be created from the desired character strings and written in a program by using an external device connected to the YRCX controller via the RS-232C port. Precondition ■...
  • Page 430 SAMPLE ’INT VCMD$="SDATA/X/Y" VIN$="" VX$="" VY$="" 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 *ST: SEND VCMD$ TO CMU SEND CMU TO VIN$ VMAX=LEN(VIN$) *LOOP: IF I>VMAX THEN GOTO *E_LOOP C$=MID$(VIN$,I ,1) IF C$="X"...
  • Page 431 Chapter 12 Online commands Online Command List ......12-1 Operation and setting commands ..12-9 Reference commands ......12-23 Operation commands ......12-37 Data file operation commands ... 12-41 Utility commands ........12-52 Individual execution of robot language ... 12-54 Control codes ........
  • Page 433 Online Command List Online commands can be used to operate the controller via an RS-232C interface or via an Ethernet. This Chapter explains the online commands which can be used. For details regarding the RS-232C and Ethernet connection methods, refer to the "YRCX Controller User's Manual". About termination codes During data transmission, the controller adds the following codes to the end of a line of transmission data.
  • Page 434 Online command list: Operation-specific Key operation Operation type Command Option Condition program name < > ,Tn , p Register program in the task LOAD (m: 1-100, n: 1-16, p: 1-64) Program Reset program RESET program name < > Execute program Stop program STOP (m: 1-100, n: 1-16)
  • Page 435 Utility Operation type Command Option Condition program name1 program name2 < > TO < > Copy program (m: 1-100) COPY Pm-Pn TO Pk Copy points "m - n" to point "k" (m: 0-29999, n: 0-29999, k: 0-29999) PCm-PCn TO PCk Copy point comments "m - n"...
  • Page 436 Data handling Operation type Command Option Condition ACCESS k , pppppppp Access level Acquiring status (k: 0/1, p: alphanumeric characters of 8 characters or less) Alarm status BREAK program name < > Break point status (m: 1-100) CURPNT Last (Current) point number reference Emergency stop status HAND [robot number ]...
  • Page 437 Robot language independent execution The Robot languages executable independently are the commands/functions with " 3 " at "Online" column in Chapter 8 "robot language table". Control code Operation type Command Option Condition Execution language interruption ^C(=03H) Conditions: 1. Always executable. 2.
  • Page 438 Online command list: In alphabetic order Command Option Meaning Condition ACCESS k , pppppppp (k: 0/1, Acquire access level p: alphanumeric characters of 8 characters or less) Acquire alarm status program name BREAK < > Acquire break point status (m: 1-100) CURPNT Acquire Last (Current) point number reference...
  • Page 439 Command Option Meaning Condition program name1 program name2 < > TO < > COPY Copy program (m: 1-100) Pm-Pn TO Pk Copy points "m - n" to point "k" (m: 0-29999, n: 0-29999, k: 0-29999) Copy point comments "m - n" to point PCm-PCn TO PCk comment "k"...
  • Page 440 Command Option Meaning Condition program name < > NEXT Execute program to next line (m: 1-100, n: 1-16) [robot number ] k ORGRTN Return-to-origin (robot number: 1-4, k: 1-6) READ read-out file Read-out data Change program name from "1" to "2" ...
  • Page 441 Operation and setting commands Program operations 1. Register task Command format @LOAD ,Tn, p [cr/lf] Response format OK[cr/lf] Values m ...........Program number: 1 to 100 n ..........Task number: 1 to 16 P ..........Task priority ranking: 1 to 64 Meaning Registers the specified program into "task n"...
  • Page 442 Meaning Executes the program reset. Command format 1 resets all programs. When restarting the program, the main program or the program that has been executed last in task 1 is executed from its beginning. Command format 2 resets only the specified program. When restarting the program that has been reset, this program is executed from its beginning.
  • Page 443 4. Stop program Command format 1.@STOP [cr/lf] 2.@STOP [cr/lf] Response format OK[cr/lf] Values n ..........Task number: 1 to 16 m ...........Program number: 1 to 100 Meaning Stops the program. Command format 1 stops all programs. Command format 2 stops only the specified program. SAMPLE Command: @STOP [cr/lf] ·············...
  • Page 444 6. Skip one program line Command format @SKIP [cr/lf] Response format OK[cr/lf] Values n ..........Task number: 1 to 16 m ...........Program number: 1 to 100 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.
  • Page 445 8. Execute program to line before specified line Command format @RUNTO , k [cr/lf] Command format OK[cr/lf] Values n ..........Task number: 1 to 16 m ...........Program number: 1 to 100 k ..........Specified line number: 1 to 9999 Meaning Executes the specified program to the line before the specified line.
  • Page 446 10. Set break point Command format 1.@BREAK (n,n,n,...), k [cr/lf] 2.@BREAK 0 [cr/lf] 3.@BREAK 0 [cr/lf] Command format OK[cr/lf] Values m ...........Program number: 1 to 100 n ..........Specified line number: 1 to 9999 k ..........Set/Cancel: 0: Set, 1: Cancel Meaning Sets a break point to pause the program during program execution.
  • Page 447 11. Check program syntax Command format @SYNCHK ,k [cr/lf] Command format RUN [cr/lf] nnnn:gg.bbb [cr/lf] nnnn:gg.bbb [cr/lf] nnnn:gg.bbb [cr/lf] nnnn:gg.bbb [cr/lf] END [cr/lf] Values m ...........Program number: 1 to 100 k ..........Maximum number of error: 1 to 100 nnnn ........Line number where error occurred: 1 to 9999 gg ...........Alarm group number bbb ........Alarm classification number...
  • Page 448 12. Set main program Command format @MAINPG[cr/lf] Response format OK[cr/lf] Values m: Program number ....1 to 100 NOTE • " M a i n p r o g r a m " Meaning Specifies the program which is always selected when all programs are reset. When "0" corresponds conventional is specified at the main program number or program specified at the main program function "_SELECT"...
  • Page 449 MANUAL mode operation 1. Change the MANUAL mode speed Command format @MSPEED [robot number] k[cr/lf] Response format OK[cr/lf] Values robot number ......1 to 4 (If not input, robot 1 is specified.) k ..........Manual movement speed: 1 to 100 Meaning Changes the manual mode movement speed of the robot specified by the .
  • Page 450 3. Change inching movement amount Command format @IDIST [robot number] mmmmm [cr/lf] Response format OK[cr/lf] Values Robot number .........1 to 4 (If not input, robot 1 is specified.) mmmmm: inching movement amount ..1 to 10000 Meaning Changes the inching movement amount of the robot specified by the . The unit of the movement amount may vary depending on the command.
  • Page 451 Clearing output message buffer Command format @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:...
  • Page 452 Setting input data Command format @INPUT SET d [cr/lf] Response format OK[cr/lf] Values d: Input data ......Value that is matched to the type of the variable specified by the INPUT statement. (Character string is enclosed by " ") Sets the input data for responding to a data request by INPUT statement of robot Meaning program.
  • Page 453 Change access level Command format @ACCESS k , pppppppp [cr/lf] Response format OK[cr/lf] Values k: Access level ....... 0: Maintainer level, 1: Operator level pppppppp: Password ....Alphanumeric characters of 8 characters or less Meaning Changes access level. If password is omitted, sets without password. When changes access level to the maintainer level and entered password is incorrect, "6.235: Password error"...
  • Page 454 Setting input data Command format @SETPW [cr/lf] Response format READY[cr/lf] pppppppp[cr/lf] kkkkkkkk[cr/lf] nnnnnnnn[cr/lf] [cr/lf] ·······················line-feed OK[cr/lf] Values pppppppp: old password (current password) ..Alphanumeric characters of 8 characters or less kkkkkkkk: new password ........Alphanumeric characters of 8 characters or less nnnnnnnn: new password (confirmation) .....
  • Page 455 Reference commands Acquiring return-to-origin status Command format 1 @?ORIGIN[cr/lf] Response format 1 x [cr/lf] OK [cr/lf] Command format 2 @?ORIGIN robot number [cr/lf] Response format 2 x y{,y{,{...}}} [cr/lf] OK [cr/lf] Values Robot number ..........1 to 4 (If not input, robot 1 is specified.) x: Robot return-to-origin status ....
  • Page 456 Acquiring the servo status Command format @?SERVO [robot number] [cr/lf] Response format x y{,y{,{...}}} [cr/lf] OK [cr/lf] Values Robot number ....1 to 4 (If not input, robot 1 is specified.) x: Robot servo status ..0: Servo off status 1: Servo on status y: Axis servo status ...
  • Page 457 Acquiring the access level Command format @?ACCESS[cr/lf] Response format k[cr/lf] OK[cr/lf] Values k: Access level .......0 to 1 Meaning Acquires the access level. REFERENCE SAMPLE • F o r d e t a i l s r e g a r d i n g access level, refer to the Command: @?ACCESS[cr/lf]...
  • Page 458 Acquiring the mode status Command format @?MODE[cr/lf] Response format k[cr/lf] OK[cr/lf] Values k: Mode status ....... 0: MANUAL mode 1: AUTO mode (Control source: Programming box) 2: AUTO mode (Control source release) -1: Restricted mode Meaning Acquires the controller mode status. SAMPLE Command: @?MODE[cr/lf]...
  • Page 459 Acquiring the main program number Command format @?MAINPG[cr/lf] Response format m[cr/lf] OK[cr/lf] Values m: Program number ....0 to 100 (If not registered in the main program, acquires 0.) Meaning Acquires the program number which is registered in the main program. SAMPLE Command: @?MAINPG[cr/lf]...
  • Page 460 3.10 Acquiring the version information Command format @?VER[cr/lf] Response format cv,cr-mv-dv1,dr1/dv2,dr2[cr/lf] Values cv ...........Host version number cr ...........Host revision number (Rxxxx) mv .........PLO version number (Vx.xx) dv? (?: 1, 2) ......Driver version number (Vx.xx) dr? (?: 1, 2) ......Driver revision number (Rxxxx) Meaning Acquires the version information.
  • Page 461 3.12 Acquiring the tasks operation status Command format @?TSKMON Tk[cr/lf] Response format m,n,f,p[cr/lf] OK [cr/lf] Values k : Task number .......... 1 to 16 m : Execution program number ....1 to 100 n : Task execution line number ....1 to 9999 f : Each task status ........
  • Page 462 3.14 Acquiring the shift status Command format @?SHIFT [robot number] [cr/lf] Response format m[cr/lf] OK[cr/lf] Values Robot number ..1 to 4 (If not input, robot 1 is specified.) m: ......Shift number selected for the specified robot: 0 to 39 Shift not selected: -1 Meaning Acquires the shift status of the robot specified by the .
  • Page 463 3.16 Acquiring the remaining memory capacity Command format @?MEM[cr/lf] Response format k/m[cr/lf] Values k ..........Remaining source area (unit: bytes) m ...........Remaining global identifier area (unit: bytes) Meaning Acquires the remaining memory capacity. SAMPLE Command: @?MEM[cr/lf] Response: 102543/1342[cr/lf] OK[cr/lf] 3.17 Acquiring the alarm status Command format @?ALM[cr/lf] Response format...
  • Page 464 3.18 Acquiring the emergency stop status Command format @?EMG[cr/lf] Response format k[cr/lf] OK[cr/lf] Values k: Emergency stop status ..0: normal operation, 1: emergency stop Meaning Acquires the emergency stop status by checking the internal emergency stop flag. SAMPLE Command: @?EMG[cr/lf] Response: 1[cr/lf] OK[cr/lf]...
  • Page 465 3.20 Acquiring the inching movement amount Command format @?IDIST [robot number] [cr/lf] Response format mmmmm[cr/lf] OK[cr/lf] Values Robot number ..........1 to 4 (If not input, robot 1 is specified.) mmmmm: Inching movement amount ..1 to 10000 Meaning Acquires the inching movement amount specified by . SAMPLE Command: @?IDIST[2][cr/lf]...
  • Page 466 3.22 Acquiring the output message Command format @?MSG[cr/lf] Response format sssss ··· ssssss[cr/lf] OK[cr/lf] Values s: Message character string Meaning Acquires one line of message which is input from the output message buffer of the controller by the PRINT statement, etc. SAMPLE Command: @?MSG[cr/lf]...
  • Page 467 3.24 Acquiring various values 1. Acquiring the value of a numerical expression Command format @?numerical expression[cr/lf] OK[cr/lf] Response format numerical value[cr/lf] Meaning Acquires the value of the specified numerical expression. The numerical expression's value format is "decimal" or "real number". SAMPLE 1 Command: @?SQR(100*5)[cr/lf]...
  • Page 468 3. Acquiring the value of a point expression Command format @?point expression[cr/lf] Response format point data[cr/lf] OK[cr/lf] Meaning Acquires the value (point data) of the specified point expression. SAMPLE Command: @?P1+WHRXY[cr/lf] Response: 10.410 -1.600 52.150 3.000 0.000 0.000 0 0 0[cr/lf] OK[cr/lf] 4.
  • Page 469 Operation commands Absolute reset Command format @ABSADJ [robot number] k,f[cr/lf] @MRKSET [robot number] k[cr/lf] Response format RUN[cr/lf] ········ At movement start END[cr/lf] ········ At movement end Values Robot number ......1 to 4 (If not input, robot 1 is specified.) k ..........Axis number: 1 to 6 f ..........Movement direction / 0: + direction, 1: - direction Meaning Performs the absolute reset operation of the specified axis of the robot specified by the...
  • Page 470 Return-to-origin operation Command format @ORGRTN [robot number] k[cr/lf] Response format RUN[cr/lf] ········ At movement start END[cr/lf] ········ At movement end Values Robot number ......1 to 4 (If not input, robot 1 is specified.) k ..........Axis number: 1 to 6 Meaning Performs the return-to-origin operation of the specified axis of the robot specified by the .
  • Page 471 Manual movement: inching Command format @INCH [robot number] km [cr/lf] @INCHXY [robot number] km [cr/lf] @INCHT [robot number] km [cr/lf] Response format RUN[cr/lf] ········ At movement start END[cr/lf] ········ At movement end Values Robot number ......1 to 4 (If not input, robot 1 is specified.) k ..........Axis number: 1 to 6 m ...........Movement direction / +, - Meaning...
  • Page 472 Manual movement: jog Command format @JOG [robot number] km [cr/lf] @JOGXY [robot number] km [cr/lf] @JOGT [robot number] km [cr/lf] Response format RUN[cr/lf] ········ At movement start END[cr/lf] ········ At movement end Values Robot number ......1 to 4 (If not input, robot 1 is specified.) k ..........Axis number: 1 to 6 m ...........Movement direction / +, - Meaning...
  • Page 473 Data file operation commands Copy operations 1. Copying a program Command format @COPY TO [cr/lf] Response format RUN[cr/lf] ········ At prosess start END[cr/lf] ········ At prosess end Values Program name 1 ....Program name in copy source (32 characters or less consisting of alphanumeric characters and underscore) Program name 2 ....
  • Page 474 3. Copying point comments Command format @COPY PCmmmmm-PCnnnnn PCkkkkk[cr/lf] Response format RUN[cr/lf] ········ At prosess start END[cr/lf] ········ At prosess end Values mmmmm .......Top point comment number in copy source: 0 to 29999 nnnnn ........Last point comment number in copy source: 0 to 29999 kkkkk ........
  • Page 475 2. Erasing point data Command format @ERA Pmmmmm-Pnnnnn[cr/lf] Response format RUN[cr/lf] ········ At prosess start END[cr/lf] ········ At prosess end Values mmmmm .......Top point number to be erased: 0 to 29999 nnnnn ........Last point number to be erased: 0 to 29999 Meaning Erases the point data between Pmmmmm and Pnnnnn.
  • Page 476 4. Erasing point name Command format @ERA PNmmmmm-PNnnnnn [cr/lf] Response format RUN[cr/lf] ········ At prosess start END[cr/lf] ········ At prosess end Values mmmmm .......Top point name number to be erased: 0 to 29999 nnnnn ........Last point name number to be erased: 0 to 29999 Meaning Erases the point names between PNmmmmm and PNnnnnn.
  • Page 477 6. Erasing hand Command format @ERA Hm [cr/lf] Response format RUN[cr/lf] ········ At prosess start END[cr/lf] ········ At prosess end Values m ...........Hand number to be erased: 0 to 31 Meaning Erases the hand definition data of "Hm". SAMPLE Command: @ERA H2 [cr/lf] Response: RUN [cr/lf] ···············...
  • Page 478 8. Erasing area check output setting Command format @ERA ACm [cr/lf] Response format RUN[cr/lf] ········ At prosess start END[cr/lf] ········ At prosess end Values m ...........Area check output setting number to be erased: 0 to 31 Meaning Erases the area check output setting of "ACm". SAMPLE Command: @ERA AC3 [cr/lf]...
  • Page 479 Rename program Command format @REN TO [cr/lf] Response format RUN[cr/lf] ········ At prosess start END[cr/lf] ········ At prosess end Values Program name 1 ..Program name before renaming: shown with 32 characters or less consisting of alphanumeric characters and _ (underscore) Program name 2 ..
  • Page 480 Initialization process 1. Initializing the memory area Command format @INIT memory area[cr/lf] Response format RUN[cr/lf] ········ At prosess start END[cr/lf] ········ At prosess end Values Memory area ......Memory area to be initialized. One of the following memory areas is specified. PGM ........Initializes the program area.
  • Page 481 2. Initializing the communication port Command format @INIT communication port [cr/lf] Response format RUN[cr/lf] ········ At prosess start END[cr/lf] ········ At prosess end Values Communication port ....Communication port to be initialized Specify any of the ports shown below for the communication port. CMU ........Initializes the RS-232C port.
  • Page 482 Data readout processing Command format @READ read-out file[cr/lf] Response format BEGIN [cr/lf] ·····················At process start (Data output: The contents may vary depending on the read-out file.) END [cr/lf] ·······················At process end Values Read-out file ......Designates a read-out file name. NOTE Meaning Reads out the data from the designated file.
  • Page 483 Data write processing Command format @WRITE write file[cr/lf] Response format READY[cr/lf] ······· Input request display OK [cr/lf] ········ After input is completed NOTE Values Write file ........ Designates a write file name. • F o r m o r e i n fo r m a t i o n about files, refer to the Meaning Writes the data in the designated file.
  • Page 484 Utility commands Setting the sequence program execution flag Command format @SEQUENCE k[cr/lf] Response format OK[cr/lf] Values k ..........Execution flag / 0: disable, 1: enable, 3: enable (DO reset) Meaning Sets the sequence program execution flag. SAMPLE Command: @SEQUENCE 1[cr/lf] Response: OK[cr/lf] Setting the date Command format...
  • Page 485 Setting the time Command format @TIME hh:mm:ss[cr/lf] Response format OK[cr/lf] Values hh:mm:ss .......Current time hh ..........hour (00 to 23) mm ........minute (00 to 59) ss ...........second (00 to 59) Meaning Sets the time of the controller. • The currently set values are used for the omitted items. MEMO •...
  • Page 486 Individual execution of robot language Command format @robot language[cr/lf] Response format 1 OK[cr/lf] or NG=gg.bbb [cr/lf] Response format 2 RUN[cr/lf] or NG=gg.bbb[cr/lf] ················· At process start END[cr/lf] or NG=gg.bbb[cr/lf] ················· At process end Values OK, END ........... Command ended correctly. NG ............
  • Page 487 Control codes Command format ^C (=03H) Response format NG=1.8 Meaning Interrupts execution of the current command. SAMPLE Command: @MOVE P,P100,S=20[cr/lf] Response: NG=1.8[cr/lf] Control codes 12-55...
  • Page 489 Chapter 13 Appendix Reserved word list........13-1 Changes from conventional models ..13-3...
  • Page 491 Reserved word list The words shown below are reserved for robot language and cannot be used as identifiers (variables, etc.). DATE MOVET HOLD ABSADJ HOLDALL MRKSET ABSRPOS DECEL IDIST MSGCLR ACCEL DEGRAD MSPEED ACCESS DELAY MTRDUTY INCH INCHT NAME INCHXY NEXT ALMRST DIST...
  • Page 492 PUSH WEIGHT SETGEP SYNCHK WEND SETPW WHERE RADDEG WHILE WHRXY READ TASKS WRITE SHARED TCHXY SHIFT TCOUNTER TEACH RESET THEN XYTOJ RESTART RESUME TIME RETURN SKIP TIMER RIGHT SKIPTO RIGHTY TOLE RSHIFT TORQUE TSKECD RUNTO SPEED TSKMON TSKPGM START STEP SELECT STOP SEND...
  • Page 493 Changes from conventional models Program name For YRCX, the following two program names which have been special for conventional models (YRC, etc.) don't have a special meaning. A) FUNCTION B) _SELECT A) FUNCTION In conventional models (YRC, etc.), "FUNCTION" has been special program for registering a user function.
  • Page 494 Multi-tasking The differences between YRCX and conventional models (YRC, etc.) are shown below. Conventional models YRCX Maximum number of task Priority 17 to 47 1 to 63 Task definition During the program In another program Task is assigned Task is assigned Starting tasks in Task 1 automatically in a specified task number...
  • Page 495 Online commands 1. In YRCX, the online commands shown below are added to ones of conventional models (YRC, etc.). RUNTO SKIPTO MRKSET IDIST INCHXY INCHT JOGXY JOGT TCHXY SYNCHK SEQCMPL LOAD MAINPG MSGCLR SETPW ALMRST ? ALM ? CURPNT ? IDIST ? INPUT ? LONEMODE ? MAINPG...
  • Page 497 Index...
  • Page 499 Index Character string Comparison ……………………………………………… 4-4 Connection ……………………………………………… 4-4 Link ………………………………………………………… 8-85 Operations ………………………………………………… 4-4 Character string assignment statement ………………… 8-85 Circular interpolation movement ……………… 8-100, 8-145 Absolute reset …………………………………………… 12-37 Command list with a robot setting ………………………… 5-2 Acceleration coefficient …………………………………… 8-20 Command Statement Format ………………………………...
  • Page 500 Error processing ………………………………… 8-134, 8-185 Local variables ……………………………………………… 3-18 Error recovery processing ……………………………… 8-185 LO file ……………………………………………… 10-61, 10-62 Ethernet port communication file ……………………… 10-75 Logic operations …………………………………………… 4-2 Executes absolute movement of specified axes ………… 8-48 MANUAL mode operation ……………………………… 12-17 Functions: in alphabetic order ……………………………...
  • Page 501 Point file ……………………………………………………… 10-5 Serial word output ………………………………………… 3-16 Port output setting ……………………………… 8-111, 8-150 Servo status ……………………………………………… 8-193 Priority of arithmetic operation …………………………… 4-3 Setting the sequence program execution flag ………… 12-52 Program Shift Copy …………………………………………………… 12-41 Erase …………………………………………………… 12-45 Erase ……………………………………………………...
  • Page 502 TO port …………………………………………………… 8-221 Type Conversions…………………………………………… 3-6 User program examples Application ………………………………………………… 11-8 Basic operation …………………………………………… 11-1 User Variables ……………………………………………… 3-2 Using point numbers ……………………………………… 11-2 Using shift coordinates …………………………………… 11-3 Valid range of variables …………………………………… 3-18 Value Pass-Along & Reference Pass-Along …………… 3-6 Variable file ………………………………………………...
  • Page 503 Revision histor y A manual revision code appears as a suffix to the catalog number on the front cover manual. Cat. No. I232E-EN-01A Revision code The following table outlines the changes made to the manual during each revision. Revision code Date Description June 2016...

Table of Contents