background image

=;76HULHV

&DW1R,((1$

<5&;5RERW&RQWUROOHU

352*5$00,1*

0$18$/

6&$5$5RERWV

<5&;6HULHV

Summary of Contents for SCARA YRCX Series

Page 1: ... 7 6HULHV DW 1R 1 5 5RERW RQWUROOHU 352 5 00 1 0 18 6 5 5RERWV 5 6HULHV ...

Page 2: ......

Page 3: ...ing OMRON YRCX robot controllers 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 Applicable controllers YRCX ...

Page 4: ...aution items and operating points into the following levels along with symbols for signal words CAUTION and NOTE CAUTION CAUTION indicates a potentially hazardous situation which if not avoided could result in minor or moderate injury or damage to the equipment or software NOTE Primarily explains function differences etc between software versions Explains robot operation procedures in a simple and...

Page 5: ...tatement 1 4 7 Comment 1 5 8 Command Statement Format 1 5 Chapter 2 Constants 1 Outline 2 1 2 Numeric constants 2 1 2 1 Integer constants 2 1 2 2 Real constants 2 1 3 Character constants 2 2 Chapter 3 Variables 1 Outline 3 1 2 User Variables System Variables 3 2 2 1 User Variables 3 2 2 2 System Variables 3 2 3 Variable Names 3 3 3 1 Dynamic Variable Names 3 3 3 2 Static Variable Names 3 3 4 Varia...

Page 6: ...al input variable 3 13 9 9 Serial output variable 3 14 9 10 Serial word input 3 15 9 11 Serial double word input 3 15 9 12 Serial word output 3 16 9 13 Serial double word output 3 16 10 Bit Settings 3 17 11 Valid range of variables 3 18 11 1 Valid range of dynamic array variables 3 18 11 2 Valid range of static variables 3 18 12 Clearing variables 3 19 12 1 Clearing dynamic variables 3 19 12 2 Cle...

Page 7: ...Task definition method 6 1 3 Task status and transition 6 2 3 1 Starting tasks 6 2 3 2 Task scheduling 6 3 3 3 Condition wait in task 6 4 3 4 Suspending tasks SUSPEND 6 5 3 5 Restarting tasks RESTART 6 5 3 6 Deleting tasks 6 6 3 7 Stopping tasks 6 7 4 Multi task program example 6 8 5 Sharing the data 6 8 6 Cautionary Items 6 9 Chapter 7 Sequence fnction 1 Sequence function 7 1 2 Creating a sequenc...

Page 8: ...4 ARCHP1 ARCHP2 Specifies acquires the arch position parameter 8 21 5 ARMCND Acquires the current arm status 8 23 6 ARMSEL Sets acquires the current hand system selection 8 24 7 ARMTYP Sets acquires the hand system selection during program reset 8 25 8 ASPEED Sets acquires the AUTO movement speed of a specified robot 8 26 9 ATN ATN2 Acquires the arctangent of the specified value 8 27 10 AXWGHT Set...

Page 9: ...ine number 8 59 34 ETHSTS Acquires the Ethernet port status 8 60 35 EXIT FOR Terminates the FOR to NEXT statement loop 8 61 36 EXIT SUB Terminates the sub procedure defined by the SUB to END SUB statement 8 62 37 EXIT TASK Terminates its own task which is in progress 8 63 38 FOR to NEXT Performs loop processing until the variable exceeds the specified value 8 64 39 GEPSTS Acquires the General Ethe...

Page 10: ...lative movement of all robot axes in tool coordinates 8 122 65 MTRDUTY Acquires the motor load factor of the specified axis 8 132 66 OFFLINE Sets a specified communication port to the offline mode 8 133 67 ON ERROR GOTO Jumps to a specified label when an error occurs 8 134 68 ON to GOSUB Executes the subroutine specified by the expression value 8 135 69 ON to GOTO Jumps to the label specified by t...

Page 11: ...stop 8 184 99 RESUME Resumes program execution after error recovery processing 8 185 100 RETURN Processing which was branched by GOSUB is returned to the next line after GOSUB 8 186 101 RIGHT Extracts a character string from the right end of another character string 8 187 102 RIGHTY Sets the SCARA robot hand system as a right handed system 8 188 103 RSHIFT Shifts a bit value to the right 8 189 104...

Page 12: ... a specified value 8 217 129 TCOUNTER Timer counter 8 218 130 TIME Acquires the current time 8 219 131 TIMER Acquires the current time 8 220 132 TO Outputs a specified value to the TO port or acquires the output status 8 221 133 TOLE Specifies acquires the tolerance parameter 8 222 134 TORQUE Specifies acquires the maximum torque command value 8 223 135 TSKPGM Acquires the program number which is ...

Page 13: ...2 2 One program 10 4 3 Point file 10 5 3 1 All points 10 5 3 2 One point 10 7 4 Point comment file 10 8 4 1 All point comments 10 8 4 2 One point comment 10 9 5 Point name file 10 10 5 1 All point names 10 10 5 2 One point name 10 11 6 Parameter file 10 12 6 1 All parameters 10 12 6 2 One parameter 10 14 7 Shift coordinate definition file 10 16 7 1 All shift data 10 16 7 2 One shift definition 10 ...

Page 14: ... One area check output definition 10 31 13 All file 10 32 13 1 All file 10 32 14 Program directory file 10 34 14 1 Entire program directory 10 34 14 2 One program directory 10 35 15 Parameter directory file 10 36 15 1 Entire parameter directory 10 36 16 Machine reference file 10 37 16 1 Machine reference axes sensor method stroke end method 10 37 16 2 Machine reference axes mark method 10 38 17 Sy...

Page 15: ... 27 2 One DO port 10 58 28 MO file 10 59 28 1 All MO information 10 59 28 2 One MO port 10 60 29 LO file 10 61 29 1 All LO information 10 61 29 2 One LO port 10 62 30 TO file 10 63 30 1 All TO information 10 63 30 2 One TO port 10 64 31 SI file 10 65 31 1 All SI information 10 65 31 2 One SI port 10 66 32 SO file 10 67 32 1 All SO information 10 67 32 2 One SO port 10 68 33 SIW file 10 69 33 1 All...

Page 16: ... operation 11 7 2 Application 11 8 2 1 Pick and place between 2 points 11 8 2 2 Palletizing 11 10 2 3 Pick and place of stacked parts 11 12 2 4 Parts inspection Multi tasking example 11 14 2 5 Sealing 11 17 2 6 Connection to an external device through RS 232C example 1 11 18 2 7 Connection to an external device through RS 232C example 2 11 19 Chapter 12 Online commands 1 Online Command List 12 1 1...

Page 17: ...ft status 12 30 3 15 Acquiring the hand status 12 30 3 16 Acquiring the remaining memory capacity 12 31 3 17 Acquiring the alarm status 12 31 3 18 Acquiring the emergency stop status 12 32 3 19 Acquiring the manual movement speed 12 32 3 20 Acquiring the inching movement amount 12 33 3 21 Acquiring the last reference point number current point number 12 33 3 22 Acquiring the output message 12 34 3...

Page 18: ... 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 1 Program name 13 3 A FUNCTION 13 3 B _SELECT 13 3 2 Multiple Robot Control 13 3 3 Multi tasking 13 4 4 Robot Language 13 4 5 Online commands 13 5 6 Data file 13 5 Index ...

Page 19: ... 1 Writing Programs 1 1 The OMRON Robot Language 1 1 2 2 Characters 1 1 3 3 Program Basics 1 1 4 4 Program Names 1 2 5 5 Identifiers 1 4 6 6 LABEL Statement 1 4 7 7 Comment 1 5 8 8 Command Statement Format 1 5 ...

Page 20: ......

Page 21: ...mand Blank lines lines with no command will cause an error when the program is executed A line feed on the program s final line creates a blank line so be careful not to do so To increase the program s efficiency processes which are repeated within the program should be written as subroutines or sub procedures which can be called from the main routine Moreover same processing items which occurs in...

Page 22: ...ce programs in response to robot inputs and outputs DI DO MO LO TO SI SO Specify a program name of SEQUENCE to use this function thus creating a pseudo PLC within the controller When the controller is in the AUTO or MANUAL mode a SEQUENCE program can be executed in fixed cycles regardless of the program execution status in response to dedicated DI10 sequence control input input signals with the cy...

Page 23: ...ng the distance between 2 points SUB DISTANCE and obtaining the area AREA which are written as common routines and these are called from separate programs SAMPLE 1 and SAMPLE 2 When SAMPLE1 or SAMPLE2 is executed the SUB DISTANCE A B C and the AREA routine are executed SAMPLE Program name SAMPLE1 X 2 5 Y 1 2 CALL DISTANCE X Y REF C GOSUB AREA PRINT C Z HALT Program name SAMPLE2 X 5 5 Y 0 2 CALL DI...

Page 24: ...e same as a name defined as a system variable Moreover variable name character strings must begin with an alphabetic character For label names however the mark may be immediately followed by a numeric character SAMPLE LOOP SUBROUTINE GET_DATA REFERENCE For details regarding reserved words refer to Chapter 13 1 Reserved word list regarding system variables refer to Chapter 3 9 System Variables 6 LA...

Page 25: ...a single line and arranged in the format shown below The shaded section can be omitted The italic items should be written in the specific format Items surrounded by are selectable The label can be omitted When using a label it must always be preceded by an asterisk and it must end with a colon the colon is unnecessary when a label is written as a branching destination For details regarding labels ...

Page 26: ......

Page 27: ...Chapter 2 Constants 1 1 Outline 2 1 2 2 Numeric constants 2 1 3 3 Character constants 2 2 ...

Page 28: ......

Page 29: ...used 2 Binary constants Unsigned binary numbers of 8 bits or less may be used The prefix B is attached to the number to define it as a binary number Range B0 decimal 0 to B11111111 decimal 255 3 Hexadecimal constants Signed hexadecimal numbers of 32 bits or less may be used The prefix H is attached to the number to define it as a hexadecimal number Range H80000000 decimal 2 147 483 648 to H7FFFFFF...

Page 30: ...arks The character string must not exceed 255 bytes in length and it may contain upper case alphabetic characters numerals special characters or katakana Japanese characters 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: ... 3 3 Variable Names 3 3 4 4 Variable Types 3 4 5 5 Array variables 3 5 6 6 Value Assignments 3 5 7 7 Type Conversions 3 6 8 8 Value Pass Along Reference Pass Along 3 6 9 9 System Variables 3 7 1010Bit Settings 3 17 1111Valid range of variables 3 18 1212Clearing variables 3 19 ...

Page 32: ......

Page 33: ...ariables can be used simply by specifying the variable name and type in the program A declaration is not necessarily required However array variables must be pre defined by a DIM statement Dynamic variables Numeric type Numeric type Character string variables Integer variables Real variables single precision Integer variables Real variables single precision Static variables Input output variables ...

Page 34: ...es Numeric type Integer type variables 2 147 483 648 to 2 147 483 647 Real variables single precision 1 0 1038 to 1 0 1038 Array variables Numeric type Integer array variables 2 147 483 648 to 2 147 483 647 Real array variables single precision 1 0 1038 to 1 0 1038 Character type Character string array variables Alphabetic numeric special character or katakana Japanese character string of 255 byte...

Page 35: ...variable names pre defined variables and user defined function These characters include the following FN DIn DOn MOn LOn TOn SIn SOn Pn Sn Hn n denotes a numeric value SAMPLE COUNT Use is permitted ABS Use is not permitted Reserved word FNAME Use is not permitted FN user defined function S91 Use is not permitted Sn pre defined variable REFERENCE For details regarding reserved words refer to Chapte...

Page 36: ...e ASP_DEF and ASP_DEF are the same variables 4 1 Numeric variables Integer variables Integer variables and integer array elements can handle an integer from 2 147 483 648 to 2 147 483 647 in signed hexadecimal this range is expressed as H80000000 to H7FFFFFFF Examples R1 10 R2 2 R1 10000 Real variables Real variables and real array elements can handle a real number from 1 0 1038 to 1 0 1038 Exampl...

Page 37: ...arding dynamic variables refer to 11 Valid range of variables in this Chapter The length of an array variable that can be declared with the DIM statement depends on the program size Format variable name expression expression expression SAMPLE A 1 Integer array variable DATA 1 10 3 Single precision real array variable 3 dimension array STRING 10 Character array variable 6 Value Assignments An assig...

Page 38: ...long or as a reference pass along Value pass along With this method the variable s value is passed along to the sub procedure Even if this value is changed within the sub procedure the content of the call source variable is not changed A value pass along occurs when the CALL statement s actual argument specifies a constant an expression a variable or an array element array name followed by subscri...

Page 39: ... variable TO mb TOm b For sequence program s timer function Serial input variable SI mb SIm b Serial input signal status Serial output variable SO mb SOm b Serial output signal setting and status Serial word input SIW m Serial input s word information status Serial double word input SID m Serial input s double word information status Serial word output SOW m Serial output s word information status...

Page 40: ...parallel input signals Format 1 DIm b b Format 2 DI 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 Examples A DI1 Input status of ports DI 17 to DI 10 is assigned to variable A 0 to 255 integer can be assigned to A A DI5 7 4 0 Input status of DI 57 DI 54 and DI 50 is assigned to variable A If all...

Page 41: ...ed to variable A If all above signals are 1 ON then A 7 A DO 37 25 20 Output status of DO 37 DO 25 and DO 20 is assigned to variable A If all above signals except DO 20 are 1 ON then A 6 DO3 B Changes to a status in which the DO 37 to DO 30 output can be indicated by B For example if B is 123 If a binary number is used 123 will become 01111011 DO 37 and DO 32 will become 0 and the other bits will ...

Page 42: ... axes 9 to 16 in order from bit 0 Each bit sets to 1 when the axis is in HOLD status and to 0 when not Bit 7 6 5 4 3 2 1 0 Port 30 Port 31 Axis 8 Axis 16 Axis 7 Axis 15 Axis 6 Axis 14 Axis 5 Axis 13 Axis 4 Axis 12 Axis 3 Axis 11 Axis 2 Axis 10 Axis 1 Axis 9 Origin sensor status 0 OFF 1 ON Axis 1 is not connected Port 34 Port 35 Axis 8 Axis 16 Axis 7 Axis 15 Axis 6 Axis 14 Axis 5 Axis 13 Axis 4 Axi...

Page 43: ...the bit definition is omitted in Format 1 bits 0 to 7 are all selected Functions The contents of this variable can be set the status and referred to as needed Of Port 0 bits 0 to 7 respectively correspond to axes 1 to 8 and of port 1 bits 0 to respectively correspond to axes 9 to 16 When this bit is ON movement on the corresponding axis is prohibited Examples A LO0 Arm lock status of LO 07 to LO 0...

Page 44: ... 0 and the prohibition of motion of axis 4 of robot 2 is set by bit 0 of port 1 9 7 Timer output variable This variable is used in the timer function of a sequence program Format 1 TOm b b Format 2 TO mb mb Values m port number 0 1 b bit definition 0 to 7 If the bit definition is omitted in Format 1 bits 0 to 7 are all selected Functions The contents of this variable can be changed and referred to...

Page 45: ...les A SI1 Input status of ports SI 17 to SI 10 is assigned to variable A A SI5 7 4 0 Input status of SI 57 SI 54 and SI 50 is assigned to variable A If all above signals are 1 ON then A 7 A SI 27 15 10 Input status of SI 27 SI 15 and SI 10 is assigned to variable A If all above signals except SI 10 are 1 ON then A 6 WAIT SI 21 1 Waits until SI 21 sets to 1 ON When specifying multiple bits specify ...

Page 46: ... SO 54 and SO 50 is assigned to variable A If all above signals turn 1 ON then A 7 A SO 37 25 20 Output status of SO 37 SO 25 and SO 20 is assigned to variable A If all above signals except SO 25 turn 1 ON then A 5 SO3 B Changes the output status of SO 37 to SO 30 to one indicated by B If B is 123 123 is expressed B01111011 as a binary number that means SO 37 and SO 32 turn 0 OFF the other bits tu...

Page 47: ... actually exist 9 11 Serial double word input This variable indicates the state of the serial input word information as a double word Format SID m Values m port number 2 4 6 8 10 12 14 The acquisition range is 2 147 483 648 H80000000 to 2 147 483 647 H7FFFFFFF Examples A SID 2 The input status from SIW 2 SIW 3 is assigned to variable A A SID 14 The input status from SIW 14 SIW 15 is assigned to va...

Page 48: ...ormation HFF01 will be assigned The information is handled as unsigned word data If a serial port does not actually exist the data is not output externally If a value exceeding the output range is assigned the low order 2 byte information is output 9 13 Serial double word output Output the status of serial output word information in a double word or indicates the output status Format SOD m Values ...

Page 49: ...may also be specified in parentheses Programming example DOm b b b DO mb mb mb Example DO2 7 5 3 Specifies DO 27 DO 25 DO 23 DO 27 25 23 3 Different port multiple bits To specify multiple bits at different ports 2 digit consisting of the port number and the bit number must be specified in parentheses and must be separated by commas Up to 8 bits can be written Programming example DO mb mb mb Exampl...

Page 50: ...ram Local variables Variables are declared within sub procedures and are valid only in these sub procedures For details regarding arrays refer to Chapter 3 5 Array variables A variable declared at the program level can be referenced from a sub procedure without being passed along as a dummy argument by using the SHARED statement for details refer to Chapter 8 111 SHARED 11 2 Valid range of static ...

Page 51: ... AUTO mode When either of the following is initialized by an initialization operation 1 Program memory 2 Entire memory When any of the following online commands was executed RESET INIT PGM INIT MEM INIT ALL When the HALTALL statement was executed in the program HALT statement does not clear dynamic variables 12 2 Clearing static variables In the cases below integer variables and real variables are...

Page 52: ......

Page 53: ...Chapter 4 Expressions and Operations 1 1 Arithmetic operations 4 1 2 2 Character string operations 4 4 3 3 Point data format 4 5 4 4 DI DO conditional expressions 4 6 ...

Page 54: ......

Page 55: ...ision operation Examples A 15 MOD 2 A 1 15 2 7 1 A 17 34 MOD 5 98 A 2 17 5 3 2 1 2 Relational operators Relational operators are used to compare 2 values If the result is true a 1 is obtained If it is false a 0 is obtained Operators Usage Example Meaning A B 1 if A and B are equal 0 if not A B 1 if A and B are unequal 0 if not A B 1 if A is smaller than B 0 if not A B 1 if A is larger than B 0 if ...

Page 56: ... 1 XOR Exclusive OR Becomes 1 when both bits are different EQV Logical equivalence operator Becomes 1 when both bits are equal IMP Logical implication operator Becomes 0 when the first bit is 1 and the second bit is 0 Examples A NOT 13 05 14 is assigned to A reversed after being rounded off to 13 Bit 7 6 5 4 3 2 1 0 13 0 0 0 0 1 1 0 1 NOT 13 14 1 1 1 1 0 0 1 0 Examples A 3 AND 10 2 is assigned to ...

Page 57: ... Subtraction 8 Relational operators 9 NOT Logical NOT 10 AND Logical AND 11 OR XOR Logical OR exclusive OR 12 EQV Logical equivalence 13 IMP Logical implication 1 5 Data format conversion Data format is converted in cases where two values of different formats are involved in the same operation 1 When a real number is assigned to an integer decimal places are rounded off Examples A 125 67 A 126 2 W...

Page 58: ...find out the contents of character strings or to sort character strings into alphabetical order In the case of character strings the comparison is performed from the beginning of each string character by character If all characters match in both strings they are considered to be equal Even if only one character in the string differs from its corresponding character in the other string then the str...

Page 59: ...tesian coordinate format nnn nn to nnnnnnn This is a decimal fraction of a total of 7 digits including 3 or less decimal places Unit mm or degrees When setting an extended hand system flag for SCARA robots set either 1 or 2 at the end of the data If a value other than 1 or 2 is set or if no value is designated 0 will be set to indicate that no hand system flag is set Hand System Data Value RIGHTY ...

Page 60: ...arithmetic operators that may be used with DI DO conditional expressions are shown below Constant Decimal integer constant binary integer constant hexadecimal integer constant Variables Global integer type global real type input output type Operators Relational operators logic operators Operation priority 1 Relational operators 2 NOT 3 AND 4 OR XOR Examples WAIT DI 31 1 OR DI 34 1 The program wait...

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

Page 62: ......

Page 63: ... Robot 1 4 axes Robot 1 4 axes robot 2 4 axes when using the YC LINK E option Robot 1 4 axes robot 2 4 axes robot 3 4 axes robot 4 4 axes when using the YC LINK E option Each robot consists of normal axes and auxiliary axes When using one robot without auxiliary axes the setting is made only to normal axes Main group Robot 1 normal axis Number of axes 4 1 For robot 1 2 For 1 robot with no auxiliar...

Page 64: ...SERVO Coordinate control CHANGE LEFTY RIGHTY HAND PATH SHIFT Status change ACCEL ARCHP2 ARMTYP AXWGHT MSPEED OUTPOS TOLE ARCHP1 ARMSEL ASPEED DECEL ORGORD SPEED WEIGHT Point operation JTOXY XYTOJ WHERE WHRXY Parameter reference ACCEL ARCHP2 AXWGHT ORGORD TOLE ARCHP1 ARMTYP DECEL OUTPOS WEIGHT Status reference ABSRPOS ARMSEL CURTQST MCHREF WHRXY ARMCND ARMTYP CURTRQ WHERE Torque control TORQUE TRQT...

Page 65: ...Chapter 6 Multi tasking 1 1 Outline 6 1 2 2 Task definition method 6 1 3 3 Task status and transition 6 2 4 4 Multi task program example 6 8 5 5 Sharing the data 6 8 6 6 Cautionary Items 6 9 ...

Page 66: ......

Page 67: ...nd executed in their priority order higher priority tasks are executed first The priority level can be set to any level between 1 and 64 Smaller values have higher priority and larger values have lower priority High priority 1 64 low priority 2 Task definition method A task is a set of instructions which are executed as a single sequence As explained below a task is defined by assigning a label to...

Page 68: ...ith the smallest number among the tasks yet to be started is automatically specified For details regarding the START command refer to 123 START in Chapter 8 When the LOAD command is executed a specified program is registered in the task and placed in a STOP status For details of the LOAD command refer to 1 Register task of 2 1 Program operations in Chapter 12 If another program is already register...

Page 69: ...k 1 Task 3 Task 1 Task 4 Task 5 Task 2 Ready queue 1 Ready queue 2 Ready queue 3 Order in which tasks are put in READY status The head of the task with the highest priority is put in RUN status High Low 32 33 34 Priority level Task scheduling 33602 R7 00 A RUN status task will be moved to the end of the ready queue if placed in a READY status by any of the following causes 1 A WAIT status command ...

Page 70: ...ver if the task put in the READY status was at the head of the ready queue with the highest priority the following transition takes place 1 Task that is currently in RUN status READY status 2 Task at the head of the ready queue with higher priority RUN status In the above MOVE statement example the task is moved to the end of the ready queue Then when a MOVE COMPLETED reply is received this task i...

Page 71: ...Y RUN SUSPEND SUSPEND Task 3 READY Task 3 READY The task is placed in a SUSPEND status and is removed from the ready queue 33604 R7 00 3 5 Restarting tasks RESTART Tasks in the SUSPEND status can be restarted with the RESTART command When the RESTART command is executed the status transition takes place as follows Task for which the RESTART command was executed RUN status Specified task READY stat...

Page 72: ...sk 4 READY Task 4 READY The task is placed in a NON EXISTENT status and is removed from a ready queue 33606 R7 00 Other task delete CUT Tasks can also delete the other tasks and put in the NON EXISTENT no task registration status by using the CUT command When the CUT command is executed the status transition takes place as follows Task that executed the CUT command RUN Specified task NON EXISTENT ...

Page 73: ...ssed or the interlock signal is cut off Just as in the case where the HOLD command is executed all tasks are put in the STOP status When the program is restarted the tasks in the STOP status set to the READY status or the task is placed the SUSPEND status after being placed in the READY status 4 When the emergency stop button on the programming box is pressed or the emergency stop signal is cut of...

Page 74: ...SUB_TSK3 TASK3 Task 3 begins here ST3 IF DI 21 0 THEN ST3 IF DI 30 0 THEN ST3 IF DI 33 0 THEN ST3 MO 21 1 EXIT TASK Ends here 5 Sharing the data All global variables static variables input output variables point data shift coordinate definition data hand definition data and pallet definition data are shared between all tasks Execution of each task can be controlled while using the same variables a...

Page 75: ...erefore in order to properly execute the program the subtask priority level must be set higher than that of the main task This prevents a task transition condition from occurring during execution of the EXIT TASK command In the sample program shown below the priority level of task 1 main task is set as 32 and the priority level of task 2 is set as 31 the lower the value the higher the priority SAM...

Page 76: ......

Page 77: ...Chapter 7 Sequence function 1 1 Sequence function 7 1 2 2 Creating a sequence program 7 1 3 3 Executing a sequence program 7 4 4 4 Programming a sequence program 7 5 ...

Page 78: ......

Page 79: ...e program in this Chapter General purpose outputs are not reset by the program reset while the sequence function is running In the manner shown below the reset of general purpose output can be set while the sequence program compile Set a sequence flag value of the controller parameter at 3 Select Output Reset Enable on the sequence execution flag dialogue in the support software SCARA YRCX Studio ...

Page 80: ...new program and press Close 34705 R9 00 Step 6 Input a program on PROGRAM SELECTION screen Although usable commands are resricted editing method is same as the standard robot program Commands which can be input are explained at 4 Programming a sequence program in this Chapter 34706 R9 00 Creating new program Step 3 Program selection Step 4 NOTE When creating a new p r o g r a m t h e a l a r m occ...

Page 81: ...iling ends without any error the display returns to the PROGRAM SELECTION screen and the letter s appears in Flag This means that the sequence program has been compiled successfully and is ready for use 34709 R9 00 The sequence execution program is erased and the Flag s letter s disappears in the following cases In these cases the sequence function cannot be used 1 When the sequence program was er...

Page 82: ...to the YRCX operator s manual 3 The external sequence control input DI10 contact is ON Sequence program execution in progress Indicated during execution 34710 R9 00 3 1 Sequence program STEP execution The sequence program may be executed line by line while checking one command line at a time This step execution can be executed in the same way as normal programs For details refer to the YRCX operat...

Page 83: ... Timer output variables Serial input output variable The logic operation expression shown above 4 2 Input output variables Each variable must be specified in a 1 bit format Correct examples DO 35 MO 24 DI 16 Incorrect examples DO 37 24 DI3 4 MO3 4 2 1 Input variables Parallel input variables Format DI mb m Port number 0 to 7 10 to 17 20 to 27 b bit definition 0 to 7 These variables show the status...

Page 84: ...not be controlled Arm lock output variables Format LO mb m port number 0 1 b bit definition 0 to 7 These variables are used to prohibit the arm axis movement Movement is prohibited when ON LO 00 to LO 07 corresponds to arm 1 to arm 8 LO 10 to LO 17 corresponds to arm 9 to arm 16 respectively Timer output variables Format TO mb m port number 0 1 b bit definition 0 to 7 There are a total of 16 timer...

Page 85: ...efinition statement sets the timer value of the timer output variable This definition statement may be anywhere in the program When the timer definition statement is omitted the timer setting value of the variable is 0 TIM00 to 17 correspond to the timer output variables TO 00 to 17 However since the units are set every 100ms values less than 99ms are truncated 4 4 Logical operators Operators Func...

Page 86: ...he first parenthesis or on the left of an expression For example the following commands cannot be used DO 21 DI 30 DI 32 DO 30 DI 22 DI 27 Numeric values cannot be assigned on the right of an expression MO 35 1 DO 26 0 There is no need to define a HALT or HOLD statement at the end of the program The variables used in sequence programs are shared with robot programs so be careful not to make improp...

Page 87: ...ic 8 7 Functions in alphabetic order 8 13 Functions operation specific 8 16 1 1 ABS 8 18 2 2 ABSRPOS 8 19 3 3 ACCEL 8 20 4 4 ARCHP1 ARCHP2 8 21 5 5 ARMCND 8 23 6 6 ARMSEL 8 24 7 7 ARMTYP 8 25 8 8 ASPEED 8 26 9 9 ATN ATN2 8 27 10 10 AXWGHT 8 28 11 11 CALL 8 29 12 12 CHANGE 8 30 13 13 CHGPRI 8 31 14 14 CHR 8 32 15 15 CLOSE 8 33 ...

Page 88: ... 46 29 29 DRIVE 8 48 30 30 DRIVEI 8 52 31 31 END SELECT 8 57 32 32 END SUB 8 58 33 33 ERR ERL 8 59 34 34 ETHSTS 8 60 35 35 EXIT FOR 8 61 36 36 EXIT SUB 8 62 37 37 EXIT TASK 8 63 38 38 FOR to NEXT 8 64 39 39 GEPSTS 8 65 40 40 GOSUB to RETURN 8 66 41 41 GOTO 8 67 42 42 HALT 8 68 43 43 HALTALL 8 69 44 44 HAND 8 70 45 45 HOLD 8 73 46 46 HOLDALL 8 74 47 47 IF 8 75 48 48 INPUT 8 77 49 49 INT 8 79 50 50 ...

Page 89: ...MOVET 8 122 65 65 MTRDUTY 8 132 66 66 OFFLINE 8 133 67 67 ON ERROR GOTO 8 134 68 68 ON to GOSUB 8 135 69 69 ON to GOTO 8 136 70 70 ONLINE 8 137 71 71 OPEN 8 138 72 72 ORD 8 139 73 73 ORGORD 8 140 74 74 ORIGIN 8 141 75 75 OUT 8 142 76 76 OUTPOS 8 143 77 77 PATH 8 145 78 78 PATH END 8 151 79 79 PATH SET 8 152 80 80 PATH START 8 155 81 81 PDEF 8 159 82 82 PGMTSK 8 160 83 83 PGN 8 161 84 84 PMOVE 8 16...

Page 90: ...3 98 98 RESTART 8 184 99 99 RESUME 8 185 100 100RETURN 8 186 101 101RIGHT 8 187 102 102RIGHTY 8 188 103 103RSHIFT 8 189 104 104SELECT CASE to END SELECT 8 190 105 105SEND 8 191 106 106SERVO 8 193 107 107SET 8 194 108 108SETGEP 8 195 109 109SGI 8 196 110 110SGR 8 197 111 111SHARED 8 198 112 112SHIFT 8 199 113 113SI 8 200 114 114SID 8 201 115 115SIN 8 202 116 116SIW 8 203 117 117Sn 8 204 118 118SO 8...

Page 91: ... 127SWI 8 216 128 128TAN 8 217 129 129TCOUNTER 8 218 130 130TIME 8 219 131 131TIMER 8 220 132 132TO 8 221 133 133TOLE 8 222 134 134TORQUE 8 223 135 135TSKPGM 8 225 136 136VAL 8 226 137 137WAIT 8 227 138 138WAIT ARM 8 228 139 139WEIGHT 8 229 140 140WEND 8 230 141 141WHERE 8 231 142 142WHILE to WEND 8 232 143 143WHRXY 8 233 144 144XYTOJ 8 234 ...

Page 92: ......

Page 93: ...sing comma to separate Array subscripts can be 0 to a specified value with their total number being the A 9 300 Memory full error may occur depending on the size of each dimension in an array SAMPLE DIM A 10 D e f i n e s a i n t e g e r a r r a y variable A 0 to A 10 Number of elements 11 DIM B 2 3 4 Defines a real array variable B 0 0 0 to B 2 3 4 Number of elements 60 DIM C 2 2 D 10 Defines an ...

Page 94: ...Command Function C 11 CALL Calls a sub procedure Command 12 CHANGE Switches the hand of a specified robot 3 Command 13 CHGPRI Changes the priority ranking of a specified task 3 Command 14 CHR Acquires a character with the specified character code 3 Function 15 CLOSE Close the specified General Ethernet Port 3 Command 16 COS Acquires the cosine value of a specified value 3 Function 17 CURTQST Acqui...

Page 95: ... and performs a reset Command 43 HALTALL Stops and resets all programs Command 44 HAND Defines the hand of a specified robot 3 Command 45 HOLD Temporarily stops the program Command 46 HOLDALL Temporarily stops all programs Command I 47 IF Allows control flow to branch according to conditions Command 48 INPUT Assigns a value to a variable specified from the programming box 3 Command 49 INT Acquires...

Page 96: ...ine Command 69 ON to GOTO Jumps to label specified lines in accordance with the conditions Command 70 ONLINE Sets the specified communication port to the online mode 3 Command 71 OPEN Opens the specified General Ethernet Port 3 Command 72 ORD Acquires the character code of the first character in a specified character string 3 Function 73 ORGORD Specifies acquires the axis sequence parameter for pe...

Page 97: ...Function S 104 SELECT CASE to END SELECT Allows control flow to branch according to conditions Command 105 SEND Sends a file 3 Command 106 SERVO Controls the servo ON OFF of a specified axis or all axes of a specified robot 3 Command 107 SET Turns the bit at the specified output port ON Command 108 SETGEP Sets the General Ethernet Port 3 Command 109 SGI Assigns the value to a specified integer typ...

Page 98: ...quires the TO status 3 Command Function 133 TOLE Specifies acquires the tolerance parameter of a specified robot 3 Command Function 134 TORQUE Specifies acquires the maximum torque command value which can be set for a specified axis of a specified robot 3 Command Function 135 TSKPGM Acquires the program number which is registered in a specified task 3 Function V 136 VAL Converts the numeric value ...

Page 99: ...lue to degrees DEGRAD 3 Function 103 RSHIFT Shifts a value to the right by the specified bit count LSHIFT 3 Function 115 SIN Acquires the sine value for a specified value 3 Function 122 SQR Acquires the square root of a specified value 3 Function 128 TAN Acquires the tangent value for a specified value 3 Function Date time No Command Description Online Type 20 DATE Acquires the date as a yy mm dd ...

Page 100: ...llet definition number and pallet position number 3 Function 102 RIGHTY Sets the hand system of a specified robot to the right handed system 3 Command 117 Sn Defines the shift coordinates within the program 3 Command 112 SHIFT Sets the shift coordinate for a specified robot by using the shift data specified by a shift variable 3 Command 144 XYTOJ Converts the point variable Cartesian coordinate da...

Page 101: ...r in which a specified program is registered 3 Function 83 PGN Acquires the program number from a specified program name 3 Function 109 SGI Assigns acquires the value to a specified integer type static variable 3 Command Function 110 SGR Assigns acquires the value to a specified real type static variable 3 Command Function 127 SWI Switches the program being executed then begins execution from the ...

Page 102: ... Function 6 ARMSEL Specifies acquires the current hand system setting of a specified robot 3 Command Function 7 ARMTYP Specifies acquires the hand system setting of a specified robot 3 Command Function 17 CURTQST Acquires the current torque value ratio of a specified axis to the rated torque 3 Function 58 MCHREF Acquires the return to origin or absolute search machine reference value for specified...

Page 103: ... PSHJGSP Specifies acquires the push judge speed threshold parameter 3 Command Function 90 PSHMTD Specifies acquires the push method parameter 3 Command Function 102 RIGHTY Sets the hand system of a specified robot to the right handed system 3 Command 108 SETGEP Sets the General Ethernet Port 3 Command 121 SPEED Changes the program movement speed of a specified robot 3 Command 133 TOLE Specifies a...

Page 104: ...6 SIW Acquires a specified serial input s word information status 3 Function 108 SO Outputs a specified value to the SO port or acquires the SO status 3 Command Function 119 SOD Outputs a specified serial output s double word information or acquires the output status 3 Command Function 120 SOW Outputs a specified serial output s word information or acquires the output status 3 Command Function 132...

Page 105: ...ng function Acquires a character with the specified character code 16 COS Arithmetic function Acquires the cosine value of a specified value 17 CURTQST Arithmetic function Acquires the current torque value ratio of a specified axis to the rated torque 18 CURTRQ Arithmetic function Acquires the current torque value of the specified axis of a specified robot D 19 DATE Character string function Acqui...

Page 106: ... Push force parameter 89 PSHJGSP Arithmetic function Acquires the push judge speed threshold parameter 90 PSHMTD Arithmetic function Acquires the push method parameter 91 PSHRSLT Arithmetic function Acquires the status at the end of the PUSH statement 92 PSHSPD Arithmetic function Acquires the push speed parameter 93 PSHTIME Arithmetic function Acquires the push time parameter R 95 RADDEG Arithmet...

Page 107: ...t 135 TSKPGM Arithmetic function Acquires the program number which is registered in a specified task V 136 VAL Arithmetic function Converts the numeric value of a specified character string to an actual numeric value STR W 139 WEIGHT Arithmetic function Acquires the tip weight parameter of a specified robot 141 WHERE Point function Reads out the current position of the arm of a specified robot in ...

Page 108: ...nd system setting of a specified robot 10 AXWGHT Acquires the axis tip weight parameter of a specified robot 17 CURTQST Acquires the current torque value ratio of a specified axis to the rated torque 18 CURTRQ Acquires the current torque value of the specified axis of a specified robot 21 DECEL Acquires the deceleration rate parameter of a specified robot 53 LEN Acquires the length byte count of a...

Page 109: ...ecified value 136 VAL Converts the numeric value of a specified character string to an actual numeric value STR Character string calculation related functions No Function name Description 14 CHR Acquires a character with the specified character code 20 DATE Acquires the date as a yy mm dd format character string 51 LEFT Extracts a character string comprising a specified number of digits from the l...

Page 110: ...pter 8 Robot Language Lists 1 ABS Acquires absolute values Format ABS expression Explanation Returns a value specified by an expression as an absolute value SAMPLE A ABS 326 55 The absolute value of 362 54 362 54 is assigned to variable A ...

Page 111: ...ation Acquires the machine reference value of axes specified by an axis number This function is valid only for axes whose return to origin method is set as Mark not for Sensor or Stroke end At axes where return to origin method is set to mark method absolute reset is possible when the machine reference value is in a 44 to 56 range SAMPLE A ABSRPOS 4 The machine reference value for axis 4 of robot ...

Page 112: ... change occurs at the axis specified in axis number Functions Format ACCEL robot number axis number Values robot number 1 to 4 If not input robot 1 is specified axis number 1 to 6 Explanation The acceleration coefficient parameter value is acquired for the axis specified by the axis number among the robot axes specified by the robot number SAMPLE A 50 ACCEL A The acceleration coefficient of all ax...

Page 113: ...HP2 corresponds to the arch position 2 parameter respectively Changes the parameter s arch position to the value indicated in the expression Format 1 changes all axes specified by robot number Format 2 changes the only axis specified by axis number to the value indicated in the expression Functions Format ARCHP1 robot number axis number Format ARCHP2 robot number axis number Values robot number 1 ...

Page 114: ...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 FOR B 1 TO 4 SAV B 1 ARCHP1 B The arch position parameters ARCHP1 1 to 4 are assigned to array variables SAV 0 to 3 NEXT ...

Page 115: ...function acquires the current arm status of the SCARA robot The robot to acquire an arm status is specified by the robot number The arm status is 1 for a right handed system and 2 for a left handed system SAMPLE A ARMCND The current arm status of robot 1 is assigned to variable A IF A 1 THEN Right handed system status MOVE P P100 Z 0 ELSE Left handed system status MOVE P P200 Z 0 ENDIF ...

Page 116: ...e left handed system for the hand system selection of the robot 2 Functions Format ARMSEL robot number Values robot number 1 to 4 If not input robot 1 is specified Explanation This function acquires the hand system currently selected for the SCARA robot The robot to acquire a hand system is specified by the robot number The arm type is 1 for a right handed system and 2 for a left handed system SAM...

Page 117: ...TYP 2 2 Sets the left handed system for the hand system of the robot 2 Functions Format ARMTYP robot number Values robot number 1 to 4 If not input robot 1 is specified Explanation This function provides the hand system at program reset of the SCARA robot The robot to acquire a hand system is specified by the robot number The arm type is 1 for a right handed system and 2 for a left handed system S...

Page 118: ...movement speed x program movement speed Example Automatic movement speed 80 Program movement speed 50 Movement speed 40 80 50 Functions Format ASPEED robot number Values robot number 1 to 4 If not input robot 1 is specified Explanation Acquires the automatic movement speed value of the robot specified by the robot number SAMPLE SPEED 70 ASPEED 100 MOVE P P0 Movement from the current position to P0...

Page 119: ...n 1 and expression 2 X Y coordinates The acquired values are radians within the following range π to π SAMPLE A 0 A ATN Y X The product of the expression Y X arctangent value and variable A is assigned to array A 0 A 0 ATN 0 5 The 0 5 arctangent value is assigned to array A 0 A 0 ATN2 B C D T h e d i f f e r e n c e b e t w e e n t h e X Y coordinates B C arctangent value and variable D is assigne...

Page 120: ... in systems with MULTI axes and auxiliary axes the robot type and auxiliary axes are factory set prior to shipment Functions Format AXWGHT 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 axis tip weight parameter value for the specified axis This statement is valid in systems with MULTI axes and auxiliary axes SAMPLE...

Page 121: ...mands which use stacks such as an FOR or GOSUB statement are used or depending on the use status of identifiers Always use the END SUB or EXT SUB statement to end a sub procedure which has been called with the CALL statement If another statement such as GOTO is used to jump out of the sub routine a 5 212 Stack overflow error etc may occur SAMPLE 1 X 4 Y 5 CALL COMPARE REF X REF Y HALT SUB ROUTINE ...

Page 122: ...abled Before hand switching can occur the hands must be defined at the HAND statement the programming box or the SCARA YRCX Studio For details refer to section 44 HAND If the hand data with another robot setting is specified 6 258 Illegal robot no error occurs SAMPLE HAND H1 0 150 000 0 000 HAND H2 5000 20 0000 0 000 P1 150 000 300 000 0 000 0 000 0 000 0 000 CHANGE H2 Changes the hand of the robo...

Page 123: ...p The smaller the priority number the higher the priority high priority 1 low priority 64 When a READY status occurs at a task with higher priority all tasks with lower priority also remain in a READY status SAMPLE START SUB_PGM T2 33 ST MOVE P P0 P1 IF DI 20 1 THEN CHGPRI T2 32 ELSE CHGPRI T2 33 ENDIF GOTO ST HALTALL Program name SUB_PGM SUBTASK ROUTINE SUBTASK IF LOC3 WHERE 10000 THEN DO 20 1 GO...

Page 124: ...haracter 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 expression value is outside the 0 to 255 range SAMPLE A CHR 65 A is assigned to A Related commands ORD ...

Page 125: ...unication port of the specified General Ethernet Port SAMPLE OPEN GP1 Opens the General Ethernet Port 1 SEND 123 TO GP1 Sends the character strings 123 from the General Ethernet Port 1 SEND GP1 TO A Receives the data from the General Ethernet Port 1 and Saves the received data in the variable A CLOSE GP1 Closes the General Ethernet Port 1 Related commands OPEN SEND SETGEP GEPSTS ...

Page 126: ... COS expression Values expression Angle units radians Explanation Acquires a cosine value for the expression 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 A 1 COS DEGRAD 20 The 20 0 cosine value is assigned to array A 1 Related commands ATN DEGRAD RADDEG SIN TAN ...

Page 127: ...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 The value is expressed as a percentage of the rated torque value Plus minus signs indicate the direction SAMPLE A CURTQST 3 The current torque value against the rated torque of the axis 3 of robot 1 is assigned to variable A ...

Page 128: ...ot 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 expression The value is expressed as a percentage of the maximum torque command value Plus minus signs indicate the direction SAMPLE A CURTRQ 3 The current torque value of the axis 3 of robot 1 is assigned to variable A ...

Page 129: ... task can be specified by the name or the number of a program in execution This statement cannot terminate its own task If a task program not active is specified for the execution an error occurs SAMPLE TASK1 ROUTINE ST MO 20 0 START SUB_PGM T2 MOVE P P0 MOVE P P1 WAIT MO 20 1 CUT T2 GOTO ST HALTALL Program name SUB_PGM TASK2 ROUTINE SUBTASK2 P100 JTOXY WHERE IF LOC3 P100 100 0 THEN MO 20 1 ELSE D...

Page 130: ...ate 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 HALT Related commands TIME ...

Page 131: ...changed by using the ACCEL statement Functions Format DECEL 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 deceleration rate parameter value for the specified axis SAMPLE A 50 DECEL A Specifies 50 in the deceleration r a t e p a r a m e t e r f o r all axes of robot 1 DECEL 3 100 Specifies 100 as the deceleration ra...

Page 132: ...same name in the program When calling a function that uses a dummy argument specify the constant variable or expression type which is the same as the dummy argument type The dummy argument can be omitted If dummy arguments are the same type the difference of variable names does not affect If a variable used in the function definition expression is not included in the dummy argument list the curren...

Page 133: ...RAD expression Values expression Angle units degrees Explanation The expression value is converted to radians To convert radians to degrees use RADDEG SAMPLE A COS DEGRAD 30 A cosine value which is converted 30 to radians is assigned to variable A Related commands ATN COS RADDEG SIN TAN MEMO ...

Page 134: ...or 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 expression The minimum wait period is 1ms SAMPLE DELAY 3500 3 500ms 3 5 secs wait A 50 DELAY A 10 500ms 0 5 secs wait ...

Page 135: ...he left in descending order high to low Explanation Indicates the parallel input signal status Enter 0 if no input port exists SAMPLE A DI2 The input status from DI 27 to DI 20 is assigned to variable A A DI5 7 4 0 The DI 57 DI 54 DI 50 input status is assigned to variable A when all the above signals are 1 ON A 7 A DI 37 25 20 The DI 37 DI 25 DI 20 input status is assigned to variable A when all ...

Page 136: ... dimensions may be used for the array subscripts Multiple arrays can be declared in a single line by using comma breakpoints to separate the arrays The total number of array elements is constant 1 A 9 300 Memory full error may occur depending on the size of each dimension defined in an array SAMPLE DIM A 10 Defines a integer array variable A 0 to A 10 Number of elements 11 DIM B 2 3 4 Defines a re...

Page 137: ...n 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 point expression 1 and point expression 2 An error occurs if the 2 points specified by each point expression do not have Cartesian coordinates SAMPLE A DIST P0 P1 The distance between P0 and P1 is assigned to variable A ...

Page 138: ...order high to low Explanation Outputs the specified value to the DO port No output will occur if a nonexistent DO port is specified Outputs are not possible to DO0 and DO1 These ports are for referencing only SAMPLE DO2 B10111000 DO 27 25 24 23 are turned ON and DO 26 22 21 20 are turned OFF DO2 6 5 1 B010 DO 25 are turned ON and DO 26 21 are turned OFF DO3 15 DO 33 32 31 30 are turned ON and DO 3...

Page 139: ...order high to low Explanation References the parallel port signal status SAMPLE A DO2 Output status of ports DO 27 to DO 20 is assigned to variable A A DO0 6 5 1 Output status of DO 06 DO 05 and DO 01 is assigned to variable A If all above signals are 1 ON then A 7 A DO 37 35 27 10 O u t p u t s t a t u s o f D 0 3 7 D O 3 5 D O 2 7 a n d D 0 1 0 i s a s s i g n e d t o v a r i a b l e A If all ab...

Page 140: ...or more axes are specified they will reach their target positions simultaneously If the next command following the DRIVE command is an executable command such as a signal output command that next command will start when the movement axis enters the OUT position range In other words that next command starts before the axis arrives within the target position tolerance range Example Signal output DO ...

Page 141: ...sition to the position specified by P0 Point data setting types Direct numeric value input The target posotion is specified directly in expression If the numeric value is an integer this is interpreted as pulse units If the numeric value is a real number this is interpreted as mm degrees units and each axis will move from the 0 pulse position to a pulse converted position However when using the op...

Page 142: ...eg sec automatic movement speed value of expression This option is enabled only for the specified DRIVE statement SAMPLE DRIVE 2 1 10000 S 10 Axis 1 of robot 2 moves from its current position to the 10000 pulses position at 10 of the automatic movement speed Format 1 DSPEED expression 2 DS expression Values expression 0 01 to 100 00 units Explanation The axis movement speed is specified in express...

Page 143: ...hen the conditional expression used to designate the STOPON condition is a numeric expression expression value other than 0 indicates a TRUE status and 0 indicates a FALSE status XY setting Format XY Explanation Moves multiple specified axes to a position specified by Cartesian coordinates All the specified axes arrive at the target position at the same time If all axes which can be moved by MOVE ...

Page 144: ...axis PTP movement begins after positioning of all axes specified at axis number is complete within the tolerance range and the command terminates when the specified axes enter the OUT position range When two or more axes are specified they will reach their target positions simultaneously If the next command following the DRIVEI command is an executable command such as a signal output command that ...

Page 145: ...T ARM HOLD DRIVEI 1 P1 HOLD Tolerance OUT position Target position HOLD execution program temporarily stops 33820 R7 00 Limitless motion related cautions When the limitless motion parameter is enabled the DRIVEI statement soft limit check values are as follows Plus direction soft limit 99 999 999 pulse Minus direction soft limit 99 999 999 pulse When using the DRIVEI statement the above values rep...

Page 146: ... 4 is a rotating axis Point definition Point data is specified in expression The axis data specified by the axis number is used From its current position the axis moves the distance specified by the point in a relative manner If the point expression is in mm degrees units movement for each axis occurs from the 0 pulse position to the pulse converted position SAMPLE DRIVEI 1 P1 The axis 1 of robot ...

Page 147: ... Format 1 DSPEED expression 2 DS expression Values expression 0 01 to 100 00 units Explanation The axis movement speed is specified as an expression The actual speed is determined as shown below Robot s max speed mm sec or deg sec axis movement speed This option is enabled only for the specified DRIVEI statement Movement always occurs at the DSPEED expression value without being affected by the au...

Page 148: ...onditions are satisfied If the conditions are already satisfied before movement begins no movement occurs and the command is terminated This option is enabled only by program execution When the conditional expression used to designate the STOPON condition is a numeric expression expression value other than 0 indicates a TRUE status and 0 indicates a FALSE status SAMPLE DRIVEI 1 10000 STOPON DI 20 ...

Page 149: ...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 SAMPLE WHILE 1 SELECT CASE DI3 CASE 1 2 3 CALL EXEC 1 10 CASE 4 5 6 7 8 9 10 CALL EXEC 11 20 CASE ELSE CALL EXEC 21 30 END SELECT WEND HALT Related commands SELECT CASE ...

Page 150: ...mat 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 I 1 CALL TEST PRINT I HALT SUB ROUTINE TEST SUB TEST I 50 END SUB Related commands CALL EXIT SUB SUB to END SUB ...

Page 151: ...lanation Variables ERR and ERL are used in error processing routines specified by the ON ERROR GOTO statement ERR of the task specified by the task number gives the error code of the error that has occurred and ERL gives the line number in which the error occurred SAMPLE 1 IF ERR 1 H604 THEN HALT IF ERL 1 20 THEN RESUME NEXT Related commands ON ERROR GOTO RESUME ...

Page 152: ...on Acquires the Ethernet port status 2 1 0 1 2 Ethernet port is not opened yet LAN cable is not connected The connection is not established The connection is established The connection is established the data is stored in the reception buffer SAMPLE A ETHSTS A s s i g n s t h e t h e E t h e r n e t p o r t status to the variable A ...

Page 153: ...alid only between the FOR to NEXT statements The FOR to NEXT statement loop will end when the FOR statement condition is satisfied or when the EXIT FOR statement is executed A 5 212 Stack overflow error etc will occur if another statement such as GOTO is used to jump out of the loop SAMPLE ST WAIT DI 20 1 FOR A 101 TO 109 MOVE P P100 Z 0 DO 20 1 MOVE P P A Z 0 DO 20 0 IF DI 20 0 THEN EXIT FOR NEXT...

Page 154: ...at called up the sub procedure This statement is valid only within the sub procedure defined by the SUB to END SUB statements To end the sub procedure defined by the SUB to END SUB statements use the END SUB statement or EXIT SUB statement A 5 212 Stack overflow error etc will occur if another statement such as GOTO is used to jump out of the loop SAMPLE MAIN ROUTINE CALL SORT2 REF X REF Y HALT SU...

Page 155: ...ates its own task which is currently being executed SAMPLE TASK1 ROUTINE ST MO 20 0 START SUB_PGM 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 MO 20 1 EXIT TASK ENDIF DELAY 100 GOTO SUBPTASK2 EXIT TASK Related commands CUT RESTART START SUSPEND CHGPRI ...

Page 156: ...epeatedly execute commands between the FOR to NEXT statements for the start value to end value number of times while changing the control variable value in steps specified by STEP If STEP is omitted its value becomes 1 The STEP value may be either positive or negative The control variable must be a numeric simple variable or array variable The FOR and NEXT statements are always used as a set SAMPL...

Page 157: ...s established 2 The connection is established the data is stored in the reception buffer SAMPLE OPEN GP1 Opens the port which is specified at the General Ethernet port 1 IF GEPSTS 1 0 THEN C o n f i r m s i f t h e c o n n e c t i o n i s established SEND ABC TO GP1 Sends the character string 123 IF GEPSTS 1 2 THEN Confirms if the data is stored in the reception buffer SEND GP1 TO RET Receives the...

Page 158: ...can be used up to 120 times in succession Note that this number of times is reduced if commands containing a stack such as an FOR statement or CALL statement are used When a jump to a subroutine was made with the GOSUB statement always use the RETURN statement to end the subroutine If another statement such as GOTO is used to jump out of the subroutine an error such as 5 212 Stack overflow may occ...

Page 159: ... 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 label SAMPLE MAIN ROUTINE ST MOVE P P0 P1 IF DI 20 1 THEN GOTO FIN ENDIF GOTO ST FIN HALT ...

Page 160: ... movement commands such as MOVE and DRIVE the next line s command is executed when the axis enters the OUT position range Therefore if a HALT command exists immediately after a PTP movement command that HALT command is executed before the axis arrives in the target position tolerance range Likewise when specifying CONT options in interpolation movement during MOVE L or C command the next command i...

Page 161: ...T MOVE P P0 P1 IF DI 20 1 THEN GOTO FIN ENDIF GOTO ST FIN HALT PROGRAM FIN In PTP movement specified by movement commands such as MOVE and DRIVE the next line s command is executed when the axis enters the OUT position range Therefore if a HALTALL command exists immediately after a PTP movement command that HALTALL command is executed before the axis arrives in the target position tolerance range ...

Page 162: ...wer OFF occurs during execution of the hand definition statement the 9 707 Hand data destroyed error may occur If specifying the hand data that was defined by specifying other robots in the CHANGE statement 6 258 Illegal robot no error may occur 44 1 For SCARA Robots 1 When the 4th parameter R is not specified Hands installed on the second arm tip are selected see below 1st parameter Number of off...

Page 163: ... P1 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 Hand of robot 1 changes to hand 1 MOVE P P1 Tip of hand 1 of robot 1 moves to P1 HALT Y X Hand 2 150 00 300 00 Hand 1 X Y 150 00 300 00 SAMPLE HAND 33802 R7 00 ...

Page 164: ... system indicates the counterclockwise direction degree 2nd parameter Length of hand n mm 0 3rd parameter Z axis offset amount for hand n mm Standard 2nd arm 150 00mm 100 00mm Hand 2 Hand 1 X Y 90 00 deg 33804 R9 00 SAMPLE HAND H1 0 00 150 0 0 0 R HAND H2 90 00 100 00 0 0 R P1 150 00 300 00 0 00 0 00 0 00 0 00 CHANGE H1 Hand of robot 1 changes to hand 1 MOVE P P1 Tip of hand 1 moves to P1 CHANGE H...

Page 165: ...when the axis enters the effective OUT position range Therefore if a HOLD command exists immediately after a PTP movement command that HOLD command is executed before the axis arrives in the target position tolerance range Likewise when specifying CONT options in interpolation movement during MOVE L or C command the next command is executed immediately after movement starts Therefore if a HOLD com...

Page 166: ...d when the axis enters the effective OUT position range Therefore if a HOLDALL command exists immediately after a PTP movement command that HOLDALL command is executed before the axis arrives in the target position tolerance range Likewise when specifying CONT options in interpolation movement during MOVE L or C command the next command is executed immediately after movement starts Therefore if a ...

Page 167: ...ssion is not met false the following processing occurs 1 Processing either jumps to the label 2 specified after the ELSE statement or to the next line after command statement 2 is executed 2 If nothing is specified after the ELSE statement no action is taken and processing simply jumps to the next line When the conditional expression used to designate the IF statement condition is a numeric expres...

Page 168: ...ps to the next line after ENDIF When an ELSEIF statement is present and the condition specified by conditional expression 2 is met true the instructions specified in command block 2 are executed If all the conditions specified by the conditional expression are not met false command block n is executed When the conditional expression used to designate the IF statement condition is a numeric express...

Page 169: ...f only the ENTER key is pressed without making any entry the program interprets this as a 0 or null string input However if specifying two or more variables a comma must be used to separate them 6 If the specified variable is a character type and a significant space is to be entered before and after a comma double quotation mark or character string the character string must be enclosed in double q...

Page 170: ...ogramming box etc and converts the enterered character string to a real number and assigns to variable A INPUT INPUT STRING B 0 B 1 Displays INPUT STRING on a prompt of programming box etc If commas are contained in the enterered character string the first character string is assigned to 0 element of the array variable B and the second character string is assigned to its 1 element INPUT P100 Assig...

Page 171: ... 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 expression value is acquired SAMPLE A INT A 0 B INT 1 233 2 is assigned to B ...

Page 172: ...bot number 1 to 4 If not input robot 1 is specified Explanation Converts the joint coordinate data unit pulse specified by the point expression into Cartesian coordinate data unit mm degree of the robot specified by the robot number SAMPLE P10 JTOXY WHERE Current position data of robot 1 is converted to Cartesian coordinate data and assigned to P10 Related commands XYTOJ ...

Page 173: ...cter string specified by character string expression The expression value must be between 0 and 255 otherwise an error will occur If the expression value is 0 then extracted character string will be a null string empty character string If the expression value has more characters than the character string expression extracted character string will become the same as the character string expression ...

Page 174: ...nd 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 SAMPLE RIGHTY Specifies the hand system of robot 1 as a right handed system MOVE P P1 1 LEFTY Specifies the hand system of robot 1 as a left handed system MOVE P P1 2 RIGHTY Specifies the hand system of robot 1 as a right handed system HALT SA...

Page 175: ...ng length Format LEN character string expression Explanation Returns the character string length of the character string expression 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 ...

Page 176: ...assignment statement or shift assignment statement a memory related error such as the 9 702 Point data destroyed or the 9 706 Shift data destroyed may occur 1 Arithmetic assignment statement Format LET integer variable expression real variable parallel output variable internal output variable arm lock output variable timer output variable serial output variable serial word output variable serial d...

Page 177: ...3 Point assignment statement Format LET point variable point expression Explanation Assigns point expression values to point variables Only 4 arithmetic operators can be used in the point expression Multiplication and division are performed only for constant or variable arithmetic operations Addition Subtraction Multiplication Division Addition subtraction is performed for each element of each axi...

Page 178: ...sible examples P15 5 P E A etc Prohibited examples P10 P11 3 P10 etc 4 Shift assignment statement Format LET shift variable shift expression Explanation Assigns shift expression values to shift variables Only shift elements can be used in shift expressions and only addition and subtraction arithmetic operators are permitted Parentheses cannot be used Addition subtraction Addition subtraction is pe...

Page 179: ...wer 8 bits are valid if the number of bit specified on bit definition is 1 to 8 the lower 1 to 8 bit corresponding to the bits specified on the left side are valid Explanation This statement outputs the specified value to the LO port to either prohibit or allow axis movement LO 00 to LO 07 correspond to axes 1 to 8 LO 10 to LO 17 correspond to axes 9 to 16 respectively An arm lock ON status occurs...

Page 180: ... the specified LO port LO 00 to LO 07 correspond to axes 1 to 8 LO 10 to LO 17 correspond to axes 9 to 16 respectively An arm lock ON status occurs at axes where bits are set and axis movement is prohibited SAMPLE A LO0 Output status of ports DO 07 to LO 00 is assigned to variable A A LO0 6 5 1 Output status of LO 06 LO 05 and LO 01 is assigned to variable A If all above signals are 1 ON then A 7 ...

Page 181: ...rst second arm rotation information 1 coordinate value 1 right handed system 2 left handed system 0 no setting 0 1 1 1 For details regarding the first arm and the second arm rotation information refer to Chapter 4 3 Point data format Explanation Format 1 Changes the value of the point data specified axis the hand system flag and the first arm and the second arm rotation information Format 2 Change...

Page 182: ...quires the value of the point data specified axis the hand system flag and the first arm and the second arm rotation information Format 2 Acquires a specified axis element from the shift data SAMPLE LOC1 P10 A 1 Axis 1 data of P10 is changed to the array A 1 value LOC2 S1 B Axis 2 data of S1 is changed to the B value A 1 LOC1 P10 Axis 1 data of P10 is assigned to array A 1 B 2 LOC1 S1 The first el...

Page 183: ...xpression 1 expression 2 Explanation Shifts the expression 1 bit value to the left by the amount of expression 2 Spaces left blank by the shift are filled with zeros 0 SAMPLE A LSHIFT B10111011 2 The 2 bit left shifted B10111011 value B11101100 is assigned to A Related commands RSHIFT ...

Page 184: ...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 axis number This function is valid only for axes whose return to origin method is set as Sensor or Stroke end SAMPLE A MCHREF 1 The machine reference of axis 1 of robot 1 is assigned to variable A ...

Page 185: ...in and expression 2 specifies the number of characters to be extracted An error will occur if the expression 1 and expression 2 values violate the permissible value ranges If expression 2 is omitted or if the number of characters to the right of the character of expression 1 is less than the value of expression 2 then all characters to the right of the character specified by expression 1 will be e...

Page 186: ...cannot be used as output ports these ports are for referencing only ports 32 33 36 and 37 are reserved by the system Ports 30 31 34 and 35 outputs Bit 7 6 5 4 3 2 1 0 Port 30 Port 31 Axis 8 Axis 16 Axis 7 Axis 15 Axis 6 Axis 14 Axis 5 Axis 13 Axis 4 Axis 12 Axis 3 Axis 11 Axis 2 Axis 10 Axis 1 Axis 9 Origin sensor status 0 ON 1 OFF Axis 1 is not connected Port 34 Port 35 Axis 8 Axis 16 Axis 7 Axis...

Page 187: ... port SAMPLE A MO0 Output status of ports MO 07 to MO 00 is assigned to variable A A MO0 6 5 1 Output status of MO 06 MO 05 and MO 01 is assigned to variable A If all above signals are 1 ON then A 7 A MO 17 15 00 Output status of M0 17 MO 15 and M0 00 is assigned to variable A If all above signals except M0 15 are 1 ON then A 5 A MO 377 365 255 123 O u t p u t s t a t u s o f M 0 3 7 7 M O 3 6 5 M...

Page 188: ...f 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 OFF Turns off the motor power All robot servos are also turned off at the same time to apply the dynamic brake For the axis with the brake the brake is applied to lock it PWR Turns on only the motor power SAMPLE MOTOR ON Turns on the motor power and all robot ser...

Page 189: ...tion setting CONT setting acceleration setting deceleration setting plane coordinate setting port output setting multiple ports outputs specifiable merged level setting Options PTP Linear interpolation Arch interpolation Remarks Speed setting SPEED DSPEED 3 3 3 Enabled only for specified MOVE statement Speed setting VEL 3 3 Enabled only for specified MOVE statement Arch motion 3 Enabled only for s...

Page 190: ...rs the OUT position range HALT Program stops and is reset when the axis enters the OUT position range Therefore the axis movement also stops HALTALL All programs in execution stop when the axis enters the OUT position range task 1 is reset and other tasks terminate Therefore the movement also stops HOLD Program temporarily stops when the axis enters the OUT position range Therefore the axis moveme...

Page 191: ... all specified axes has begun within the tolerance range All movement axes arrive at the same time On robots with an R axis the R axis speed may become too fast and cause an error depending on the R axis movement distance SAMPLE MOVE L P0 P1 The robot 1 moves linear interpolation movement from its current position to the position specified by P0 P1 SAMPLE MOVE L P0 Current position P1 Tolerance ra...

Page 192: ... P21 P20 33811 R7 00 Circular interpolation is possible within the following range radius 0 100mm to 5 000 000mm Circle distortion may occur depending on the speed acceleration and the distance between points On robots with an R axis the R axis speed may become too fast and cause an error depending on the R axis movement distance Movement command types and the corresponding movement Current positi...

Page 193: ... either 1 or 2 at f If a number other than 1 or 2 is set or if no number is designated 0 will be set to indicate that there is no hand system flag 1 Right handed system is used to move to a specified position 2 Left handed system is used to move to a specified position At SCARA robots with a hand system flag set in the movement destination s coordinate data the specified hand system will have prio...

Page 194: ...umber of points At SCARA robots with a hand system flag set in the movement destination s coordinate data the specified hand system will have priority over the current arm type or LEFTY RIGHTY setting SAMPLE MOVE P P1 Robot 1 moves from the current position to the position specified by P1 MOVE P P20 P0 P100 Robot 1 moves in sequence from the current position to positions specified by P20 P0 P100 C...

Page 195: ...etting 2 PTP Linear interpolation Circular interpolation Format 1 DSPEED expression 2 DS expression Values expression 0 01 to 100 00 units Explanation Specifies the program speed in an expression The actual speed will be as follows Robot max speed mm sec or deg sec movement speed This option is enabled only for the specified MOVE statement Movement always occurs at the DSPEED expression value with...

Page 196: ...mm sec units of the XYZ axes in an expression This option is specifiable when movement type is linear interpolation or circular interpolation movements This option is enabled only for the specified MOVE statement SAMPLE MOVE L P10 VEL 100 Robot 1 moves from the current position to the position specified by P10 at the maximum composite speed of 100 mm sec of the XYZ axis NOTE This option specifies ...

Page 197: ... figure below 3 The axis specified by x moves to the target position so that the remaining movement distance becomes the arch distance 2 when the movement of other axes is completed 3 shown in the figure below 4 The command ends when all axis enter the OUT position range This option can be used only for PTP movement When the axis specified by x is the first arm or second arm of the SCARA robot or ...

Page 198: ...e conditions are already met before movement begins no movement occurs and the command is terminated This option can only be used for PTP movement and linear interpolation movement This option is only possible by program execution SAMPLE MOVE P P100 STOPON DI 20 1 Robot 1 moves from the current position to the position specified by P100 If the DI 20 1 condition is met during movement a deceleratio...

Page 199: ...ecuted and standby starts immediately after movement along the final path begins HALT Program stops and is reset immediately after movement along the final path begins Therefore axis movement also stops HALTALL All programs in execution stop immediately after movement along the final path begins task 1 is reset and other tasks terminate Therefore the movement also stops HOLD Program temporarily st...

Page 200: ...entering the tolerance range Tolerance range With CONT setting Without CONT setting 33814 R7 00 SAMPLE MOVE L P10 CONT MOVE L P11 Robot 1 Moves from the current position to the position specified by P10 and then moves linear interpolation movement to P11 without waiting for the moving axes to arrive in the tolerance range and completes the movement within the tolerance range The interpolation move...

Page 201: ...n acceleration rate of 10 from the current position to the position specified by P100 Deceleration setting PTP Linear interpolation Circular interpolation Format DEC expression Values expression 1 to 100 units Explanation Specifies the robot deceleration rate in an expression The actual robot deceleration is determined by the acceleration coefficient parameter setting the setting is specified as a...

Page 202: ... 150 000 100 000 0 000 0 000 0 000 0 000 P12 150 000 150 000 20 000 0 000 0 000 0 000 P13 100 000 150 000 40 000 0 000 0 000 0 000 MOVE P P10 Robot 1 moves from the current position to the position specified by P10 MOVE C P11 P12 MOVE C P13 P10 Moves continuously along a 3 dimensional circle generated at P10 P11 P12 and P12 P13 P10 1 MOVE C P11 P12 XY MOVE C P13 P10 XY Moves continuously along a c...

Page 203: ...to the specified port when the robot reaches the expression 2 distance units mm from the start position The expression 2 numeric value represents a circle radius not arc length centered on the movement START point This command option can only be used with linear or circular interpolation movement and it can be specified no more than 2 times per MOVE statement If no hardware port exists nothing is ...

Page 204: ...Speed setting SPEED DSPEED 3 3 Enabled only for specified MOVEI statement Speed setting VEL 3 Enabled only for specified MOVEI statement STOPON condition setting 3 3 Enabled only by program execution CONT setting 3 3 Enabled only for specified MOVEI statement Acceleration setting 3 3 Enabled only for specified MOVEI statement Deceleration setting 3 Enabled only for specified MOVEI statement If the...

Page 205: ...T position range HALT Program stops and is reset when axis enters the OUT position range Therefore axis movement also stops HALTALL All programs in execution stop when axis enters the OUT position range task 1 is reset and other tasks terminate Therefore the movement also stops HOLD Program temporarily stops when axis enters the OUT position range Therefore axis movement also stops HOLDALL All pro...

Page 206: ...ent of all specified axes has begun within the tolerance range All movement axes arrive at the same time On robots with an R axis the R axis speed may become too fast and cause an error depending on the R axis movement distance SAMPLE MOVE L P0 P1 From its current position the axis of robot 1 moves linear interpolation movement the amount specified by P0 P1 SAMPLE MOVEI L P0 Current position P1 To...

Page 207: ... 2 Left handed system is used to move to a specified position At SCARA robots with a hand system flag set in the movement destination s coordinate data the specified hand system will have priority over the current arm type or LEFTY RIGHTY setting SAMPLE MOVEI P 10000 10000 1000 1000 0 0 From its current position the axis of robot 1 moves PTP movement the specified amount pulse units NOTE If both i...

Page 208: ...EI P P1 From its current position the axis of robot 1 moves PTP movement the amount specified by P1 CAUTION When moving the robot by linear interpolation to a point where a hand system flag is specified be sure that the same hand system is used at both the current and target positions If the same hand system is not used an error will occur and robot movement will be disabled MEMO CAUTION When perf...

Page 209: ...setting 2 PTP Linear interpolation Format 1 DSPEED expression 2 DS expression Values expression 0 01 to 100 00 units Explanation Specifies the program speed in an expression The actual speed will be as follows Robot max speed mm sec or deg sec movement speed This option is enabled only for the specified MOVEI statement Movement always occurs at the DSPEED expression value without being affected by...

Page 210: ...ment 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 This option is only possible by program execution SAMPLE MOVEI P P100 STOPON DI 20 1 From its current p...

Page 211: ...nal path begins HALT Program stops and is reset immediately after movement along the final path begins Therefore axis movement also stops HALTALL All programs in execution stop immediately after movement along the final path begins task 1 is reset and other tasks terminate Therefore the movement also stops HOLD Program temporarily stops immediately after movement along the final path begins Theref...

Page 212: ...ins after entering the tolerance range Tolerance range With CONT setting Without CONT setting 33815 R9 00 SAMPLE MOVEI L P10 CONT MOVEI L P11 From its current position the axis of robot 1 moves linear interpolation 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 and completes the movement within th...

Page 213: ...nt the amount specified by P100 at an acceleration rate of 10 Deceleration setting PTP Linear interpolation Format DEC expression Values expression 1 to 100 units Explanation Specifies the robot deceleration rate in an expression The actual robot deceleration is determined by the acceleration coefficient parameter setting the setting is specified as a percentage of the acceleration setting value 1...

Page 214: ... of other robots or for auxiliary axes Movement type PTP linear interpolation Point data setting Direct coordinate data input point definition Options Speed setting STOPON condition setting CONT setting acceleration setting deceleration setting Options PTP Linear interpolation Remarks Speed setting SPEED DSPEED 3 3 Enabled only for specified MOVET statement Speed setting VEL 3 Enabled only for spe...

Page 215: ... range HALT Program stops and is reset when the axis enters the OUT position range Therefore the axis movement also stops HALTALL All programs in execution stop when the axis enters the OUT position range task 1 is reset and other tasks terminate Therefore the movement also stops HOLD Program temporarily stops when the axis enters the OUT position range Therefore the axis movement also stops HOLDA...

Page 216: ...t Execution START condition Movement of all specified axes is complete within the tolerance range Execution END condition Movement of all specified axes has begun within the tolerance range All movement axes arrive at the same time On robots with an R axis the R axis speed may become too fast and cause an error depending on the R axis movement distance SAMPLE MOVET L P0 P1 From its current positio...

Page 217: ...stem is used to move to a specified position At SCARA robots with a hand system flag set in the movement destination s coordinate data the specified hand system will have priority over the current arm type or LEFTY RIGHTY setting SAMPLE MOVET P 10 000 10 000 10 000 10 000 0 000 0 000 From its current position the axis of robot 1 moves PTP movement the specified amount mm units in the tool coordina...

Page 218: ... its current position the axis of robot 1 moves PTP movement the amount specified by P1 in the tool coordinates CAUTION When moving the robot by linear interpolation to a point where a hand system flag is specified be sure that the same hand system is used at both the current and target positions If the same hand system is not used an error will occur and robot movement will be disabled MEMO CAUTI...

Page 219: ...setting 2 PTP Linear interpolation Format 1 DSPEED expression 2 DS expression Values expression 0 01 to 100 00 units Explanation Specifies the program speed in an expression The actual speed will be as follows Robot max speed mm sec or deg sec movement speed This option is enabled only for the specified MOVET statement Movement always occurs at the DSPEED expression value without being affected by...

Page 220: ...ment 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 This option is only possible by program execution SAMPLE MOVET P P100 STOPON DI 20 1 From its current p...

Page 221: ...ment along the final path begins DELAY DELAY command is executed and standby starts immediately after movement along the final path begins HALT Program stops and is reset immediately after movement along the final path begins Therefore the axis movement also stops HALTALL All programs in execution stop immediately after movement along the final path begins task 1 is reset and other tasks terminate...

Page 222: ...ins after entering the tolerance range Tolerance range With CONT setting Without CONT setting 33820 R9 00 SAMPLE MOVET L P10 CONT MOVET L P11 From its current position the axis of robot 1 moves linear interpolation 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 tole...

Page 223: ...by P100 in the tool coordinates at an acceleration rate of 10 Deceleration setting PTP Linear interpolation Format DEC expression Values expression 1 to 100 units Explanation Specifies the robot deceleration rate in an expression The actual robot deceleration is determined by the acceleration coefficient parameter setting the setting is specified as a percentage of the acceleration setting value 1...

Page 224: ...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 axis number SAMPLE A MTRDUTY 1 The motor load factor of axis 1 of robot 1 is assigned to variable A ...

Page 225: ...mmunication mode parameter to OFFLINE and clears the transmission and reception buffers CMU Changes the RS 232C communication mode parameter to OFFLINE resets the communication error and clears the transmission and reception buffers No setting Changes the Ethernet and RS 232C communication mode parameter to OFFLINE resets the communication error RS 232C only and clears the transmission and recepti...

Page 226: ...anceled interruption canceled The error processing routine can process an error using the RESUME statement and the error output information ERR ERL If a serious error such as 17 800 Motor overload occurs the program execution stops The most recently executed ON ERROR GOTO label statement is valid If an error occurs during an error processing routine the program will stop ON ERROR GOTO label statem...

Page 227: ...fies a jump to label 1 2 specifies a jump to label 2 etc Likewise expression value n specifies a jump to label n If the expression value is 0 or if the expression value exceeds the number of existing labels no jump occurs and the next command is executed After executing a jump destination subroutine the next command after the ON to GOSUB statement is executed SAMPLE MAIN ROUTINE ST ON DI3 GOSUB SU...

Page 228: ...m s jump destination An expression value of 1 specifies a jump to label 1 2 specifies a jump to label 2 etc Likewise expression value n specifies a jump to label n If the expression value is 0 or if the expression value exceeds the number of existing labels no jump occurs and the next command is executed SAMPLE MAIN ROUTINE ST ON DI3 GOTO L1 L2 L3 J u m p s t o L 1 t o L 3 i n accordance with the ...

Page 229: ...ommunication mode parameter to ONLINE and clears the transmission and reception buffers CMU Changes the RS 232C communication mode parameter to ONLINE resets the communication error and clears the transmission and reception buffers No setting Changes the Ethernet and RS 232C communication mode parameter to ONLINE resets the communication error RS 232C only and clears the transmission and reception...

Page 230: ...ens the communication port of the specified General Ethernet Port SAMPLE OPEN GP1 Opens the General Ethernet Port 1 SEND 123 TO GP1 Sends the character strings 123 from the General Ethernet Port 1 SEND GP1 TO A Receives the data from the General Ethernet Port 1 and Saves the received data in the variable A CLOSE GP1 Closes the General Ethernet Port 1 Related commands CLOSE SEND SETGEP GEPSTS ...

Page 231: ... X Y Z 72 ORD Acquires a character code Format ORD character string expression Explanation Acquires the character code of the first character in a character string expression SAMPLE A ORD B 66 H42 is assigned to A Related commands CHR ...

Page 232: ...xes are returned to their origin points in sequence from left to right the remaining axes return to their origin points simultaneously If the expression value is 0 all axes will be returned to their origin points simultaneously Functions Format ORGORD robot number Values robot number 1 to 4 If not input robot 1 is specified Explanation Acquires the axis sequence parameter for return to origin and ...

Page 233: ... types is specified Explanation This statement performs return to origin of a robot If the movement is stopped at an intermediate point incomplete return to origin status will occur If robot number is omitted or 0 is specified during multiple robots setting the return to origin and absolute search are first performed for the robot 1 and then for the robots 2 to 4 SAMPLE ORIGIN 0 1 P e r f o r m s ...

Page 234: ...n turned OFF after the time specified by the expression has elapsed If the operation is stopped temporarily at an intermediate point and then restarted that port s output is turned OFF when the remaining expression specified time has elapsed If this expression is omitted the specified port s output remains ON Up to 16 OUT statements using expressions can be executed at the same time Attempting to ...

Page 235: ...ression 1 to 9999999 Unit pulses Explanation Changes the OUT position parameter of the specified axis to the value indicated in the expression Format 1 The change is applied to all axes of the specified robot Format 2 The change is applied only to the axis specified by axis number Functions Format OUTPOS robot number axis number Values robot number 1 to 4 If not input robot 1 is specified axis num...

Page 236: ... 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 RESTORE_OUTPOS FOR B 1 TO 4 OUTPOS B SAV B 1 NEXT B RETURN ...

Page 237: ...lation Point setting Direct numeric value input point definition Options Speed setting coordinate plane setting for circular interpolation only port output setting PATH motion types Linear interpolation movement PATH L is set for linear interpolation movement Circular interpolation movement PATH C is set for circular interpolation movement Only the X Y and Z coordinate values of the specified poin...

Page 238: ...there is no hand system flag 1 Right handed system is used to move to a specified position 2 Left handed system is used to move to a specified position The same hand system must always be used between a motion path s START and END points The hand system cannot be changed between these points Moreover the first arm and second arm rotation information must be the same throughout the movement path fr...

Page 239: ...fied hand system will have priority over the current arm type or LEFTY RIGHTY setting SAMPLE PATH L P1 P2 P3 S p e c i f i e s s e q u e n t i a l l i n e a r interpolation movement of robot 1 from its current position to the positions specified by P1 P2 and P3 from its current position PATH C P5 P6 P7 P8 Specifies circular interpolation movement of robot 1 through the following points current pos...

Page 240: ... to the position specified by P5 occurs at 40 of the program movement speed Format VEL expression Values expression The permissible setting range varies according to the robot type units mm sec Explanation The movement speed is specified by the expression value units mm sec An error will occur if the speed is too fast This command is enabled only for the specified PATH statement SAMPLE PATH L P10 ...

Page 241: ... a circular arc for circular interpolation movement If no coordinate plane is specified 3 dimensional circular interpolation movement is used Only circular interpolation movement can be specified by this coordinate plane setting This command is enabled only for the specified PATH statement SAMPLE PATH C P1 P2 XY From its current position circular interpolation movement of robot 1 occurs within the...

Page 242: ...lue of expression 1 to the specified port when the robot reaches the expression 2 distance from the start position The expression 2 numeric value represents a circle radius not arc length centered on the movement START point If no hardware port exists nothing is output SAMPLE PATH SET PATH L P1 DO 20 1 10 Specifies to output 1 to DO 20 at a 10mm radius position from the START position during linea...

Page 243: ... 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 Attempting to execute a PATH END command when no PATH SET command has been executed will result in an error SAMPLE PATH END Ends the path setting of robot 1 s PATH motion Related commands PATH PATH SET PATH ST...

Page 244: ...he point definition value is omitted the current robot position is set as the start point However if robot movement is in progress the target position of that movement becomes the start point Example The OUT position range is wider for the MOVE command which precedes the PATH SET command so the robot is still moving when the PATH SET command is executed etc The PATH SET command must always be pair...

Page 245: ...ystem is specified for the PATH motion s start point At SCARA robots with a hand system flag set in the movement destination s coordinate data the specified hand system will have priority over the current arm type or LEFTY RIGHTY setting SAMPLE PATH SET 120 250 000 55 2 20 33 0 0 The PATH motion s start point of robot 1 is specified in mm units as follows 120 000 250 000 55 200 20 330 0 000 0 000 ...

Page 246: ...0 PATH SET WHERE The PATH motion s start point of robot1 is set as the robot 1 s current position Related commands PATH PATH END PATH START Reference For PATH function details see Chapter 9 PATH Statements CAUTION The hand system used during PATH motion must be the same as the hand system used at the path motion route s start point Differing hand systems will cause an error and disable motion MEMO...

Page 247: ...oned at the motion path s start point which was specified by the PATH SET command The robot s PATH motion speed is the automatic movement speed which was in effect when the PATH START was executed multiplied by the program movement speed specified by the SPEED command or the SPEED or S option of the PATH command A speed specified by the VEL option of the PATH command does not rely on the automatic...

Page 248: ...ditions are already met before movement begins no movement occurs and the command is terminated This option is only possible by program execution SAMPLE PATH START STOPON DI 20 1 Robot 1 starts PATH movement if the DI 20 1 condition is met during movement a deceleration and stop occurs and the next step is then executed When the conditional expression used to designate the STOPON condition is a nu...

Page 249: ...arget position tolerance range Example Signal output DO etc Signal is output immediately after movement along the final path begins DELAY DELAY command is executed and standby starts immediately after movement along the final path begins HALT Program stops and is reset immediately after movement along the final path begins Therefore axis movement also stops HALTALL All programs in execution stop i...

Page 250: ...f final PATH motion SAMPLE PATH START CONT PATH motion target position PATH motion target position P10 Next movement begins after entering the deceleration zones P10 Next movement begins after entering the tolerance range Tolerance range Deceleration zones With CONT setting Without CONT setting 33812 R9 00 Related commands PATH PATH SET PATH END Reference For PATH function details see Chapter 9 PA...

Page 251: ...ntinuous 5 points starting with the specified point are used Explanation Defines the pallets to permit execution of the pallet movement command changes the contents of definition for previously defined pallet data After specifying the number of points per axis the equally spaced points for each axis are automatically calculated and defined in the sequence shown in the figure below If expression 3 ...

Page 252: ...s program number 1 to 100 Explanation Acquires the task number in which the program specified by program number is registered If the program number which is not registered in the task is specified 3 203 Program doesn t exist error occurs SAMPLE A PGMTSK 1 Assigns the task number in which the program number 1 s program is registered to variable A Related commands PGN TSKPGM MEMO ...

Page 253: ... program name 32 characters or less consisting of alphanumeric characters and underscore _ Explanation Acquires the program number of the program specified by program name The program name must be enclosed in double quotation marks SAMPLE A PGN PG_SUB The program number of PG_SUB is assigned to variable A Related commands PGMTSK TSKPGM ...

Page 254: ... expression Options Speed setting arch motion setting STOPON condition setting The position numbers for each pallet definition are shown below NX NY NZ 1 1 NX NY NZ 1 NZ Position numbers for each pallet definition P 5 1 2 NX NX 2 NX 1 NX NY 1 1 NX NY NX NY NZ P 3 P 4 P 2 P 1 NZ NX NY NX NY NZ 1 1 NX NY NZ 1 NZ 33816 R7 00 Acquires the XYZ axes move to the position determined by calculated values t...

Page 255: ...and standby starts when the axis enters the OUT position range HALT Program stops and is reset when the axis enters the OUT position range Therefore the axis movement also stops HALTALL All programs in execution stop when axis enters the OUT position range task 1 is reset and other tasks terminate Therefore the movement also stops HOLD Program temporarily stops when the axis enters the OUT positio...

Page 256: ...eg units Explanation 1 The x specified axis begins moving toward the position specified by the expression 1 shown in the figure below 2 When the axis specified by x moves the arch distance 1 or more other axes move to their target positions 2 shown in the figure below 3 The axis specified by x moves to the target position so that the remaining movement distance becomes the arch distance 2 when the...

Page 257: ...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 This option is only possible by program execution SAMPLE PMOVE A 16 STOPON DI 20 1 Robot 1 moves from the current position to the position specified by pallet position number 16 of pallet definition number A then decelerates and st...

Page 258: ... even 1 real number with decimal point in the input data for p1 through p6 the movement units are recognized as mm 5 The input data ranges are as follows For pulse units 6 144 000 to 6 144 000 range For mm units 99 999 99 to 99 999 99 range Hand system flags can be specified for SCARA robots when specifying point definition data in mm units To specify an extended hand system flag for SCARA robots ...

Page 259: ...FOR A 10 TO 15 P A 1 P A P3 NEXT A FOR A 10 TO 16 MOVE P P1 P A NEXT A HALT Related commands Point assignment statement LET NOTE A l l i n p u t va l u e s a r e handled as constants I f c o n t r o l l e r p o w e r i s t u r n e d o ff d u r i n g execution of a point definition statement a memor y related error such as 9 702 Point data destroyed may occur ...

Page 260: ... 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 Creates at P10 the point data specified by pallet position number 24 of pallet definition number 1 Related commands PDEF PMOVE ...

Page 261: ...the next line 4 If a comma is used as a display delimiter a space blank is inserted between the displayed items 5 If a semicolon is used as a display delimiter the displayed items appear in succession without being separated 6 If the data ends with a delimiter a line feed does not occur When not ended with a display delimiter a line feed occurs Data communication to the programming box screen occu...

Page 262: ...ent the pushing control is executed with the setting of the pushing thrust parameter Actual pushing thrust is as follows Rated thrust x expression 100 In format 1 the change occurs at all axes In format 2 the change occurs at parameter of the axis specified by the axis number SAMPLE PSHFRC 1 10 Changes the pushing thrust parameter of axis 1 of robot 1 to 10 Functions Format PSHFRC robot number axi...

Page 263: ...ushing thrust in the PUSH statement at the specified value The setting of expression can be specified as follows 0 A pushing operation is detected if the pushing thrust reaches the specified value with the threshold setting invalid 1 to 100 The movement speed in the PUSH statement is 100 to specify thresholds with a rate SAMPLE PSHJGSP 1 50 Changes the push judge speed parameter of axis 1 of robot...

Page 264: ...ized to execute the pushing control end detection 1 The pushing control end detection is executed only when the pushing thrust continuously reaches the specified value If the pushing thrust is lower than the specified value the elapsed time is reset to 0 In format 1 the change occurs at all axes In format 2 the change occurs at the parameter of the axis specified by axis number SAMPLE PSHMTD 1 1 C...

Page 265: ...tatement executed for the axis specified by axis number 0 The PUSH statement was ended for a reason other than the arrival of the pushing time 1 The PUSH statement was ended by the arrival of the pushing time SAMPLE PUSH 3 P1 Moves the axis 3 of robot 1 is under the pushing control to the position specified with P1 IF PSHRSLT 3 1 THEN Ended by the arrival of the pushing time GOTO OK ELSE Ended for...

Page 266: ...ement speed S is set as an option in the PUSH statement Maximum speed of a robot mm sec or deg sec x Push speed ratio x Automatic movement speed x Program movement speed specified by S DS is set as an option in the PUSH statement Maximum speed of a robot mm sec or deg sec x Push speed ratio x Movement speed of an axis specified by DS Refer to 94 PUSH in this Chapter the YRCX programming manual for...

Page 267: ... omitted in the PUSH statement the pushing control is executed with the setting of the push time parameter In format 1 the change occurs at all axes In format 2 the change occurs at the axis specified by the axis number SAMPLE PSHTIME 1 1000 Changes the push time parameter of axis 1 of robot 1 to 1000ms Functions Format PSHTIME robot number axis number Values robot number 1 to 4 If not input robot...

Page 268: ...ified by the axis number is completed within the tolerance range controlling the pushing thrust in the forwarding direction of the axis The conditions to start the pushing control are as follows Immediately after the start of movement of an axis by the PUSH statement After the merge operation is completed when the PUSH statement is specified in the line next to the movement command with CONT speci...

Page 269: ... temporarily stopped Therefore the axis movement also stops WAIT WAIT command is executed when the pushing conditions are satisfied or within the tolerance range SAMPLE PUSH 1 P0 Axis 1 of robot 1 moves from its current position to the position specified by P0 Point data setting types Direct numeric value input The motor position is specified directly in expression If the motor position s numeric ...

Page 270: ... 1 10000 F 10 Axis 1 of robot 1 moves from its current position to the 100000 pulse position with the pushing thrust at 10 of the rated thrust Pushing time setting Format TIM expression Values expression 1 to 32767 units ms Explanation The time to keep pushing with the specified pushing thrust is specified as an expression When the status where the pushing thrust reaches the specified value exceed...

Page 271: ...lse position with the speed at 10 of the multiplication of the pushing movement speed and the automatic movement speed Format 1 DSPEED expression 2 DS expression Values expression 0 01 to 100 00 units Explanation The axis movement speed is specified in expression The actual speed is determined as shown below Max speed of a robot mm s or deg s x Pushing movement speed x expression This option is en...

Page 272: ...re movement begins no movement occurs and the command is terminated This option is enabled only by program execution SAMPLE PUSH 1 10000 STOPON DI 20 1 Axis 1 of robot 1 moves from its current position toward the 10000 pulses position and stops at an intermediate point if the DI 20 1 condition is met The next step is then executed When the conditional expression used to designate the STOPON condit...

Page 273: ...ans degrees Format RADDEG expression Values expression Angle units radians Explanation Converts the expression 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 ...

Page 274: ...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 REM or an apostrophe can be entered at any point in the line SAMPLE REM MAIN PROGRAM SUBROUTINE HALT HALT COMMAND ...

Page 275: ...specified they are expressed from the left in descending order high to low Explanation Format 1 Turns the bits of specified ports OFF Format 2 Clears the 1ms counter variables 1ms counter variables are used to measure the time in 1ms units SAMPLE RESET DO2 Turns OFF DO 27 to 20 RESET DO2 6 5 1 Turns OFF DO 26 25 21 RESET 37 35 27 20 Turns OFF DO 37 35 27 20 RESET TCOUNTER Clears the 1ms counter va...

Page 276: ...gram in execution The program name must be enclosed in angle brackets If a task program not temporarily stopped is specified and executed an error occurs SAMPLE START SUB_PGM T2 FLAG 1 L0 IF FLAG 1 AND DI2 0 1 THEN SUSPEND T2 FLAG 2 WAIT DI2 0 0 ENDIF IF FLAG 2 AND DI2 0 1 THEN RESTART T2 FLAG 1 WAIT DI2 1 0 ENDIF MOVE P P0 MOVE P P1 GOTO L0 HALTALL Program name SUB_PGM SUBTASK ROUTINE SUBTASK DO2...

Page 277: ... ways 1 RESUME The program resumes from the command which caused the error 2 RESUME NEXT The program resumes from the next command after the command which caused the error 3 RESUME label The program resumes from the command specified by the label The RESUME statement can also be executed in an error processing routine Error recovery processing is not possible for serious errors such as 17 800 Moto...

Page 278: ...ds the subroutine and returns to the next line after the jump source GOSUB statement All subroutines jump destinations specified by a GOSUB statement must end with a RETURN statement Using the GOTO statement etc to jump from a subroutine will cause an error such as 5 212 Stack overflow SAMPLE ST MOVE P P0 GOSUB CLOSEHAND MOVE P P1 GOSUB OPENHAND GOTO ST HALT SUB ROUTINE CLOSEHAND DO 20 1 RETURN OP...

Page 279: ...ht end of the character string specified by character string expression The expression value must be between 0 and 255 otherwise an error will occur If the expression value is 0 then extracted character string will be a null string empty character string If the expression value has more characters than the character string expression extracted character string will become the same as the character...

Page 280: ...ied in the Cartesian coordinates This statement only selects the hand system and does not move the robot If executed while the robot arm is moving execution waits until movement is complete positioned within tolerance range SAMPLE RIGHTY Specifies a Robot 1 right handed system setting see Fig 1 below MOVE P P1 LEFTY Specifies a Robot 1 left handed system setting see Fig 2 below MOVE P P1 RIGHTY HA...

Page 281: ...RSHIFT expression 1 expression 2 Explanation Shifts the expression 1 bit value to the right by the amount of expression 2 Spaces left blank by the shift are filled with zeros 0 SAMPLE A RSHIFT B10111011 2 The 2 bit right shifted B10111011 value B00101110 is assigned to A Related commands LSHIFT ...

Page 282: ...e matches one of expressions contained in the expression list the specified command block is executed After executing the command block the program jumps to the next command which follows the END SELECT statement 3 If the expression value does not match any of the expressions contained in the expression list the command block indicated after the CASE ELSE statement is executed After executing the ...

Page 283: ...t Read out Write All Individual File User All file ALL 3 3 Program PGM bbbbbbbb PGn 3 3 Point PNT Pn 3 3 Point comment PCM PCn 3 3 Point name PNM PNn 3 3 Parameter PRM cccccccc cccccccc cccccccc 3 3 Shift definition SFT Sn 3 3 Hand definition HND Hn 3 3 Pallet definition PLT PLn 3 3 General Ethernet Port GEP GPn 3 3 Input output name ION iNMn n 3 3 Area check output ACO ACn 3 3 Variable Constant V...

Page 284: ...after a stop occurred during execution of the SEND statement 1 When reading from RS 232C Ethernet SEND CMU TO XXX SEND ETH TO XXX When the SEND statement is stopped during data reading from the reception buffer the data acquired up to that point is discarded 2 When writing to RS 232C Ethernet SEND XXX TO CMU SEND XXX TO ETH When the SEND statement is stopped during data writing to the transmission...

Page 285: ...ioned within the tolerance The motor power is a power supply unit for robot motor in the controller The dynamic brake controls the motor by using the electric power which is generated in the motor when the servo is turned OFF SAMPLE SERVO ON T u r n s s e r v o s O N a t a l l a x e s of robot 1 SERVO OFF T u r n s t h e s e r v o O F F a n d a p p l i e s t h e d y n a m i c b r a k e a t a l l a...

Page 286: ... order high to low 10 to 3600000 units ms Explanation Turns ON the bits of specified ports The pulse output time unit ms is specified by the time value The program execution is WAIT status while the output is ON When the specified time elapses the output is turned OFF and the execution ends If no hardware port exists nothing is output SAMPLE SET DO2 Turns ON DO 27 to 20 SET DO2 6 5 1 200 DO 26 25 ...

Page 287: ... to communicate so IP address setting is unnecessary The IP address set by IP address is invalid in this case Port number Set a port number which differs from the one on the controller When Client mode is selected IP address and port number Set the IP address and port number of the connection destination server SAMPLE IPADRS 192 168 0 100 Assigns the IP adress 192 168 0 100 of the server to connec...

Page 288: ... 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 SAMPLE SGI1 300 Assigns 300 to SGI1 Functions Format SGIn Values n integer type static variable number 0 to 31 Explanation Acquires the value of the integer type static variable SGI specified by n SAMPLE A SGI...

Page 289: ... may be used 2 Single precision real numbers in exponent form 1 0 1038 to 1 0 1038 Mantissas should be 7 digits or less including integers and decimals Explanation Assigns xxxxxx to the real type static variable SGR specified by n SAMPLE SGR1 1320 355 Assigns 1320 355 to SGR1 Functions Format SGRn Values n real type static variable number 0 to 31 Explanation Acquires the value of the real type sta...

Page 290: ...f an array is specified that entire array is selected Normally a dummy argument passes along the variable to a sub procedure but the SHARED statement allows referencing to occur without passing along the dummy argument The SHARED statement allows variables to be shared only between a program level code and sub procedure which are within the same program level SAMPLE DIM Y 10 X 2 5 Y 10 1 2 CALL DI...

Page 291: ...dinates shift by shift variable does not occur This statement is executed after axis positioning is complete within the tolerance range When OFF is specified it is the same as the setting 0 000 at each X Y Z and rotation direction offset by the shift variable SAMPLE SHIFT S1 Shifts the coordinate of robot 1 to the shift 1 coordinate MOVE P P10 SHIFT S A Shifts the coordinate of robot 1 to the coor...

Page 292: ...iple bits are specified they are expressed from the left in descending order high to low Explanation Acquires SI port input status specified by m SAMPLE A SI2 The input status from SI 27 to SI 20 is assigned to variable A A SI0 6 5 1 The SI 06 SI 05 SI 01 input status is assigned to variable A when all the above signals are 1 ON A 7 A SI 37 35 27 10 The SI 37 SI 35 SI 27 SI 10 input status is assi...

Page 293: ... is 2 147 483 648 H80000000 to 2 147 483 647 H7FFFFFFF The information is handled as signed double word data 0 is input if the specified port does not exist The lower port number data is placed at the lower address For example if SIW 2 H2345 SIW 3 H0001 then SID 2 H00012345 SAMPLE A SID 2 The input status of SIW 2 SIW 3 is assigned to variable A A SID 14 The input status of SIW 14 SIW 15 is assign...

Page 294: ...ed value Format SIN expression Values expression Angle units radians Explanation This function gives the sine value for the expression 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 Related commands ATN COS DEGRAD RADDEG TAN ...

Page 295: ...on 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 0 is input if the specified port does not exist SAMPLE A SIW 2 The input status of SIW 2 is assigned to variable A A SIW 15 The input status of SIW 15 is assigned to variable A Related commands SID MEMO MEMO ...

Page 296: ...paces blanks 3 The x to r input data is recognized as mm unit data 4 x to z correspond to the Cartesian coordinate system s x y z coordinate shift values and r corresponds to the xy coordinates rotational shift values SAMPLE S0 0 000 0 000 0 000 0 000 S1 100 000 200 000 50 000 90 000 P3 100 000 0 000 0 000 0 000 0 000 0 000 SHIFT S0 MOVE P P3 SHIFT S1 MOVE P P3 HALT Related commands Shift assignme...

Page 297: ...ly the value data s integer converted lower bits corresponding to the bits defined at the left side can be output If the port which does not exist is specified nothing is output SAMPLE SO2 B10111000 SO 27 25 24 23 are turned ON and SO 26 22 21 20 are turned OFF SO2 6 5 1 B010 SO 25 are turned ON and SO 26 21 are turned OFF SO3 15 SO 33 32 31 30 are turned ON and SO 37 36 35 34 are turned OFF SO 37...

Page 298: ...e left in descending order high to low Explanation Indicates SO port output status SAMPLE A SO2 Output status of ports SO 27 to SO 20 is assigned to variable A A SO0 6 5 1 Output status of SO 06 SO 05 and SO 01 is assigned to variable A If all above signals are 1 ON then A 7 A SO 37 35 27 10 O u t p u t s t a t u s o f S 0 3 7 S O 3 5 S O 2 7 a n d S 0 1 0 i s a s s i g n e d t o v a r i a b l e A...

Page 299: ...word data If a serial port does not actually exist the information is not output externally The lower port number data is placed at the lower address For example if SOW 2 H2345 SOW 3 H0001 then SOD 2 H00012345 SAMPLE SOD 2 H12345678 Outputs H12345678 to SOD 2 SOD 4 1048575 Outputs 1048575 HFFFFF to SOD 4 SOD 2 A Outputs the value of variable A to SOD 2 Functions Format LET SOD m Values m port numb...

Page 300: ...alue so the low order word information HFF01 is assigned The information is handled as unsigned word data If a serial port does not actually exist the information is not output externally If a value exceeding the output range is assigned the low order 2 byte information is output SAMPLE SOW 2 H0001 Outputs H0001 to SOW 2 SOW 3 255 Outputs 255 H00FF to SOW 3 SOW 15 A The contents of variable A are ...

Page 301: ...on speed automatic movement speed program movement speed Example Automatic movement speed 80 Program movement speed 50 Movement speed 40 80 50 SAMPLE ASPEED 100 Changes the Automatic movement speed of robot 1 to 100 SPEED 70 Changes the Program movement speed of robot 1 to 70 MOVE P P0 Moves robot 1 from current position to P0 at a speed of 70 100 70 SPEED 50 Changes the Program movement speed of ...

Page 302: ...e square root of a specified value Format SQR expression Values expression 0 or positive number Explanation Gives the square root of the expression value An error occurs if the expression 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: ...fied If a priority ranking is not specified 32 is adopted as the priority ranking for this task The smaller the priority number the higher the priority high priority 1 low priority 64 When RUNNING status occurs at a task with higher priority all tasks with lower priority also remain in READY status The program name must be enclosed in angle brackets SAMPLE START SUB_PGM T2 33 ST MOVE P P0 P1 GOTO ...

Page 304: ... V W X Y Z 124 STR Converts a numeric value to a character string Format STR expression Explanation Converts the value specified by the expression to a character string The expression specifies an integer or real value SAMPLE B STR 10 01 Related commands VAL ...

Page 305: ...y argument when variables are to be passed on If two or more dummy arguments are used separate them by a comma 4 A valid dummy argument consists of a name of variable and an entire array array name followed by parentheses An error will occur if array elements a subscript following the array name are specified Sub procedures cannot be defined within a sub procedure A label can be defined within a s...

Page 306: ...L 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 B THEN TEMP A A B B TEMP ENDIF END SUB In the above example different variables are passed along as arguments to call the sub procedure 2 times Related commands CALL EXIT SUB SHARED MEMO ...

Page 307: ...f a program in execution This statement can also be used for tasks with a higher priority ranking than this task itself The program name must be enclosed in angle brackets If a task program not active is specified for the execution an error occurs SAMPLE START SUB_PGM T2 SUSFLG 0 L0 MOVE P P0 MOVE P P1 WAIT SUSFLG 1 SUSPEND T2 SUSFLG 0 GOTO L0 HALT Program name SUB_PGM SUBTASK ROUTINE SUBTASK WAIT...

Page 308: ...am 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 The program name must be enclosed in angle brackets If the program specified as the switching target does not exist a 3 203 Program doesn t exist code H0003 H00CB error occurs and operation stops SAMPLE SWI ABC Switches the execution ...

Page 309: ...dians Explanation Gives a tangent value for the expression value An error will occur if the expression 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 A 1 TAN DEGRAD 20 The 20 0 tangent value is assigned to array A 1 Related commands ATN COS DEGRAD RADDEG SIN ...

Page 310: ... 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 PRINT TCOUNTER Displays the P0 to P1 movement time until the axis enters the tolerance range on the programming box Related commands RESET ...

Page 311: ...rent 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 Related commands DATE TIMER ...

Page 312: ...in seconds counting from midnight This function is used to measure a program s run time etc The clock can be set in the SYSTEM mode s initial processing SAMPLE A TIMER FOR B 1 TO 10 MOVE P P0 MOVE P P1 NEXT A TIMER A PRINT A 60 A MOD 60 HALT Related commands TIME CAUTION The time indicated by the internal clock may differ somewhat from the actual time ...

Page 313: ...bits which are being used in a SEQUENCE program have priority while the SEQUENCE program is running SAMPLE TO0 B00000110 Functions Format LET TOm b b LET TO mb mb Values m port number b bit definition 0 1 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 Explanation Indicates the parallel port signal status SA...

Page 314: ...of the specified robot Format 2 The change is applied to only the axis specified by the axis number of the specified robot This statement is executed after positioning of the specified axes is complete within the tolerance range Functions Format TOLE 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 tolerance parameter...

Page 315: ...n execution only the torque value in the moving direction is changed to the value specified by the PUSH statement the value in the opposite direction is hold and not changed After these movements the value backs to the maximum torque command value when a next movement command MOVE statement for example is executed The TORQUE statement limits the torque in the both rotation and opposite direction o...

Page 316: ...Changes the max torque at the same time with the start of the movement WAIT ARM Waits for the completion of an operation of axis 1 of robot 1 TORQUE 1 100 Returns the max torque of axis 1 of robot 1 to the original value 100 MOVE P P0 Moves the robot 1 from its current position to the point specified with P0 Returns the max torque of axis 1 to the original value 100 at the same time with the start...

Page 317: ...ied 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 SAMPLE A TSKPGM 1 Assignes a program number registered in task 1 to variable A Related commands PGMTSK PGN ...

Page 318: ... binary decimal hexadecimal or real number format decimal point format exponential format The VAL value becomes 0 if the first character of the character string is or anything other than a numeric character If there are non numeric characters or spaces elsewhere in the character string all subsequent characters are ignored by this function However for hexadecimal expressions A to F are considered ...

Page 319: ...the execution status of other tasks When the conditional expression is a numeric expression an expression value other than 0 indicates TRUE status and 0 indicates FALSE status SAMPLE WAIT A 10 Wait status continues until variable A becomes 10 WAIT DI2 B01010110 Waits until DI 21 22 24 26 are turned on and DI 20 23 25 27 is turned off WAIT DI2 4 3 2 B101 Waits until DI 22 and DI 24 are turned on an...

Page 320: ...r Values robot number axis number 1 to 4 1 to 6 If not input robot 1 is specified Multiple axes not specifiable If not input all axes are specified Explanation Establishes wait status until the axis movement is completed is positioned within the tolerance range SAMPLE WAIT ARM Waits for the movement completion of robot 1 WAIT ARM 2 2 Waits for the movement completion of axis 2 of robot 2 Related c...

Page 321: ... WEIGHT robot number Values robot number 1 to 4 If not input robot 1 is specified Explanation Acquires the tip weight parameter value of the robot specified by robot number SAMPLE A 5 B 2 C WEIGHT The tip weight parameter of robot 1 is assigned to variable C WEIGHT A The tip weight parameter of robot 1 is changed to value 5 of variable A MOVE P P0 WEIGHT B The tip weight parameter of robot 1 is ch...

Page 322: ...xpression 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 SAMPLE A 0 WHILE DI3 0 0 A A 1 MOVE P P0 MOVE P P1 PRINT COUNTER A WEND HALT Related commands WHILE ...

Page 323: ...lse 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 Related commands WHRXY ...

Page 324: ... statement If the conditional expression condition is not met from the beginning false the command block between the WHILE and WEND statements is not executed and a jump occurs to the next statement after the WEND statement Jumping out of the WHILE to WEND loop is possible by using the GOTO statement etc When the conditional expression is a numeric expression an expression value other than 0 indic...

Page 325: ...ates 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 coordinate value of robot 1 is assigned to P10 Related commands WHERE ...

Page 326: ...m deg specified by the point expression to the joint coordinate data unit pulse of the robot specified by the robot number When the command is executed the data is converted based on the standard coordinates shift coordinates and hand definition that were set On SCARA robots the converted result differs depending on whether right handed or left handed is specified To convert joint coordinate data ...

Page 327: ...Chapter 9 PATH Statements 1 1 Overview 9 1 2 2 Features 9 1 3 3 How to use 9 1 4 4 Cautions when using this function 9 2 ...

Page 328: ......

Page 329: ...on Using the DO option permits signal outputs to a specified port at any desired position during movement 3 How to use The following robot language commands must be used as a set in order to use the PATH function PATH SET Starts path setting PATH PATH L PATCH C Specifies the path to be used PATH END Ends path setting PATH START Starts actual movement along the path As shown below the motion path i...

Page 330: ... in order to prevent errors from occurring Linear segments connection point Prevents a deviation 1 2 Increase the number of points High speed Low speed If an error occurs due the robot s inability to move at the specified speed Robot acceleration deceleration occurs if the speed setting is changed when PATH motion begins stops or at some point along the path At such times an error may occur before...

Page 331: ...e definition file 10 16 8 8 Hand definition file 10 18 9 9 Pallet definition file 10 20 1010General Ethernet port file 10 24 1111Input output name file 10 26 1212Area check output file 10 30 1313All file 10 32 1414Program directory file 10 34 1515Parameter directory file 10 36 1616Machine reference file 10 37 1717System configuration information file 10 39 1818Version information file 10 40 ...

Page 332: ...e file 10 46 2424Constant file 10 52 2525Array variable file 10 53 2626DI file 10 55 2727DO file 10 57 2828MO file 10 59 2929LO file 10 61 3030TO file 10 63 3131SI file 10 65 3232SO file 10 67 3333SIW file 10 69 3434SOW file 10 71 3535EOF file 10 73 3636Serial port communication file 10 74 3737Ethernet port communication file 10 75 ...

Page 333: ...n 3 3 Variable Constant Variable VAR ab by 3 3 Array variable ARY ab by x 3 3 Constant cc c 3 Status Program directory DIR bbbbbbbb 3 Parameter directory DPM 3 Machine reference sensor stroke end MRF 3 mark ARP 3 System configuration information CFG 3 Version information VER 3 Option board OPT 3 Self check SCK 3 Alarm history LOG 3 Remaining memory size MEM 3 Device DI port DI DIn 3 DO port DO DOn...

Page 334: ...ASCII character codes Only upper case alphabetic characters may be used in command statements lower case characters are prohibited Line lengths must not exceed 255 characters A cr lf data format designation indicates CR code 0Dh LF code 0Ah The terms reading out and writing used in this manual indicate the following data flow Reading out Controller external communication device Writing External co...

Page 335: ...rograms with the same name and with different program numbers the older program is deleted DATA FORMAT NAME program name cr lf PGN mmm cr lf aaaaa aaaaaaaaaaaaaa cr lf aaaaa aaaaaaaaaaaaaa cr lf NAME program name cr lf PGN mmm cr lf aaaaa aaaaaaaaaaaaaa cr lf aaaaa aaaaaaaaaaaaaa cr lf cr lf Values a Character code mmm Program number 1 to 100 Program names are shown with 32 characters or less cons...

Page 336: ...Program name 1 to 100 Program names are shown with 32 characters or less consisting of alphanumeric characters and _ underscore A line containing only cr lf is added at the end of the file indicating the end of the file At program writing operations be sure to specify the program name after NAME Program writing cannot occur if the program name is not specified When there is a program number with t...

Page 337: ...Point number 0 to 29999 Coordinate sign space Represent a numeric value of 8 digits or less When a dot is included this is treated as point data in mm units Each piece of data is separated by one or more spaces Extended hand system flag setting for SCARA robots 1 RIGHT 2 LEFT Hand system flags are valid only for SCARA robots with the coordinate data specified in mm units If a number other than 1 o...

Page 338: ...te 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 Response RUN cr lf P0 1 2 3 4 5 6 cr lf P1 426 200 160 770 0 001 337 210 0 000 0 000 0 1 0 cr lf P2 27 570 377 840 0 360 193 220 0 000 0 000 0 1 0 cr lf P29999 251 660 419 510 0 000 127 790 0 000 0 000 2 1 1 cr lf cr lf END cr lf ...

Page 339: ...RIGHT 2 LEFT Hand system flags are valid only for SCARA robots with the coordinate data specified in mm units If a number other than 1 or 2 is specified for a hand system flag or if no number is specified this is interpreted as 0 setting no hand system flag The first arm and the second arm rotation information is processed as 0 if a numeral other than 0 1 1 has been specified or if no numeral has ...

Page 340: ... cr lf PCmmmm sssssssssssssss cr lf PCmmmm sssssssssssssss cr lf PCmmmm sssssssssssssss cr lf cr lf Values mmmm Point comment number 0 to 29999 ss ss Comment data which can be up to 16 one byte characters If comment data exceeds 16 characters then the 17th character onward will be deleted A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND PCM TO...

Page 341: ...er 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 If comment data exceeds 16 characters then the 17th character onward will be deleted SAMPLE SEND PC1 TO CMU Outputs the specified point comment from the communication port Response RUN cr lf PC1 ORIGIN POS cr lf END cr lf ...

Page 342: ... character Otherwise 4 202 Input format error occurs ss ss Name data the second character onward Use one byte alphanumeric characters and _ underscore Otherwise 4 202 Input format error occurs If name data exceeds 16 characters then the 17th character onward will be deleted Name data must not be duplicate If name data were duplicate delete the name data with the ealier point name number and save t...

Page 343: ...999 a Name data the first character Use only one byte alphabetic character Otherwise 4 202 Input format error occurs ss ss Name data the second character onward Use one byte alphanumeric characters and _ underscore Otherwise 4 202 Input format error occurs If name data exceeds 16 characters then the 17th character onward will be deleted SAMPLE SEND PN1 TO CMU Outputs the specified point name from ...

Page 344: ...xxxxx cr lf parameter label cr lf R xxxxxx cr lf parameter label cr lf R A xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx cr lf parameter label cr lf R xxxxxx cr lf parameter label cr lf R A xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx cr lf parameter label cr lf C O xxxxxx xxxxxx xxxxxx xxxxxx cr lf cr lf Values RC Indicates the entire controller R Robot setting Robot number C Controller setting Controll...

Page 345: ...ter to VALID As parameters whose labels are enclosed in are controller configuration parameters take care when editing them As parameters whose labels are enclosed in affect robot control take care when editing them symbols may be displayed as depending on the computer environment SAMPLE SEND PRM TO CMU Outputs all parameters from the communication port Response RUN cr lf V1 22 R0191 V1 000 V1 09 ...

Page 346: ... label parameter label Meaning Parameter labels are shown with 8 alphabetic characters DATA FORMAT 1 parameter label cr lf RC xxxxxx cr lf cr lf DATA FORMAT 2 parameter label cr lf R xxxxxx cr lf cr lf DATA FORMAT 3 parameter label cr lf R A xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx cr lf cr lf DATA FORMAT 4 parameter label cr lf C xxxxxx cr lf cr lf DATA FORMAT5 parameter label cr lf R xxxxxx cr ...

Page 347: ...ing parameter data be sure that the servo is off Parameters are already compatible with upper versions However parameters might not always be compatible with lower versions upward compatibility When you attempt to load a parameter file of new version into a controller of an earlier version 10 214 Undefined parameter found error may occur In this case you may load the parameter by setting the PRM S...

Page 348: ...rrrr cr lf SMm fxxxxxx fyyyyyy fzzzzzz frrrrrr cr lf 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 The SPm and SMm inputs are optional in writing files SPm shift coordinate range plus side SMm shift coordinate range minus side A line containing only cr lf is added at the...

Page 349: ...er 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 A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND S0 TO CMU Outputs the specified shift coordinate from the communication port Response RUN cr lf S0 0 000 0 000 0 000 0 000 cr lf SP0 0 000 0 000 0...

Page 350: ...esent a real numeric value of 7 digits or less having 3 or less places below the decimal point or an integer of 7 digits or less This numeric format depends on the robot type setting and hand definition type R Indicates whether a hand is attached to the R axis A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND HND TO CMU Outputs all hand data fr...

Page 351: ...epresent a real numeric value of 7 digits or less having 3 or less places below the decimal point or an integer of 7 digits or less This numeric format depends on the robot type setting and hand definition type R Indicates whether a hand is attached to the R axis A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND H3 TO CMU Outputs the specified ...

Page 352: ...rrrrrr faaaaaa fbbbbbb t xr yr cr lf P 5 fxxxxxx fyyyyyy fzzzzzz frrrrrr faaaaaa fbbbbbb t xr yr cr lf PLm cr lf cr lf Values mmmm XY nnn ppppp f xxxxxx yyyyyy bbbbbbxr t Pallet number 0 to 39 Coordinate plane setting XY coordinate plane Number of points for each axis positive integer The point number used for a pallet definition Continuous 5 points starting with the specified point are used Coord...

Page 353: ... only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND PLT TO CMU Outputs all pallet definitions from the communication port Response RUN cr lf PL0 cr lf PLN XY cr lf NX 3 cr lf NY 4 cr lf NZ 2 cr lf PLP 3996 cr lf P 1 0 000 0 000 0 000 0 000 0 000 0 000 cr lf P 2 100 000 0 000 0 000 0 000 0 000 0 000 cr lf P 3 0 000 100 000 0 000 0 000 0 000 0 000 cr lf P 4 100 000...

Page 354: ...z frrrrrr faaaaaa fbbbbbb t xr yr cr lf cr lf Values m nnn ppppp f xxxxxx yyyyyy bbbbbbxr t Pallet number 0 to 39 Number of points for each axis positive integer The point number used for a pallet definition Continuous 5 points starting with the specified point are used Coordinate sign space Represent a numeric value of 8 digits or less When a dot is included this is treated as point data in mm un...

Page 355: ...ied at the first arm and the second arm rotation information or if no value is specified this will be processed as 0 A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND PL2 TO CMU Outputs the specified pallet definition from the communication port as shown below Response RUN cr lf PL2 cr lf PLN XY cr lf NX 3 cr lf NY 3 cr lf NZ 2 cr lf PLP 3986 c...

Page 356: ... lf EOL e cr lf TYPE t cr lf TYPE t cr lf cr lf Values m n aaa ppppp e t General Ethernet port number 0 to 7 Mode 0 Server 1 Client IP address 0 to 255 Port number 0 to 65535 Termination character code 0 CRLF 1 CR Port type 0 TCP When Client mode is selected in the write file IP address and port number Set the IP address and port number of the connection destination server When Server mode is sele...

Page 357: ...e 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 MODE 1 cr lf IPADRS 192 168 0 1 cr lf PORT 100 cr lf EOL 0 cr lf TYPE 0 cr lf GP1 cr lf MODE 1 cr lf IPADRS 192 168 0 100 cr lf PORT 200 cr lf EOL 0 cr lf TYPE 0 cr lf cr lf END cr lf ...

Page 358: ...one byte alphabetic character Otherwise 4 202 Input format error occurs ss ss Name data the second character onward Use one byte alphanumeric characters and underscore _ Otherwise 4 202 Input format error occurs If name data exceeds 16 characters then the 17th character onward will be deleted A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND IO...

Page 359: ...ormat error occurs Name data the second character onward Use one byte alphanumeric characters and underscore _ Otherwise 4 202 Input format error occurs If name data exceeds 16 characters then the 17th character onward will be deleted A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND DONM TO CMU Outputs the specified input output name data from...

Page 360: ...4 202 Input format error occurs Name data the second character onward Use one byte alphanumeric characters and underscore _ Otherwise 4 202 Input format error occurs If name data exceeds 16 characters then the 17th character onward will be deleted A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND DONM2 TO CMU Outputs the specified input output ...

Page 361: ... 7 10 to 15 b Bit number 0 to 7 a Name data the first character Use only one byte alphabetic character Otherwise 4 202 Input format error occurs ss ss Name data the second character onward Use one byte alphanumeric characters and underscore _ Otherwise 4 202 Input format error occurs If name data exceeds 16 characters then the 17th character onward will be deleted A line containing only cr lf is a...

Page 362: ...l cr lf ACm r p1 p2 t n l cr lf ACm r p1 p2 t n l cr lf cr lf Values m r p1 p2 t n l Area check output number 0 to 31 Robot number 0 to 4 0 Invalid Comparison point number 1 0 to 29999 Comparison point number 2 0 to 29999 Port type 0 DO SO 1 DO 2 SO 3 MO Port number 20 to 277 Logic 0 OFF 1 ON A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND AC...

Page 363: ... p2 t n l cr lf Values m r p1 p2 t n l Area check output number 0 to 31 Robot number 0 to 4 0 Invalid Comparison point number 1 0 to 29999 Comparison point number 2 0 to 29999 Port type 0 DO SO 1 DO 2 SO 3 MO Port number 20 to 277 Logic 0 OFF 1 ON A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND AC0 TO CMU Outputs specified area check output d...

Page 364: ...zzz faaaaaa fbbbbbb t cr lf cr lf PCM All point comment format PCmmmm ssssssssssssssss cr lf PCmmmm ssssssssssssssss cr lf cr lf PNM All point name format PNmmmm asssssssssssssss cr lf PNmmmm asssssssssssssss cr lf cr lf PRM All parameter format parameter label cr lf RC xxxxxx cr lf parameter label cr lf R xxxxxx cr lf cr lf SFT All shift format Sm fxxxxxx fyyyyyy fzzzzzz frrrrrr cr lf SMm fxxxxxx...

Page 365: ...ck output format ACm r p1 p2 t n l cr lf ACm r p1 p2 t n l cr lf cr lf END All file end In readout files only items whose data is saved in the controller is readout In writing files xxx determines the data file s format and this format is saved at the controller Example HND All text data up the next xxx is saved at the controller as all hand format data SAMPLE SEND ALL TO CMU Outputs all files of ...

Page 366: ...n the program was updated Byte size of program 7 digits File attribute RW Readable writable RO Not writable read only H Hidden file Flag m Main program c Current program s Sequence program Program name shown with 32 characters or less consisting of alphanumeric characters and _ underscore A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND DIR TO...

Page 367: ... ff sss ssssss Program number 1 to 100 Date when the program was updated Time when the program was updated Byte size of program 7 digits File attribute RW Readable writable RO Not writable read only H Hidden file Flag m Main program c Current program s Sequence program Program name shown with 32 characters or less consisting of alphanumeric characters and _ underscore SAMPLE SEND TEST TO CMU Outpu...

Page 368: ...characters or less having some symbols Attribute Input method 0 Direct input 1 to 12 Selective input Input range n1 Minimum value n2 Maximum value Selective input value n1 to n12 Units Parameter labels are shown with 6 alphabetic characters A line containing only cr lf is added at the end of the file indicating the end of the file symbols may be shown as depending on the computer environment SAMPL...

Page 369: ...t number 1 to 4 mmm Machine reference value 0 to 100 This file reads out the machine reference values of the axes set to the robots Example When the 1st through 6th axes of the robot 1 and 1st and 3rd axes of the robot 2 are connected the data is shown as follows R1A mmm mmm mmm mmm mmm mmm R2A mmm mmm A line containing only cr lf is added at the end of the file indicating the end of the file SAMP...

Page 370: ... 4 mmm Machine reference value 0 to 100 This file reads out the machine reference values of the axes set to the robots Example When the 1st through 6th axes of the robot 1 and 1st and 3rd axes of the robot 2 are connected the data is shown as follows R1A mmm mmm mmm mmm mmm mmm R2A mmm mmm A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND ARP T...

Page 371: ...es m nnn s b kkkkkk ff r aaaa hhhhhh Controllr number 1 onward Controller ID number Specification G CE specification L Normal specification Brake power I Internal E External Memory size MAC address Robot number 1 to 4 Robot ID number Connected axis number A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND CFG TO CMU Outputs all the system config...

Page 372: ...xx 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 SAMPLE SEND VER TO CMU Outputs all files of the version information from the communication port Response RUN cr lf C1 V1 22 R0191 V1 000 V1 09 R0015 V1 09 R0015 cr lf C2 V1 22 R0191 V1 000 V1 09 R0015 V1 09 R0015 cr lf C3 V1 22 ...

Page 373: ... cr lf Values m n aaaaaa b bb Controllr number 1 onward Option board number inside the controller Slot number 1 to 4 Option board name Option board version A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND OPT TO CMU Outputs all files of the option boards from the communication port Response RUN cr lf C1O1 Gripper V0 32 cr lf C1O2 Gripper V0 32...

Page 374: ...C Entire controller R Robot Robot number C Controller Controller number A Axis Axis number M Driver Driver number R Option board Option board number inside the controller T Task Task number ETH Ethernet CMU RS 232CBrake power A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND SCK TO CMU Outputs all files of the self check information from the co...

Page 375: ...kkkkkk 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 iiiii jjjjjjjj kkkkkkkk llllllll oooooooo pppppppp pppppppp pppppppp pppppppp pppppppp pppppppp q cr lf cr lf ...

Page 376: ...utomatic mode with other devices CMU RS 232C Program number Program execution line Point number Parallel input Port o to 3 hexadecimal Parallel output Port o to 3 hexadecimal Serial input Port o to 3 hexadecimal Serial output Port o to 3 hexadecimal Alarm occurrence location A1 to A6 Hand system 0 NONE 1 RIGHT 2 LEFT A line containing only cr lf is added at the end of the file indicating the end o...

Page 377: ... 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 SAMPLE SEND MEM TO CMU Outputs all files of the remaining memory size from the communication port Response RUN cr lf PGM PNT AREA 2088547 2100000 ...

Page 378: ...fined in the program Variable name is shown with 32 characters or less consisting of alphanumeric characters and _ underscore Type of variable Real number Integer Character string Value of variable Integer type Integer of 2147483647 to 2147483647 Real type Real number of 7 digits or less including decimal fractions Character type Character string of 255 characters or less A line containing only cr...

Page 379: ...ing Value of variable Integer type Integer of 8 digits or less Real type Real number of 7 digits or less including decimal fractions Character type Character string of 255 characters or less Dynamic global variables are registered during program execution Variables cannot be referred to unless they are registered SAMPLE 1 SEND A TO CMU cr lf Outputs the specified variable A from the communication ...

Page 380: ...nteger type static variable is written Format SGI Meaning Expresses all integer static variables DATA FORMAT SGIn xxxxxx cr lf SGIn xxxxxx cr lf SGIn xxxxxx cr lf cr lf Values n Integer type static variable number 0 to 31 xxxxxx Integer of 2147483647 to 2147483647 A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND SGI TO CMU Outputs all integer ...

Page 381: ...GIm 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 Outputs the specified integer type static variables SGI1 from the communication port Response RUN cr lf 0 cr lf END cr lf ...

Page 382: ... is written Format SGR Meaning Expresses all real type static variables DATA FORMAT SGRn xxxxxx cr lf SGRn xxxxxx cr lf SGRn xxxxxx cr lf cr lf Values n Real type static variable number 0 to 31 xxxxxx Real number of 7 digits or less including decimal fractions A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND SGR TO CMU Outputs all real type st...

Page 383: ... 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 Outputs the specified real type static variables SGR1 from the communication port Response RUN cr lf 0 cr lf END cr lf ...

Page 384: ...his file cannot be used as a write file Format character string Meaning Expresses a specified character string DATA FORMAT sssss ssssss cr lf 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: ... and _ underscore Type of variable Real number Integer Character string Indicate array arguments Differs depending on the type of array variable Integer type Integer of 2147483647 to 2147483647 Real type Real number of 7 digits or less including decimal fractions Character type Character string of 255 characters or less VA line containing only cr lf is added at the end of the file indicating the e...

Page 386: ..._ underscore Type of variable Real number Integer Character string Indicate array arguments Differs depending on the type of array variable Integer type Integer of 2147483647 to 2147483647 Real type Real number of 7 digits or less including decimal fractions Character type Character string of 255 characters or less Array variables defined by the DIM statement are registered during compiling Array ...

Page 387: ...nnnnnnnn cr lf DI27 Bnnnnnnnn cr lf cr lf Values n 0 or 1 total of 8 digits A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND DI TO CM Outputs all DI information from the communication port Response DI0 B10001001 cr lf DI1 B00000010 cr lf DI2 B00000000 cr lf DI7 B00000000 cr lf DI10 B00000000 cr lf DI11 B00000000 cr lf DI12 B00000000 cr lf DI17...

Page 388: ...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 m 0 to 7 10 to 17 20 to 27 n 0 or 1 total of 8 digits Corresponds to m7 m6 m0 reading from the left m is the port number SAMPLE SEND DI5 TO CMU Outputs the DI5 port status from the communication port Response RUN cr lf DI15 B00000000 cr lf END cr lf ...

Page 389: ...RMAT DO0 Bnnnnnnnn cr lf DO1 Bnnnnnnnn cr lf DO27 Bnnnnnnnn cr lf cr lf Values n 0 or 1 total of 8 digits A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND DO TO CMU Outputs all DO information from the communication port Response RUN cr lf DO0 B10001001 cr lf DO1 B00000010 cr lf DO2 B00000000 cr lf DO7 B00000000 cr lf DO10 B00000000 cr lf DO11 ...

Page 390: ...ort Writing to DO0 and DO1 is prohibited Readout file DATA FORMAT DOm Bnnnnnnnn cr lf Write file DATA FORMAT Bnnnnnnnn cr lf or k cr lf Values m Port number 0 to 7 10 to 17 20 to 27 n 0 or 1 total of 8 digits Corresponds to m7 m6 m0 reading from the left m is the port number k Integer from 0 to 255 Writing to DO0 and DO1 is prohibited Only referencing is permitted SAMPLE SEND DO5 TO CMU Outputs th...

Page 391: ...r lf MO1 Bnnnnnnnn cr lf MO37 Bnnnnnnnn cr lf cr lf Values n 0 or 1 total of 8 digits A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND MO TO CMU Outputs all MO information from the communication port Response RUN cr lf MO0 B10001001 cr lf MO1 B00000010 cr lf MO2 B00000000 cr lf MO7 B00000000 cr lf MO10 B00000000 cr lf MO11 B00000000 cr lf MO12...

Page 392: ...riting to MO30 to MO37 is prohibited Readout file DATA FORMAT MOm Bnnnnnnnn cr lf Write file DATA FORMAT Bnnnnnnnn cr lf or k cr lf Values m Port number 0 to 7 10 to 17 20 to 27 30 to 37 n 0 or 1 total of 8 digits Corresponds to m7 m6 m0 reading from the left m is the port number k Integer from 0 to 255 Writing to MO30 to MO37 is prohibited Only reference is permitted SAMPLE SEND MO5 TO CMU Output...

Page 393: ... LO port Format LO Meaning Expresses all LO internal output variable information DATA FOMAT LO0 Bnnnnnnnn cr lf LO1 Bnnnnnnnn cr lf cr lf Values n 0 or 1 total of 8 digits A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND LO TO CMU Outputs all LO status from the communication port Response RUN cr lf LO0 B10001001 cr lf LO1 B00100100 cr lf cr lf...

Page 394: ...ified LO port Format LOm Meaning Expresses the status of one LO port Readout file DATA FORMAT LOm Bnnnnnnnn cr lf Write file DATA FORMAT Bnnnnnnnn cr lf or k cr lf Values m Port number 0 1 n 0 or 1 total of 8 digits Corresponds to m7 m6 m0 reading from the left m is the port number k Integer from 0 to 255 SAMPLE SEND LO0 TO CMU Outputs the LO0 port status from the communication port Response RUN c...

Page 395: ...d TO port Format TO Meaning Expresses all TO timer output variable information DATA FORMAT TO0 Bnnnnnnnn cr lf TO1 Bnnnnnnnn cr lf cr lf Values n 0 or 1 total of 8 digits A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND TO TO CMU Outputs all TO status from the communication port Response RUN cr lf TO0 B10001001 cr lf TO1 B10001001 cr lf cr lf ...

Page 396: ...fied TO port Format TOm Meaning Expresses the status of one TO port Readout file DATA FORMAT TOm Bnnnnnnnn cr lf Write file DATA FORMAT Bnnnnnnnn cr lf or k cr lf Values m Port number 0 1 n 0 or 1 total of 8 digits Corresponds to m7 m6 m0 reading from the left m is the port number k Integer from 0 to 255 SAMPLE 1 SEND TO0 TO CMU Outputs the TO0 port status from the communication port Response RUN ...

Page 397: ...nnnn cr lf SI27 Bnnnnnnnn cr lf cr lf Values n 0 or 1 total of 8 digits A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND SI TO CMU Outputs all SI status from the communication port Response RUN cr lf SI0 B10001001 cr lf SI1 B00000010 cr lf SI2 B00000000 cr lf SI7 B00000000 cr lf SI10 B00000000 cr lf SI11 B00000000 cr lf SI12 B00000000 cr lf SI...

Page 398: ...annot be used as a write file Format SIm Meaning Expresses the status of one SI port DATA FORMAT SIm Bnnnnnnnn cr lf Values m Port number 0 to 7 10 to 17 20 to 27 n 0 or 1 total of 8 digits Corresponds to m7 m6 m0 reading from the left m is the port number SAMPLE SEND SI5 TO CMU Outputs the SI5 port status from the communication port Response RUN cr lf SI5 B00000000 cr lf END cr lf ...

Page 399: ...ORMAT SO0 Bnnnnnnnn cr lf SO1 Bnnnnnnnn cr lf SO27 Bnnnnnnnn cr lf cr lf Values n 0 or 1 total of 8 digits A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND SO TO CMU Outputs all SO status from the communication port Response RUN cr lf SO0 B10001001 cr lf SO1 B00000010 cr lf SO2 B00000000 cr lf SO7 B00000000 cr lf SO10 B00000000 cr lf SO11 B000...

Page 400: ...SO port Writing to SO0 and SO1 is prohibited Readout file DATA FORMAT SOm Bnnnnnnnn cr lf Write file DATA FORMAT Bnnnnnnnn cr lf or k cr lf Values m Port number 0 to 7 10 to 17 20 to 27 n 0 or 1 total of 8 digits Corresponds to m7 m6 m0 reading from the left m is the port number k Integer from 0 to 255 Writing to SO0 and SO1 is prohibited Only reference is permitted SAMPLE SEND SO5 TO CMU Outputs ...

Page 401: ...l SIW serial word input data DATA FORMAT SIW 0 Hnnnn cr lf SIW 1 Hnnnn cr lf SIW 15 Hnnnn cr lf cr lf Values n 0 to 9 A to F 4 digits hexadecimal A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND SIW TO CMU O u t p u t s a l l S I W d a t a f r o m t h e communication port Response RUN cr lf SIW 0 H1001 cr lf SIW 1 H0010 cr lf SIW 2 H0000 cr lf...

Page 402: ...ied SIW status is read out in 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 m 0 to 15 n 0 to 9 A to F 4 digits hexadecimal SAMPLE SEND SIW 5 TO CMU Outputs SIW 5 from the communication port Response RUN cr lf SIW 5 H1001 cr lf END cr lf ...

Page 403: ...serial word output data Writing to SOW 0 and SOW 1 is prohibited DATA FORMAT SOW 0 Hnnnn cr lf SOW 1 Hnnnn cr lf SOW 15 Hnnnn cr lf cr lf Values n 0 to 9 A to F 4 digits hexadecimal A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE SEND SOW TO CMU O u t p u t s a l l S O W d a t a f r o m t h e communication port Response RUN cr lf SOW 0 H1001 cr lf...

Page 404: ...to the specified SOW port Format SOW m Meaning Expresses one SOW status Writing to SOW 0 and SOW 1 is prohibited Readout file DATA FORMAT SOW m Hnnnn cr lf Write file DATA FORMAT Hnnnn Values m 2 to 15 n 0 to 9 A to F 4 digits hexadecimal A line containing only cr lf is added at the end of the file indicating the end of the file SAMPLE 1 SEND SOW 5 TO CMU Outputs SOW 5 from the communication port ...

Page 405: ... 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 DATA FORMAT Z 1Ah SAMPLE SEND PGM TO CMU SEND EOF TO CMU Outputs EOF data from the communication port NAME TEST1 cr lf A 1 cr lf HALT cr lf cr lf Z A Z code may be required at the end of the transmitted file depending on the specifications of the recei...

Page 406: ...e 36 1 Serial port communication file Read out 3 Write 3 Format CMU Meaning Expresses the serial communication port Depends on the various data formats SAMPLE SEND PNT TO CMU Outputs all point data from the communication port SEND CMU TO PNT Inputs all point data from the communication port ...

Page 407: ...ication file 37 1 Ethernet port communication file Read out 3 Write 3 Format ETH Meaning Expresses the Ethernet port Depends on the various data formats SAMPLE SEND PNT TO ETH Outputs all point data from the Ethernet port SEND ETH TO PNT Inputs all point data from the Ethernet port ...

Page 408: ......

Page 409: ...Chapter 11 User program examples 1 1 Basic operation 11 1 2 2 Application 11 8 ...

Page 410: ......

Page 411: ...ng point data in the program Processing flow 300 000 300 000 50 000 90 000 0 000 0 000 PTP movement 300 000 100 000 0 000 0 000 0 000 0 000 PTP movement 200 000 200 000 10 000 90 000 0 000 0 000 PTP movement START STOP 33C01 R7 00 SAMPLE MOVE P 300 000 300 000 50 000 90 000 0 000 0 000 MOVE P 300 000 100 000 0 000 0 000 0 000 0 000 MOVE P 200 000 200 000 10 000 90 000 0 000 0 000 HALT ...

Page 412: ... P1 100 0000 000 150 000 30 000 0 000 0 000 P2 0 000100 000 50 000 0 000 0 000 0 000 P3 300 000300 000 0 000 0 000 0 000 0 000 P4 300 000100 000100 000 90 000 0 000 0 000 P5 200 000200 000 0 000 0 000 0 000 0 000 Processing flow PTP movement to P0 PTP movement to P1 PTP movement to P2 PTP movement to P3 PTP movement to P4 PTP movement to P5 START STOP 33C02 R7 00 SAMPLE 1 MOVE P P0 MOVE P P1 MOVE ...

Page 413: ...is set in S1 and P3 P4 P5 are set as described in the previous section 1 2 Using point numbers SHIFT DATA S0 0 000 0 000 0 000 0 000 S1 140 000 100 000 0 000 0 000 Shift Coordinate P3 X 140mm shift Y 100mm shift P5 P4 Y X Shift Coordinate S0 Shift Coordinate S1 0 140 100 33C03 R7 00 SAMPLE SHIFT S0 Shift 0 FOR J 3 TO 5 Repeated movement from P3 to P5 MOVE P P J NEXT J SHIFT S1 Changed to shift 1 F...

Page 414: ... between point P0 and each pallet POINT DATA Work supply position P0 0 000 0 000 0 000 0 000 0 000 0 000 X axis pitch P10 50 000 0 000 0 000 0 000 0 000 0 000 Y axis pitch P20 0 000 25 000 0 000 0 000 0 000 0 000 N1 position P1 100 000 50 000 0 000 0 000 0 000 0 000 Calculating point coordinates X N16 N17 N18 N19 N20 N11 N12 N13 N14 N15 N6 N7 N8 N9 N10 N1 N2 N3 N4 N5 50 25 P0 Y 33C04 R7 00 Process...

Page 415: ...7 8 9 10 11 12 13 Basic operation 11 5 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 ...

Page 416: ...ch pallet POINT DATA Work supply position P0 0 000 0 000 200 000 0 000 0 000 0 000 Pallet definition PL0 NX 3 NY 4 NZ 2 PLP 3996 P3996 to P4000 are used P 1 100 000 50 000 200 000 0 000 0 000 0 000 P 2 200 000 50 000 200 000 0 000 0 000 0 000 P 3 100 000 200 000 200 000 0 000 0 000 0 000 P 4 200 000 200 000 200 000 0 000 0 000 0 000 P 5 100 000 50 000 100 000 0 000 0 000 0 000 Utilizing pallet mov...

Page 417: ...Wait until DI20 to DI27 become 0 DO20 to DO27 become 1 Wait until DI20 becomes 1 DO processing ends if DI2 1 is 1 Repeated until N 20 if DI2 1 is 0 1 is assigned to N 33C08 R7 00 SAMPLE WAIT DI2 0 Waits until DI20 to DI27 become 0 DO2 B11111111 DO20 to DO27 become 1 DELAY 1000 WAIT DI2 0 1 Waits until DI20 becomes 1 N 1 LOOP1 IF DI2 1 1 THEN PROGEND Jumps to PROGEND if DI21 1 IF N 20 THEN ALLEND E...

Page 418: ...d set the P1 and P2 positions by teaching 2 I O signal DO 20 Chuck gripper open close 0 open 1 close A 0 1 second wait time is set during chuck open and close SAMPLE When calculating to find P3 and P4 P3 P1 P1 coordinates are assigned to P3 P4 P2 P2 coordinates are assigned to P4 LOC3 P3 LOC3 P3 50 000 Axis 3 data of P3 is shifted 50mm in upper direction LOC3 P4 LOC3 P4 50 000 Axis 3 data of P4 is...

Page 419: ...C3 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 OPEN Chuck OPEN routine DO2 0 0 DELAY 100 RETURN CLOSE Chuck CLOSE routine DO2 0 1 DELAY 100 RETURN ...

Page 420: ... feeder 33C10 R7 00 Precondition 1 I O signal DI 30 Component detection sensor 1 Parts are supplied DI 31 Pallet sensor 1 Pallet is loaded DO 30 Robot hand open close 0 Open 1 Close DO 31 Pallet eject 1 Eject Robot hand open close time is 0 1 seconds and pallet eject time is 0 5 seconds 2 The points below should be input beforehand as point data P0 Part supply position P1 Pallet reference position...

Page 421: ... DELAY 100 NEXT NEXT DRIVE 3 0 Only 3 axis of robot 1 moves to 0 DO 31 1 Pallet is ejected DELAY 500 DO 31 0 WEND Loop is repeated HALT SAMPLE 2 When using the palletizing function Precondition Must be defined at pallet 0 WHILE 1 All repeated FOR A 1 TO 9 WAIT DI 31 1 Wait until a pallet present status occurs WAIT DI 30 1 Wait until the supplied component present status occurs DO 30 0 Robot hand O...

Page 422: ...sensor 1 Parts are supplied DI 31 Robot hand open close 0 Open 1 Close Robot hand open close time is 0 1 seconds 2 The points below should be input beforehand as point data P1 Bottom of block 1 P2 Bottom of block 2 P3 Bottom of block 3 P5 Position on conveyor 3 Movement proceeds at maximum speeds but slows down when in proximity to the part Processing flow P5 P1 P5 P1 P4 WHERE P4 WHERE High speed ...

Page 423: ...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 HALT OPEN DO3 0 0 DELAY 100 RETURN CLOSE DO3 0 1 DELAY 100 RETURN ...

Page 424: ...3 2 1 0 Testing device 1 test completed 3 Testing device 1 OK NG signal Part supply 1 Part 1 OK Part 1 NG DI2 7 6 5 4 3 2 1 0 DI3 7 6 5 4 3 2 1 0 Testing device 1 start 0 1 second Robot chuck open close DO2 1 Start 1 0 Open 1 Close 2 7 6 5 4 3 2 1 0 Testing device 2 test completed 3 Testing device 2 OK NG signal Part supply 2 Part 2 OK Part 2 NG 33C14 R7 00 2 The main task task 1 is used to test p...

Page 425: ...ting device 1 Chuck open Move upward 10000 pulses Exclusive control flag reset Testing device 1 start Test completed Exclusive control flag set Move to testing device 1 Chuck close Part OK OK parts Move to OK parts position Chuck open Move upward 10000 pulses Exclusive control flag reset NG parts FLAG1 0 FLAG2 0 Move to NG parts position FLAG1 0 FLAG1 1 FLAG1 0 FLAG1 1 N Y Y N Y N Y N Y Y Y N Y N ...

Page 426: ...LAY 100 DO3 0 0 WAIT DI3 0 1 WAIT FLAG1 0 FLAG2 1 MOVE P P12 Z UPPOS GOSUB CLOSE IF DI3 1 1 THEN GOOD WAIT DI3 3 0 MOVE P P13 Z UPPOS ELSE NG WAIT DI3 4 0 MOVE P P14 Z UPPOS ENDIF GOSUB OPEN DRIVEI 3 10000 FLAG2 0 GOTO S1 common routine Program name COMMON OPEN DO2 1 0 DELAY 100 RETURN CLOSE DO2 1 1 DELAY 100 RETURN Subtask Start Part supply standby Othertaskswaitingforstandby status Exclusive con...

Page 427: ...P7 are set by teaching SAMPLE MOVE P P0 Z 0 SPEED 40 PATH SET Start of robot 1 s path setting PATH L P1 DO 20 1 10 000 Start of sealing at a 10mm position PATH L P2 PATH C P3 P4 PATH L P5 PATH L P6 S 30 PATH L P7 DO 20 0 20 000 End of sealing at a 20mm position PATH END End of robot 1 s path setting PATH START Path motion of robot 1 is executed Robot 1 starts moving from P0 and stops at P7 HALT Se...

Page 428: ... POINT DATA P10 156 420243 910 0 000 0 000 0 000 0 000 cr lf SAMPLE INIT VCMD SDATA X Y Command Requiring the Movement position P0 0 000 0 000 0 000 0 000 0 000 0 000 An initial position MAIN ROUTINE MOVE P P0 Moves to the initial position ST SEND VCMD TO CMU Sends the command SEND CMU TO P10 Receives the destination point to move to MOVE P P10 Moves to the reception position GOTO ST SEND xxx TO C...

Page 429: ...m among the character strings The VAL function obtains the value from the character string SAMPLE INIT VCMD SDATA X Y Command Requiring the Movement position P0 0 000 0 000 0 000 0 000 0 000 0 000 An initial position P11 100 000 100 000 0 000 0 000 0 000 0 000 A reception position MAIN ROUTINE MOVE P P0 Moves to the initial position ST SEND VCMD TO CMU Sends the command SEND CMU TO VIN R e c e i v...

Page 430: ...N VIN LOOP IF I VMAX THEN GOTO E_LOOP C MID VIN I 1 IF C X THEN I I 2 J I X_LOOP C MID VIN J 1 IF C THEN X1_LP L J I VX MID VIN I L I J 1 GOTO LOOP ENDIF J J 1 IF J VMAX THEN GOTO X1_LP GOTO X_LOOP ENDIF IF C Y THEN I I 2 J I Y_LOOP C MID VIN J 1 IF C THEN Y1_LP L J I VY MID VIN I L I J 1 GOTO LOOP ENDIF J J 1 IF J VMAX THEN GOTO Y1_LP GOTO Y_LOOP END IF I I 1 GOTO LOOP E_LOOP WX VAL VX WY VAL VY ...

Page 431: ... List 12 1 2 2 Operation and setting commands 12 9 3 3 Reference commands 12 23 4 4 Operation commands 12 37 5 5 Data file operation commands 12 41 6 6 Utility commands 12 52 7 7 Individual execution of robot language 12 54 8 8 Control codes 12 55 ...

Page 432: ......

Page 433: ... of transmission data RS 232C CR 0Dh and LF 0Ah are added to the end of the line when the Termination code parameter of communication parameters is set to CRLF CR 0Dh is added to the end of the line when the Termination code parameter of communication parameters is set to CR Ethernet CR 0Dh and LF 0Ah are added to the end of the line When data is received then the data up to CR 0Dh is treated as o...

Page 434: ...PEED robot number k robot number 1 4 k 1 100 2 Move to absolute reset position ABSADJ robot number k f robot number 1 4 k 1 6 f 0 1 3 Absolute reset MRKSET robot number k robot number 1 4 k 1 6 3 Return to origin ORGRTN robot number k robot number 1 4 k 1 6 3 Change inching movement amount IDIST robot number k robot number 1 4 k 1 10000 2 Manual movement inching INCH INCHXY INCHT robot number km r...

Page 435: ...ram Point Point comment Point name Shift Hand Pallet General Ethernet Port Input output name Area check output All data except parameters Parameter All data MEM PRM INIT PGM PNT PCM PNM SFT HND PLT GEP ION ACO MEM PRM ALL 3 Initialize data Communication parameter INIT CMU ETH 3 Initialize data Alarm history INIT LOG 3 Setting Input data INPUT SET d CAN CLR d input data 2 Buffer clear Output messag...

Page 436: ...umber robot number 1 4 Return to origin status ORIGIN robot number robot number 1 4 Sequence program execution status SEQUENCE Servo status SERVO robot number robot number 1 4 Selected shift status SHIFT robot number robot number 1 4 Acquire task in RUN or SUSPEND status TASKS Task end condition TSKECD Tk k 1 16 Task operation status TSKMON Tk k 1 16 Version information VER Numerical data numerica...

Page 437: ...uage table Control code Operation type Command Option Condition Execution language interruption C 03H 1 Conditions 1 Always executable 2 Not executable during inputs from the programming box 3 Not executable during inputs from the programming box and while the program is running 4 Not executable during inputs from the programming box while the program is running and when specific restrictions appl...

Page 438: ...ber 1 4 Acquire manual movement speed ORIGIN robot number robot number 1 4 Acquire return to origin status SEQUENCE Acquire sequence program execution status SERVO robot number robot number 1 4 Acquire servo status SHIFT robot number robot number 1 4 Acquire selected shift status TASKS Acquire task in RUN or SUSPEND status TSKECD Tk k 1 16 Acquire task end condition TSKMON Tk k 1 16 Acquire task o...

Page 439: ...area check output 3 ALL Initialize all data MEM PRM CMU Initialize communication parameter RS 232C ETH Initialize communication parameter Ethernet GEP Initialize General Ethernet Port HND Initialize hand data ION Initialize input output name LOG Initialize alarm history MEM Initialize all data except parameters PCM Initialize point comment data PGM Initialize program data PLT Initialize pallet dat...

Page 440: ...ogram name PGm m 1 100 n 1 16 Program Skip one line 4 SKIPTO Tn k program name PGm m 1 100 n 1 16 k 1 9999 Program Skip before specified line 2 STEP Tn program name PGm m 1 100 n 1 16 Program Execute one line 4 STOP Tn program name PGm m 1 100 n 1 16 Stop program 2 SYNCHK program name k PGm m 1 100 k 1 100 Check program syntax 2 TEACH TCHXY robot number m robot number 1 4 m 0 29999 Point data teac...

Page 441: ...ed the task with the smallest number of those that have not been started is specified automatically When task priority p is omitted 32 is specified The smaller value the higher priority The larger value the lower priority high 1 to low 64 When the task with a high task priority is in the RUNNING status the task with a low task priority still remains in the READY status SAMPLE Command LOAD PG_MAIN ...

Page 442: ...rams Response OK cr lf Command RESET T3 cr lf Resets only the program that is executed by T3 Response OK cr lf 3 Program execution Command format 1 RUN cr lf 2 RUN Tn cr lf program name PGm Response format OK cr lf Values n Task number 1 to 16 m Program number 1 to 100 Meaning Executes or stops the current program Command format 1 executes all programs in the STOP status Command format 2 executes ...

Page 443: ...ll programs Response OK cr lf Command STOP T3 cr lf Stops only the program that is executed by T3 Response OK cr lf 5 Execute one program line Command format STEP Tn cr lf program name PGm Command format OK cr lf Values n Task number 1 to 16 m Program number 1 to 100 Meaning Executes one line of the specified program When executing one line of the GOSUB statement or CALL statement the program oper...

Page 444: ...e Command format NEXT Tn cr lf program name PGm Response format OK cr lf Values n Task number 1 to 16 m Program number 1 to 100 Meaning Executes the specified program to the next line Executing NEXT on the line in the GOSUB or in the CALL statement make the program execute and return through the sub procedure processing then stop at the next line This is a same processing as setting the breakpoint...

Page 445: ...nd RUNTO T3 15 cr lf Executes the program that is executed by T3 to the 14th line and stops at the 15th line Response OK cr lf 9 Skip program to line before specified line Command format SKIPTO Tn k cr lf program name PGm 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 Skips the specified program to the line before the specif...

Page 446: ... 9999 k Set Cancel 0 Set 1 Cancel Meaning Sets a break point to pause the program during program execution Command format 1 sets or cancels a break point in the specified line of the specified program Multiple lines can also be specified Command format 2 cancels all break points set in the specified program Command format 3 cancels all break points SAMPLE Command BREAK PG3 1 3 1 cr lf Sets a break...

Page 447: ...or program number If there are syntax errors in the specified program line number where error occurred alarm group number and alarm classification number are output For details regarding alarm group number and alarm classification number refer to the YRCX Controller User s Manual or YRCX Controller Operator s Manual SAMPLE Command SYNCHK PG1 100 cr lf Sets a Maximum number of error at 100 and chec...

Page 448: ...ams SAMPLE Command MAINPG 1 cr lf Sets program number 1 at the main program Response OK cr lf 13 Compile sequence program Command format SEQCMPL cr lf Response format RUN cr lf END cr lf Meaning Compiles the sequence program When the program named SEQUENCE doesn t exist or syntax errors exist in the program an error message appears The execution program is created after successful termination of c...

Page 449: ... OK cr lf 2 Point data teaching Command format TEACH robot number mmmmm cr lf TCHXY robot number mmmmm cr lf Response format OK cr lf Values robot number 1 to 4 If not input robot 1 is specified mmmmm Point number for registering point data 0 to 29999 Meaning Registers the current robot position as point data for the specified point number If point data is already registered in the specified point...

Page 450: ...ot number The unit of the movement amount may vary depending on the command INCH pulse units 1 to 10000 pulse INCHXY mm units 0 001 to 10 000mm INCHXT mm units 0 001 to 10 000mm SAMPLE Command IDIST 2 100 cr lf Response OK cr lf 2 3 Alarm reset Command format ALMRST cr lf Response format RUN cr lf END cr lf Meaning Resets the alarm However this command cannot be used for the alarms which require t...

Page 451: ...uffer 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 OK cr lf ...

Page 452: ...oller parameter INPUT PRINT using channel should be set a current communication channel CMU ETH or iVY SET Sets the data which is input to the variable when INPUT statement is executed CAN Cancels the data request by INPUT statement CLR Clears the data specified INPUT SET downward SAMPLE Online command Robot program INPUT SET 10 cr lf INPUT SET 5 cr lf OK cr lf INPUT A cr lf MSG cr lf PRINT A cr l...

Page 453: ...f 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 will occur SAMPLE Command ACCESS 0 password cr lf Sets password as password and changes the level to maintainer level Response OK cr lf REFERENCE For details regarding access level refer to the YRCX...

Page 454: ...iner level The current password is input for the old password and the revised password is input for the new password and for the new password of confirmation In the next line of the new password confirmation inserts line feeds only When input password as the old password is different from the current password or new password and new password confirmation are not same 6 235 Password error will occu...

Page 455: ...return to origin status 1 to 4 If not input robot 1 is specified 0 Incomplete 1 Complete Shows the status of the axis 1 axis 2 axis 6 from the left 0 Incomplete 1 Complete Omitted when the axis is not connected Meaning Acquires return to origin status Command format 1 acquires the return to origin status of all robots while command format 2 acquires the status of the specified robot SAMPLE Command...

Page 456: ...on dynamic brake on status 1 Servo on status 2 Mechanical brake off dynamic brake off status Omitted when the axis is not connected Meaning Acquires the servo status SAMPLE Command SERVO 3 cr lf Response 0 0 1 0 0 Only the axis 2 of the robot 3 is in the servo on status OK cr lf 3 3 Acquire motor power status Command format MOTOR cr lf Response format x cr lf OK cr lf Values x Motor power status 0...

Page 457: ...lf 3 5 Acquiring the break point status Command format BREAK program name cr lf PGm Response format n n cr lf OK cr lf Values n Line number on which break point n is set 1 to 9999 Program name Program name intended to delete m Program number 1 to 100 Meaning Acquires the break point status SAMPLE Command BREAK TEST cr lf Response 12 35 cr lf OK cr lf REFERENCE For details regarding access level re...

Page 458: ...de Meaning Acquires the controller mode status SAMPLE Command MODE cr lf Response 1 cr lf OK cr lf 3 7 Acquiring the communication port status Command format LINEMODE ETH cr lf CMU Response format k cr lf OK cr lf Values k 0 OFFLINE 1 ONLINE Meaning Acquires the specified communication port status ONLINE OFFLINE commands allow to change a specified communication port to the online offline mode res...

Page 459: ...onse 1 cr lf OK cr lf 3 9 Acquiring the sequence program execution status Command format SEQUENCE cr lf Response format 1 1 s cr lf OK cr lf 2 3 s cr lf OK cr lf 3 0 cr lf OK cr lf Values s The sequence program s execution status is indicated as 1 or 0 1 Program execution is in progress 0 Program execution is stopped Meaning Acquires the sequence program execution status Response output means as f...

Page 460: ...sion number Vx xx dr 1 2 Driver revision number Rxxxx Meaning Acquires the version information SAMPLE Command VER cr lf Response V8 02 R1021 V5 10 V1 01 R0001 V1 01 R0001 cr lf OK cr lf 3 11 Acquiring the tasks in RUN or SUSPEND status Command format TASKS cr lf Response format n n cr lf OK cr lf Values n Task number 1 to 16 Task currently run or suspended Meaning Acquires the tasks in RUN or SUSP...

Page 461: ...OK cr lf 3 13 Acquiring the task end condition Command format TSKECD Tk cr lf Response format gg bbb cr lf OK cr lf Values k Task number 1 to 16 gg Alarm group number of the task end condition bbb Alarm classification number of the task end condition Meaning Acquires the specified task end condition For details about alarm group number and classification number of the task end condition refer to Y...

Page 462: ...d 1 Meaning Acquires the shift status of the robot specified by the robot number SAMPLE Command SHIFT cr lf Response 1 cr lf OK cr lf 3 15 Acquiring the hand status Command format HAND robot number cr lf Response format m cr lf Values Robot number m 1 to 4 If not input robot 1 is specified Hand number selected for the specified robot 0 to 31 Hand not selected 1 Meaning Acquires the hand status of ...

Page 463: ...arm status Command format ALM cr lf Response format gg bbb cr lf OK cr lf Values gg Alarm group number bbb Alarm classification number Meaning Acquires the alarm which occurs in the controller For details regarding the alarm group number and alarm classification number refer to the YRCX user s or operator s manual The requirable alarms are number 400 or more of alarm classification number If multi...

Page 464: ... status by checking the internal emergency stop flag SAMPLE Command EMG cr lf Response 1 cr lf OK cr lf 3 19 Acquiring the manual movement speed Command format MSPEED robot number cr lf Response format k cr lf OK cr lf Values Robot number 1 to 4 If not input robot 1 is specified k manual movement speed 1 to 100 unit Meaning Acquires the value of the manual movement speed specified by Robot number ...

Page 465: ...he last reference point number current point number Command format CURPNT cr lf Response format k cr lf OK cr lf Values k Current point number 0 to 29999 Meaning Acquires the point number which is referred last The current point number the point number of last reference is renewed by operations which uses the point data point edit for example The current point number is renewed by following operat...

Page 466: ...E Command MSG cr lf Response MESSAGE cr lf PRINT MESSAGE is executed in a program OK cr lf For executing this command it is required that the INPUT PRINT using channel parameter is set at the port to execute command When the output message buffer is empty only OK is output as the response 3 23 Acquiring the input data Command format INPUT cr lf Response format d cr lf OK cr lf Values d Input data ...

Page 467: ...value format is decimal or real number SAMPLE 1 Command SQR 100 5 cr lf Response 2 236067E01 cr lf OK cr lf SAMPLE 2 Command LOC1 WHERE cr lf Response 102054 cr lf OK cr lf 2 Acquiring the value of a character string expression Command format character string expression cr lf Response format character string cr lf OK cr lf Meaning Acquires the value character string of the specified character stri...

Page 468: ... 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 Acquiring the value of a shift expression Command format shift expression cr lf OK cr lf Response format shift data cr lf Meaning Acquires the value shift data of the specified shift expression SAMPLE Command s1 cr lf Response 25 000 12 600 10 000 0 000 cr lf ...

Page 469: ...ified 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 robot number This command is available only to axes whose return to origin method is set as Mark ABSADJ Moves the specified robot axis to an absolute reset position MRKSET Performs absolute reset on the specified robot axis SAMPLE...

Page 470: ...mat 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 robot number SAMPLE Command ORGRTN 1 cr lf Response RUN cr lf Movement start END cr lf Movement end ...

Page 471: ...e robot number The robot performs the same motion as when moved manually in inching motion with the programming box s jog keys moves a fixed distance each time a jog key is pressed The unit of the movement amount and operation type by command are shown below INCH pulse units Only the specified axis moves INCHXY mm units According to the robot configuration the arm tip of the robot moves in the dir...

Page 472: ...n continue process V 16H by the online command at intervals of 200ms If not input the error stop occurs Additionally after the movement has started the robot stops when any of the statues shown below arises When software limit was reached When stop signal was turned off When STOP key on the programming box was pressed When an online command C 03H to interrupt execution was input The unit of the mo...

Page 473: ...nd underscore n Program number 1 to 100 Meaning Copies the program specified by program name 1 or program number to program name 2 SAMPLE Command COPY TEST1 TO TEST2 cr lf Response RUN cr lf Process start END cr lf Process end 2 Copying point data Command format COPY Pmmmmm Pnnnnn TO Pkkkkk cr lf Response format RUN cr lf At prosess start END cr lf At prosess end Values mmmmm Top point number in c...

Page 474: ...aning Copies the point comments between PCmmmmm and PCnnnnn to PCkkkkk SAMPLE Command COPY PC101 PC200 TO PC1101 cr lf Response RUN cr lf Process start END cr lf Process end 5 2 Erase 1 Erasing a program Command format ERA program name cr lf PGn Response format RUN cr lf At prosess start END cr lf At prosess end Values Program name Program name to be erased 32 characters or less consisting of alph...

Page 475: ...ween Pmmmmm and Pnnnnn SAMPLE Command ERA P101 P200 cr lf Response RUN cr lf Process start END cr lf Process end 3 Erasing point comments Command format ERA PCmmmmm PCnnnnn cr lf Response format RUN cr lf At prosess start END cr lf At prosess end Values mmmmm Top point comment number to be erased 0 to 29999 nnnnn Last point comment number to be erased 0 to 29999 Meaning Erases the point comments b...

Page 476: ...number to be erased 0 to 29999 Meaning Erases the point names between PNmmmmm and PNnnnnn SAMPLE Command ERA PC101 PC200 cr lf Response RUN cr lf Process start END cr lf Process end 5 Erasing pallet data Command format ERA PLm cr lf Response format RUN cr lf At prosess start END cr lf At prosess end Values m Pallet number to be erased 0 to 39 Meaning Erases the PLm pallet data SAMPLE Command ERA P...

Page 477: ...31 Meaning Erases the hand definition data of Hm SAMPLE Command ERA H2 cr lf Response RUN cr lf Process start END cr lf Process end 7 Erasing shift Command format ERA Sm cr lf Response format RUN cr lf At prosess start END cr lf At prosess end Values m Shift number to be erased 0 to 39 Meaning Erases the shift data of Sm SAMPLE Command ERA S1 cr lf Response RUN cr lf Process start END cr lf Proces...

Page 478: ...the area check output setting of ACm SAMPLE Command ERA AC3 cr lf Response RUN cr lf Process start END cr lf Process end 9 Erasing general purpose Ethernet port Command format ERA GPm cr lf Response format RUN cr lf At prosess start END cr lf At prosess end Values m General purpose Ethernet port number to be erased 0 to 15 Meaning Erases the general purpose Ethernet port of GPm SAMPLE Command ERA ...

Page 479: ...ers and _ underscore 1 to 100 Meaning Changes the name of the specified program SAMPLE Command REN TEST1 TO TEST2 cr lf Response RUN cr lf Process start END cr lf Process end 5 4 Changing the program attribute Command format ATTR program name TO s cr lf PGn Response format OK cr lf Values Program name s Attribute n Program number Program name to change the attribute shown with 32 characters or les...

Page 480: ...FT Initializes the shift data area HND Initializes the hand data area PLT Initializes the pallet data area PCM Initializes the point comment area PNM Initializes the point name area ION Initializes the input output name area ACO Initializes the area check output setting area GEP Initializes the general purpose Ethernet port setting area MEM Initializes the above areas PGM all data up to GEP PRM In...

Page 481: ...zes the RS 232C port ETH Initializes the Ethernet port Meaning Initializes the communication port For information about the communication port initial settings refer to the YRCX user s or operator s manual SAMPLE Command INIT CMU cr lf Response RUN cr lf Process start END cr lf Process end 3 Initializing the alarm history Command format INIT LOG cr lf Response format RUN cr lf At prosess start END...

Page 482: ... PGM PNT PCM PNM PRM SFT HND PLT GEP ION ACO bb b Pn PCn PNn cccccccc Sn Hn PLn GPn iNMn n ACn Variable constant Variable Array variable Constant VAR ARY ab by ab by x cc c Status Program directory Parameter directory Machine reference sensor or stroke end Machine reference mark System configuration information Controller Robot Driver Option board Self check Alarm history Remaining memory size DIR...

Page 483: ... Type Write file name Definition format All Separate file User memory All file ALL Program PGM bb b Point data PNT Pn Point comment PCM PCn Point name PNM PNn Parameter PRM cccccccc Shift definition SFT Sn Hand definition HND Hn Pallet definition PLT PLn General Ethernet port GEP GPn Input output name ION iNMn n Area check output ACO ACn Variable constant Variable VAR ab by Array variable ARY ab b...

Page 484: ... yy mm dd Date to be set year month day yy Lower 2 digits of the year 00 to 99 mm Month 01 to 12 dd Day 01 to 31 Meaning Sets a date in the controller The currently set values are used for the omitted items If only cr lf is transmitted then the date remains unchanged If an improbable date is entered then 5 202 Data error occurs SAMPLE 1 To change only the day 15 cr lf Day is set to 15th SAMPLE 2 C...

Page 485: ...nute 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 If only cr lf is transmitted then the time remains unchanged If an improbable time is entered then 5 202 Data error occurs SAMPLE 1 To change only the minute 20 cr lf Minute is set to 20 SAMPLE 2 Command TIME 10 21 35 cr lf Response OK cr lf MEMO ...

Page 486: ... process end Values OK END Command ended correctly NG An error occurred RUN Command starts correctly gg Alarm group number 0 to 99 bbb Alarm classification number 0 to 999 Meaning Robot language commands can be executed Only independently executable commands are executed Command format depends on each command to be executed SAMPLE 1 Command SET DO 20 cr lf Response OK cr lf SAMPLE 2 Command MOVE P...

Page 487: ... 10 11 12 13 Control codes 12 55 8 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 C Response NG 1 8 cr lf ...

Page 488: ......

Page 489: ...Chapter 13 Appendix 1 1 Reserved word list 13 1 2 2 Changes from conventional models 13 3 ...

Page 490: ......

Page 491: ...IM DIR DIST DO DPM DRIVE DRIVEI DRV E ELSE ELSEIF EMG END ENDIF EOF EQV ERA ERL ERR ERROR ETH ETHSTS EXIT EXITTASK F FN FOR FREE G GEP GEPSTS GO GOSUB GOTO H HALT HALTALL HAND HEX HND HOLD HOLDALL I IDIST IF IMP INCH INCHT INCHXY INIT INPUT INT ION J JOG JOGT JOGXY JTOXY L LEFT LEFTY LEN LET LINEMODE LO LOAD LOC1 LOC2 LOC3 LOC4 LOC5 LOC6 LOCF LOG LSHIFT M MAINPG MCHREF MEM MID MO MOD MODE MOTOR MO...

Page 492: ...ed but ABS1 or ABSX can be used Keywords reserved as system variables cannot be used at the beginning of other variable names even if alphanumeric characters are added to them Example FN cannot be used FNA and FN123 also cannot be used PUSH PWR R RADDEG RBT READ REF REM REN RESET RESTART RESUME RETURN RIGHT RIGHTY RSHIFT RUN RUNTO S S SCK SELECT SEND SEQCMPL SEQUENCE SERVO SET SETGEP SETPW SFT SGI...

Page 493: ...Multiple Robot Control In conventional models YRC etc robot has consisted of a main group one main robot main auxiliary axes and a sub group one sub robot sub auxiliary axes In YRCX robot consists of robot 1 to 4 normal axes auxiliary axes Due to this change commands for each group have changed to ones for each robot For details regarding the command for each robot refer to 2 Command list with a r...

Page 494: ...anguage 1 In YRCX the robot languages shown below are added to ones of conventional models YRC etc ARMSEL CLOSE CURTQST ETHSTS GEPSTS HALTALL HOLDALL MOTOR MOVET MTRDUTY OPEN PGMTSK PGN PSHFRC PSHJGSP PSHMTD PSHRSLT PSHSPD PSHTIME PUSH SETGEP TSKPGM For details regarding the robot Language refer to Chapter 8 Robot Language Lists 2 These robot languages for conventional models YRC etc became unavai...

Page 495: ...ELFCHK WHRXYEX For details regarding the online commands refer to Online commands of a programming manual for conventional models YRC etc 6 Data file In YRCX the data files shown below are added to ones of conventional models YRC etc 1 Point name file 2 General Ethernet port file 3 Input output name file 4 Area check output file 5 System configuration information file 6 Version information file 7 ...

Page 496: ......

Page 497: ...Index ...

Page 498: ......

Page 499: ...ordinate format 4 5 CASE 8 190 Change the MANUAL mode speed 12 17 Changing the program attribute 12 47 Character constants 2 2 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 Command list with a robot setting 5 2 Command Statement Format 1 5 Comment 1 5 8 182 COMMON 1 3 Communication port...

Page 500: ... 8 99 8 114 8 124 8 145 Local variable 8 213 Local variables 3 18 LO file 10 61 10 62 Logic operations 4 2 M MANUAL mode operation 12 17 MO file 10 59 10 60 Movement speed 8 209 Moves the specified robot axes in a relative manner 8 52 Multi task 6 1 N Numeric constants 2 1 O Online Command List 12 1 Operation speed 8 26 OUT enable position 8 143 P Pallet Define 8 159 Definition file 10 20 10 21 10...

Page 501: ...uble word input 3 15 Serial double word output 3 16 Serial input variable 3 13 Serial output variable 3 14 Serial port communication file 10 74 Serial word input 3 15 Serial word output 3 16 Servo status 8 193 Setting the sequence program execution flag 12 52 Shift Erase 12 45 Shift assignment statement 8 86 Shift coordinate 8 199 8 204 Definition file 10 16 10 17 Shift variable 3 8 SI file 10 65 ...

Page 502: ...1 8 Basic operation 11 1 User Variables 3 2 Using point numbers 11 2 Using shift coordinates 11 3 V Valid range of variables 3 18 Value Pass Along Reference Pass Along 3 6 Variable file 10 46 Variable Names 3 3 Variable Types 3 4 W WAIT status 6 4 Write file 8 191 X XY setting 8 51 ...

Page 503: ...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 01 June 2016 Original production 01A February 2018 Small corrections ...

Page 504: ......

Page 505: ......

Page 506: ... DW 1R 1 XWKRUL HG LVWULEXWRU 3ULQWHG LQ XURSH ...

Reviews: