ROBOT Vertical articulated V*-D/-E SERIES Horizontal articulated H*-D/-E SERIES Cartesian coordinate XYC-4D SERIES Vision device µVision-21 SERIES PROGRAMMER’S MANUAL I PROGRAM DESIGN AND COMMANDS (Ver. 1.
Copyright © DENSO WAVE INCORPORATED, 2002 All rights reserved. No part of this publication may be reproduced in any form or by any means without permission in writing from the publisher. Specifications are subject to change without prior notice.
Preface Thank you for purchasing this high-speed, high-accuracy assembly robot. Before operating your robot, read this manual carefully to safely get the maximum benefit from your robot in your assembling operations. Robot series and/or models covered by this manual - Vertical articulated robot V*-D/-E series - Horizontal articulated robot H*-D/-E series - Cartesian coordinate robot XYC-4D series - Vision devaicec µVision-21 series Robot controller version (Note) - Applicable to up to Ver. 1.
How the documentation set is organized The documentation set consists of the following books. If you are unfamiliar with this robot and option(s), please read all books and understand them fully before operating your robot and option(s). GENERAL INFORMATION ABOUT ROBOT Provides the packing list of the robot and outlines of the robot system, robot unit, and robot controller.
How this book is organized This book is just one part of the documentation set. This book consists of SAFETY PRECAUTIONS and chapters one through five. SAFETY PRECAUTIONS Defines safety terms, safety related symbols and provides precautions that should be observed. Be sure to read this section before operating your robot.
PART 2 COMMAND REFERENCE Chapter 6 Guide to Command Reference This chapter provides command descriptions and a command list for the PAC robot. Use the command list to quickly search for information concerning each command. Chapter 7 PAC Language Configuration Elements This chapter provides an explanation of the element rules (identifier, variable, constant, operator, expression, and command) which construct the PAC language.
SAFETY PRECAUTIONS SAFETY PRECAUTIONS Be sure to observe all of the following safety precautions. Strict observance of these warning and caution indications are a MUST for preventing accidents, which could result in bodily injury and substantial property damage. Make sure you fully understand all definitions of these terms and related symbols given below, before you proceed to the text itself.
1. Introduction This section provides safety precautions to be observed during installation, teaching, inspection, adjustment, and maintenance of the robot. 2. Installation Precautions 2.1 Insuring the proper installation environment 2.1.1 For standard type The standard type has not been designed to withstand explosions, dust-proof, nor is it splash-proof.
SAFETY PRECAUTIONS 2.3 Control devices outside the robot's restricted space The robot controller, teach pendant, and operating panel should be installed outside the robot's restricted space and in a place where you can observe all of the robot’s movements when operating the robot controller, teach pendant, or operating panel. 2.4 Positioning of gauges Pressure gauges, oil pressure gauges and other gauges should be installed in an easy-to-check location. 2.
2.8 Setting-up the safety fence or enclosure A safety fence or enclosure should be set up so that no one can easily enter the robot's restricted space. If it is impossible, utilize other protectors as described in Section 2.9. (1) The fence or enclosure should be constructed so that it cannot be easily moved or removed. (2) The fence or enclosure should be constructed so that it cannot be easily damaged or deformed through external force. (3) Establish the exit/entrance to the fence or enclosure.
SAFETY PRECAUTIONS 2.10 Setting the robot's motion space The area required for the robot to work is called the robot's operating space. If the robot’s motion space is greater than the operating space, it is recommended that you set a smaller motion space to prevent the robot from interfering or disrupting other equipment. Refer to the "INSTALLATION & MAINTENANCE GUIDE" Chapter 4. 2.11 No robot modification allowed Never modify the robot unit, robot controller, teach pendant or other devices. 2.
3. Precautions while robot is running Warning Touching the robot while it is in operation can lead to serious injury. Please ensure the following conditions are maintained and that the cautions listed from Section 3.1 onwards are followed when any work is being performed. 1) Do not enter the robot's restricted space when the robot is in operation or when the motor power is on.
SAFETY PRECAUTIONS 4) Implementation of measures for noise prevention 5) Signaling methods for workers of related equipment 6) Types of malfunctions and how to distinguish them Please ensure "working regulations" are appropriate to the robot type, the place of installation and to the content of the work. Be sure to consult the opinions of related workers, engineers at the equipment manufacturer and that of a labor safety consultant when creating these "working regulations". 3.
3.4 Inspections before commencing work such as teaching Before starting work such as teaching, inspect the following items, carry out any repairs immediately upon detection of a malfunction and perform any other necessary measures. (1) Check for any damage to the sheath or cover of the external wiring or to the external devices. (2) Check that the robot is functioning normally or not (any unusual noise or vibration during operation). (3) Check the functioning of the emergency stop device.
SAFETY PRECAUTIONS 3.8 Precautions in repairs (1) Do not perform repairs outside of the designated range. (2) Under no circumstances should the interlock mechanism be removed. (3) When opening the robot controller's cover for battery replacement or any other reasons, always turn the robot controller power off and disconnect the power cable. (4) Use only spare tools authorized by DENSO. 4. Daily and periodical inspections (1) Be sure to perform daily and periodical inspections.
10
CONTENTS Preface.................................................................................................................................................................................i How the documentation set is organized........................................................................................................................ ii How this book is organized.................................................................................................................................
3.2 Confirming Reach Position ............................................................................................................................ 3-3 3.2.1 Pass Motion................................................................................................................................................ 3-3 3.2.2 End Motion................................................................................................................................................. 3-3 3.2.
Chapter 7 PAC Language Configuration Elements 7.1 New Robot Language PAC............................................................................................................................. 7-1 7.2 Relation between PAC Robot Language and Conventional Languages ......................................................... 7-2 7.3 Language Element .......................................................................................................................................... 7-3 7.4 Name ........
8.8 Flow Control Statement................................................................................................................................ 8-13 8.8.1 Unconditional Branch .............................................................................................................................. 8-13 8.8.2 Conditional Branch .................................................................................................................................. 8-13 8.8.3 Selection.................
Chapter 11 Flow Control Statements 11.1 11.2 11.3 11.4 11.5 11.6 Program Stop .................................................................................................................................................11-1 Call ................................................................................................................................................................11-4 Repeat...........................................................................................................
Chapter 17 Time/Date Control 17.1 Time/Date ..................................................................................................................................................... 17-1 Chapter 18 Error Controls 18.1 18.2 Error Information ......................................................................................................................................... 18-1 Error Interruption ..............................................................................................
Commands Listed in Alphabetical Order Vision 4-axis 6-axis device Commands ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later.
Vision 4-axis 6-axis device Commands ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later.
Vision 4-axis 6-axis device Commands DEFDBL DEFEND DEFINT DEFIO DEFJNT DEFPOS DEFSNG DEFSTR DEFTRN DEFVEC DEGRAD DELAY DELETESEM DEPART DESTEXJ DESTJNT DESTPOS DESTTRN DIM disp_page DIST DO-LOOP DRAW DRIVE DRIVEA ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later.
Vision 4-axis 6-axis device Commands ERR ERRMSG$ EXIT DO EXIT FOR EXP ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later. Functions 4-axis 6-axis Vision device Refer to: Obtains an error number that occurred. Sets an error message. Forcibly exits from DO-LOOP.
Vision 4-axis 6-axis device Commands INTERRUPT ON/OFF IOBLOCK ON/OFF ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later. Functions 4-axis 6-axis Vision device Refer to: Interrupts a robot motion.
Vision 4-axis 6-axis device Commands LINEINPUT linputb LOG LOG10 lprintb ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later. Functions 4-axis 6-axis Vision device ¤ ¤ V1.5 V1.5 ¤ ¤ V1.5 ¤ ¤ V1.5 Obtains the vector size. Extracts the maximum value.
Vision 4-axis 6-axis device Commands printb PRINTDBG PRINTLBL PRINTMSG PROGRAM PVEC ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later. Functions Outputs a single byte of data to the RS-232C or Ethernet port. Outputs data to the debug window.
Vision 4-axis 6-axis device Commands SQR STARTLOG ST_aspACLD ST_aspChange STATUS ST_OffSrvLock ST_OnSrvLock STOP STOPEND STOPLOG STR$ ST_ResetCompControl ST_ResetCompEralw ST_ResetCompJLimit ST_ResetCompRate ST_ResetCompVMode ST_ResetCurLmt ST_ResetDampRate ST_ResetEralw ST_ResetFrcAssist ST_ResetFrcLimit ST_ResetGravity ST_ResetGrvOffset ST_ResetZBalance STRPOS ST_SetCompControl ST_SetCompEralw ST_SetCompFControl ST_SetCompJLimit ST_SetCompRate ST_SetCompVMode ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.
Vision 4-axis 6-axis device Commands ST_SetCurLmt ST_SetDampRate ST_SetEralw ST_SetFrcAssist ST_SetFrcCoord ST_SetFrcLimit ST_SetGravity ST_SetGrvOffset ST_SetZBalance SUSPEND ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later.
Vision 4-axis 6-axis device Commands VISDEFCHAR VISDEFTABLE VISEDGE VISELLIPSE VISFILTER VISGETNUM VISGETP VISGETSTR VISHIST VISLEVEL VISLINE VISLOC VISMASK VISMEASURE VISOVERLAY VISPLNOUT VISPOSX VISPOSY VISPRINT VISPROJ VISPTP VISPUTP VISREADQR VISRECT VISREFCAL VISREFHIST VISREFTABLE VISSCREEN VISSECT VISSTATUS VISWORKPLN ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots.
Vision 4-axis 6-axis device Commands WORK WORKPOS WRITE ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later. Functions Declares a user coordinate system. Returns the user coordinate system as the position type. Outputs data from the RS232C or Ethernet port.
Commands Listed According to Functions Vision 4-axis 6-axis device ¤ ¤ ¤ Available with all series of robots and vision device. ¡ ¡ ¡ Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots ¤ V1.2 of Version 1.2 or later.
Vision 4-axis 6-axis device ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later.
Vision 4-axis 6-axis device Classified by functions Call ¤ ¡ ¤ ¡ ¤ V1.2 Commands CALL GOSUB ON-GOSUB Repeat RETURN DO-LOOP EXIT DO FOR-NEXT EXIT FOR REPEAT-UNTIL WHILE-WEND Conditional Branch IF-END IF IF-THEN-ELSE SELECT CASE Unconditional Branch GOTO ON-GOTO Comment REM Robot Control Statements Motion Control APPROACH DEPART DRAW DRIVE DRIVEA GOHOME MOVE ROTATE ¤ ¡ Available with all series of robots and vision device. Available with all series of robots.
Vision 4-axis 6-axis device ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later.
Vision 4-axis 6-axis device Classified by functions ¤ ¡ ¤ ¡ ¤ V1.2 Commands FIGAPRP Stop Control HOLD Speed Control HALT INTERRUPT ON/OFF SPEED JSPEED ACCEL JACCEL DECEL JDECEL CURACC CURJACC CURDEC CURJDEC CURJSPD CURSPD CUREXTACC ¤ ¡ Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.
Vision 4-axis 6-axis device ¤ ¡ ¤ ¡ ¤ V1.2 ¤ ¡ Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later.
Vision 4-axis 6-axis device Classified by functions ¤ ¡ ¤ ¡ ¤ V1.
Vision 4-axis 6-axis device ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later. Functions Classified by functions Commands 4-axis 6-axis ST_SetZBalance Sets the gravity compensation value of the Z and T axes. ST_ResetZBalance Disables the gravity compensation function.
Vision 4-axis 6-axis device Classified by functions Programming a TP operation screen ¤ ¡ ¤ ¡ ¤ V1.2 Commands Vision device Refer to: V1.5 13-27 set_page change_bCap Sets page parameters. Edits a caption for a specified button. Edits a caption for a specified page. Displays a specified page of a TP operation screen. V1.5 V1.5 V1.5 V1.5 13-30 13-32 V1.5 V1.5 13-33 V1.5 V1.5 13-34 Concurrently runs another program. Forcibly terminates a task. Suspends a task. Defends a task.
Vision 4-axis 6-axis device ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later.
Vision 4-axis 6-axis device Classified by functions Rotation Component ¤ ¡ ¤ V1.2 Commands POSRX POSRY POSRZ POST Figure Component Position Function ¤ ¡ RVEC AREAPOS AREASIZE TOOLPOS WORKPOS Character String Function ASC BIN$ CHR$ SPRINTF$ HEX$ LEFT$ LEN MID$ ORD RIGHT$ STRPOS STR$ VAL ¤ ¡ Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device.
Vision 4-axis 6-axis device ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later. Functions Classified by functions Constants Built-in Constants Commands Error Controls Error Information Error Interruption Vision device Refer to: Sets an OFF (0) value. Sets an ON (1) value.
Vision 4-axis 6-axis device Classified by functions Vision Control (Option) Image Input and Output ¤ ¡ ¤ ¡ ¤ V1.2 Commands CAMIN CAMMODE CAMLEVEL VISCAMOUT VISPLNOUT VISOVERLAY VISDEFTABLE VISREFTABLE Window Setting WINDMAKE WINDCLR Draw WINDCOPY WINDREF WINDDISP VISSCREEN VISBRIGHT VISCLS VISPUTP VISLINE VISPTP VISRECT VISCIRCLE VISELLIPSE VISSECT VISCROSS VISLOC VISDEFCHAR VISPRINT ¤ ¡ Available with all series of robots and vision device. Available with all series of robots.
Vision 4-axis 6-axis device ¤ ¡ ¤ ¡ ¤ ¡ ¤ V1.2 Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later.
Vision 4-axis 6-axis device Classified by functions ¤ ¡ ¤ ¡ ¤ V1.2 Commands VISPOSX VISPOSY VISSTATUS VISREFCAL ¤ ¡ Available with all series of robots and vision device. Available with all series of robots. The command specifications differ between the 4-axis, 6-axis robot, and vision device. Available with the 4-axis robots and the 6-axis robots of Version 1.2 or later. Functions Obtains an image process result (Coordinate X) from the storage memory.
PART 1 PROGRAM DESIGN
Chapter 1 Sample Program This chapter utilizes a simple application example to provide usage of each command.
Chapter 1 Sample Program 1.1 Model Case Application This section describes a sample program by using an application as a model case as shown in Fig. 1-1. Fig. 1-1 Model Case Application In this model case, the robot reads the QR code on the object placed at pPick. The robot determines to which of pPlace1 and pPlace2 it will carry the object depending on the QR code. It then picks and carries the object to each predetermined position and places it.
1.2 Program Flow Fig. 1-2 shows the program flow of the model case. #define #define #define #define #define #define #define #define #define #define #define #define #define #define #define * * * * Macro Definition * * * * * pHome 10 'Home position pPick1 11 'Part chuck position pPlace1 12 'Part A unchuck position pPlace2 13 'Part B & C unchuck 'position ioParts 34 'Part supply signal ioPartsAck 104 'Synchronization signal 'of part supply signal ioChuck 106 'If ON, chucks. If OFF, 'unchucks.
Chapter 1 Sample Program 1.3 Program List Below is a program list for the model case. There are 4 programs: “PRO1,” “PRO2,” “dioSetAndWait,” and “dioWaitAndSet.” “PRO1” is the main program. “PRO2” is the subprogram related to QR code reading. “dioSetAndWait” and “dioWaitAndSet” are subprograms to operate the I/Os used to check part supply. These two programs are stored in the PAC program manager program bank. Program coding list “PRO1” '!TITLE “Pick & Place” #INCLUDE “dio_tab.h” #INCLUDE “var_tab.
Program coding list “PRO1”(Continued) ' ===== Chucking a part ===== *ChuckItem: *Specifies a label with ¡¡:. Will be called later by CALL*ChuckItem. RESET IO[ioUnChuck] Equivalent to IO[106]. Macro Turns IO off. See p. 13-7. SET IO[ioChuck] Equivalent to IO[106]. Macro Turns IO on. See p.13-5. RETURN Statement that structures a subroutine with *ChuckItem.
Chapter 1 Sample Program Program coding list “PRO1”(Continued) ' ===== Parts B and C processing ===== *PlacePartsBC: Label name (declares a subroutine) APPROACH P, P[pPick], appLen Moves the arm to a point right above P[pPick1]. Equivalent to macro 100 defined in the 4th line. Defining this way makes it possible to modify the approach length by changing one value. MOVE L, P[pPick], S=90 GOSUB *ChuckItem DEPART L, appLen Statement. See p. 12-4. Equivalent to macro 100 defined in the 4th line.
Program coding list “PRO2” '!TITLE “Reading QR code” #INCLUDE “var_tab.h” 'Reads the variable macro definition file. 'Store a parts number in [iPartsId]. PROGRAM pro2 DIM len1 AS INTEGER Makes local variable declaration "lenl" usable as a local integer variable. TAKEVIS Declares control on vision device. Required to use 'Obtains the visual semaphore. vision device. See p. 21-24. 'Designates draw screen 0 to the draw 'destination. VISCLS 0 'Clears draw screen 0. VISSCREEN 1,0,1 See p. 21-27.
Chapter 1 Sample Program Program coding list "WAIT → SET" (Library) '!TITLE “WAIT SET” PROGRAM dioWaitAndSet(waitIndex%, ackIndex%) Declares with argument. See p. 9-1. RESET IO[ackIndex] Statement. See p. 13-7. 'Synchronization signal OFF WAIT IO[waitIndex] = ON Statement that waits for IO¨ 'Waits for synchronization signal ON. coming on. See p. 12-53. SET IO[ackIndex] See p. 13-5.
Chapter 2 Program Flow This chapter provides an explanation of the flow regulation required for creating programs using the PAC language.
Chapter 2 Program Flow 2.1 Calling a Program and Subroutine A section of a program that repeats a specific motion can be put out of the program and called if required. The method of putting this section in the same program is called a subroutine. If this section is independently put in a separate file as another program and that program is called, this is referred to as calling a program. A subroutine must be included in the same file as the calling program.
2.1.1 Calling a Subroutine To use the same program at different positions in one program describe the process as a subroutine. The subroutine can be used by calling it from the different positions. The subroutine must be described in the same file as the calling program. If a subroutine is called using a GOSUB statement, control moves to the subroutine. If control executes a RETURN statement on the last line of the subroutine, it returns to the next line of the program that called the subroutine.
Chapter 2 Program Flow 2.1.2 Calling a Program If a program is created separately from the one that is mainly executed, the program can be used by calling it like a subroutine. When the program is called, designate the program name using a CALL statement. When a CALL statement calls a program, control moves to the program that is called. If control executes an END statement on the last line of the called program, control returns to the next line in the calling program.
2.1.3 Program Recursive Call When a program is called, the calling program itself can be designated as a program name using a CALL statement. This is referred to as a recursive call. Program PRO1 Program MOTION Calls itself again Fig. 2-4 Program Recursive Calling Diagram Note: The variables in a PAC program are stored in the static memory of each program; therefore, pay attention to has to use variables when a recursive call is used.
Chapter 2 Program Flow 2.2 Running a Program The following 3 methods are available for running a program. • Start using teach pendant operation. • Start using the operating panel. • Start by using I/O from an external device. As explained below, there are limitations to running a program depending on the running method. For the method by which the started program calls another program, refer to “2.1 Calling a Program and Subroutine”. 2.2.
2.3 Multitasking A PAC language program can concurrently execute progress management of multiple programs. Each program forms its own motion process and this is called a task. Concurrent progress management of multiple programs means that there are multiple tasks present. This is called multitasking. 2.3.1 Priority To run a task using the RUN command, designate a priority. As a result all tasks have their own priority.
Chapter 2 Program Flow The following two programs “MOTION1” and “TIMING” are examples of synchronization control that use semaphores. If the program “TIMING1” is run the program “MOTION1” starts concurrently. The timing of the “MOTION1” is created by the “TIMING1” with a semaphore to execute the MOVE command.
2.4 Serial Communication 2.4.1 Circuit Number The table below lists the relationship between the circuit numbers and channel numbers assigned in the robot controller. Circuit and Channel Number Assignment Circuit number Channel number Used as: 0 ch1 Teach pendant port 1 ch2 Universal port 2 ch3 (Reserved) 3 ch4 (Reserved) 4 to 7 (NOTE1) ch5 to ch8 Ethernet server ports 8 to 15 (NOTE1) ch9 to ch16 Ethernet client ports (NOTE2) NOTE1: Version 1.
Chapter 2 Program Flow 2.4.4 Sample Application In this section, a practical program sample is illustrated as a simple application that uses serial communication. Refer to this sample for practical application. In this sample application the robot controller counts the number of motions and transmits the data for these motions at fixed intervals. On the personal computer side, the data for the number of motions sent from the robot controller is received.
'!TITLE ”Sending” PROGRAM PRO2 DO PRINT #2,I1 DELAY 2000 LOOP END Fig. 2-8 Program “PRO2” “Sending” of the Robot Controller 2.4.4.2 Personal Computer Program A program in the personal computer is shown below. The beginning section of the program list defines a program module for communication. The last section of the program has programs for receiving data by the use of each module.
Chapter 2 Program Flow PDQComm1.PortOpen = True End Sub ' ' Closes the communication port. ' ' Private Sub CommClose() '---------------------------------------' Closes a port. '---------------------------------------PDQComm1.PortOpen = False End Sub ' ' Encloses the character string designated to the communication port ' in double Quotations. The system then adds a carriage return to ' the end of the line and sends this.
'---------------------------------------'Reading received data. '---------------------------------------If PDQComm1.InBufferCount > 0 Then InString$ = InString$ +PDQComm1.Input If InStr(1, InString$,vbCr, vbBinaryCompare) <> 0 Then Exit Do End If Loop CommRead = InString$ End Function Using sample Private Sub mnuCh1_Click() ' Uses port 1 and sets the baud rate to 19200. CommOpen 1,”19200,N,8,1” ' Receives moving count number from the controller. ReadBuf$ = CommRead ' Closes the used port.
Chapter 2 Program Flow 2.4.5 Serial Binary Transmission (Version 1.5 or later) In Version 1.4 or earlier, the robot controller can transmit only ASCII codes via the RS-232C ports. In Version 1.5 or later, it may support byte-controlled binary data transmissions, increasing the types of connectable communications devices. In Version 1.743 or later, Ethernet ports are also available in serial binary transmission as well as RS-232C ports. 2.4.5.
2.5 Library The program library is used to collect all-purpose programs like parts and use them accordingly. In the PAC language, since other programs can be called from a program, programs can be developed more efficiently using the programs in the library or by registering a created program to the library. Library Newly developed sections Fig. 2-10 Image of Program Development Using the Library 2.5.1 Program Bank The PAC manager of WINCAPSII provides a program bank for using the library.
Chapter 2 Program Flow 2.5.2 Palletizing Library There is no special instruction for palletizing in the PAC language. But palletizing operation can be realized using a program prepared as a library. A library can be added for palletizing to a project by using the program bank.
[ 1 ] Palletizing Parameter Figs. 2-13 to 2-15 and Table 2-3 show the required parameters for palletizing. The PAC language stores these parameters as the values of variables. P3 P4 P1 M pcs. P2 N pcs. Robot Fig. 2-13 Top View of Pallet H3mm Fig. 2-14 Side View of Pallet APR H1 DEP H2 Robot motion path H1 H2mm or K layers Fig.
Chapter 2 Program Flow Table 2-3 Parameters Required for Palletizing Symbol N M K H1 H2 H3 P1 P2 P3 P4 Name Palletizing number Number of side partitions Number of lengthwise partitions Number of layers Approach length Depart length Meaning Palletizing index number Number of partitions in the direction from P1 to P3 Number of partitions in the direction from P1 to P2 Number of pallet layers Unit None (Integer) Pc (Integer) Pc (Integer) Pc (Integer) Approach length when the robot gets access to a pallet
Note: H1 and H2 must satisfy the following conditions. H1 > {H3 × (K-1)} + 5 H2 > {H3×(K-1)} + 5 If these conditions are not satisfied, an error occurs during initialization. These are provided so that the robot does not collide with a pallet. They are used to set an approach point and a depart point that are 5 mm higher than the maximum number of layers. Even if the number of layers increases or decreases, the approach and depart points are the same as shown in Fig. 2-16.
Chapter 2 Program Flow [ 2 ] Parameter Value Setting Set the parameter values such as the numbers of side and lengthwise partitions and the layers in palletizing by calling “pltInitialize” from the program library. If you select [1-palletizing] in [Equipment type] in the [New project] dialog box when “New system project” is executed, the program “PRO2” titled “palletizing initialization template 1” is automatically registered in the library.
[ 3 ] Palletizing Counter In palletizing the robot counts the number of partitions and stores the count values as variables. There are 4 types of counters; side direction (N), lengthwise direction (M), height direction (K) and total (cnt). These counters are defined in “pltKernl” which is the nucleus program for controlling palletizing operation. The library program “pltMove” adds a value of 1 to the total counter every time one operation is finished and adjusts the values of the other counters.
Chapter 2 Program Flow P3 P4 c N c b b a K P1 a P2 M When N=3, m=5, and K=3, Point a is N=1, m=1, K=1 Point b is N=2, m=2, K=2 Point c is N=3, m=4, K=3 Fig. 2-20 Relation between Palletizing Position and Counter Counter Initialization When pallets are replaced or all partitions are not used the counters need to be initialized. In the initialization of the counters all palletizing counters are set to “1.
2.5.2.2 Palletizing Program A practical palletizing program varies in special situations depending on the application. However, the standard procedure for assembling the program by the use of the library is prepared in the program “PRO1” of the title “Palletizing Template 2.” Use this “Palletizing Template 2” as a model and add the required items for the application to make full use of program development. Fig. 3-21 shows the program “PRO1” of the title “Palletizing Template 2.
Chapter 2 Program Flow [ 1 ] Palletizing Program Customization Q. A. How do you change a palletizing program to execute to 1? Change the value of “pltIndex” in “PRO1” and “PRO2” to “1.” Q. How do you change the menber of palletizing partitions to 5 for side and 3 for lengthwise? Change “3” and “5” of the second and third parameters of “pltInitialize” to “5” and “3” respectively. * CALL pltInitialize (pltIndex, 5, 3, 3, 50, 50, 10, 52, 53, 54, 55) A. Q. A.
Q. How do you chAnge N1, M1 and K1? A. Add the program libraries “pltLetK1”, “pltLetM1”, “pltLetN1”. * call pltLetK1(Index, iValue) * call pltLetM1(Index, iValue) * call pltLetN1(Index, iValue) 'Index . . . Palletizing program No. 'iValue. . . Enter this value into K1, M1, and N1. Example) #define pltIndex 0 'Palletizing program No. Program Exmp DefInt Index, iValue Index = pltIndex 'Inserts the palletizing 'program number 'into the Index register. iValue = 10 'Enters values in K1, M1, and 'N1.
Chapter 2 Program Flow Q. How do you change the total counter? A. Add the program library “pltIncCnt.” * callpltLetCnt(Index, iValue) 'Index . . . Palletizing program No. 'iValue. . . This value is entered in the total counter. Example) #define pltIndex 0 'Palletizing program No. Program Exmp DefInt Index, iValue Index = pltIndex 'Inserts the palletizing 'program No. 'into the Index register. iValue = 0 'Enters a value into the 'total counter.
Chapter 3 Robot Motion There are various robot motions according to reference point settings or how to determine whether the robot reaches the destination position. This chapter provides an explanation of these robot motions.
Chapter 3 Robot Motion 3.1 Absolute Motion and Relative Motion 3.1.1 Absolute Motion An absolute motion is a motion to move a taught position. An absolute motion always moves to a taught position without being affected by the previous motion. The commands to execute an absolute motion are as follows. APPROACH, MOVE, GOHOME, DRIVEA 3.1.2 Relative Motion A relative motion is a motion to move by a taught distance from the current position.
MOVEMENT1 motion MOVEMENT2 motion Fig. 3-3 Motion Examples of Two Programs If you delete the first motion instruction “MOVE P, P1” from “MOVEMENT1” and “MOVEMENT2”, their motions change, as shown in Fig. 3-4. With “MOVEMENT1,” the robot moves to point P3 with an absolute motion, however, ”MOVEMENT2” moves by V3 from the current position with a relative motion. MOVEMENT1 motion MOVEMENT2 motion Fig.
Chapter 3 Robot Motion 3.2 Confirming Reach Position There are three methods of determining the first motion finish when the robot arm changes from one motion to another. They are called pass motion, end motion and encoder value check motion. The following explains each motion. 3.2.1 Pass Motion A pass motion is a motion to pass the vicinity of a taught motion position or relative position.
3.2.4 Motion Examples of Pass, End and Encoder Value Check These examples show three programs to move the robot from the current position P1 to point P3 through point P2. They are program examples of pass motion, end motion and encoder value confirmation motion, respectively. PROGRAM PASS_MOVE TAKEARM MOVE P, @P P2 MOVE P, @0 P3 END Fig. 3-5 Pass Motion Program Example PROGRAM END_MOVE TAKEARM MOVE L, @0 P2 MOVE L, @0 P3 END Fig.
Chapter 3 Robot Motion 3.2.5 Execution Time Difference among Pass Motion, End Motion and Encoder Value Check Motion Among the three motions, the pass motion has the fastest execution time, followed by the end motion and finally the encoder check motion. The pass motion starts the next acceleration motion during deceleration time before it reaches P2 as is shown in Fig. 3-9. Therefore, the execution time is shorter than the end motion, which executes deceleration and acceleration individually.
3.2.6 If Pass Motion Does Not Execute In the following cases, even if a pass motion is designated, the robot moves with end motion. 3.2.6.1 If Pass Motion Command Is at the End of the Main Program The pass motion command to be executed at the end of the main program is executed as the end motion command. For example, in Fig. 3-10, the robot reaches the last position P3 with an end motion. PROGRAM PRO10 TAKEARM MOVE L, @P P1 MOVE L, @P P2 MOVE L, @P P3 END Fig.
Chapter 3 Robot Motion 3.2.7 If Pass Motion Effect Reduces 3.2.7.1 If Non-Motion Command Is Present after Pass Motion If a non-motion command is present between a pass motion command and the next motion command, the effects of reducing the execution time of the pass motion decrease. A non-motion command is one, which does not let the robot move. Fig. 3-12 shows an example of when a non-motion command present between a pass motion command and the next motion command. For example, as shown in Fig.
3.2.8 If Acceleration Affects Pass Motion Path The VS-D series robot automatically sets the square of speed divided by one hundred for acceleration and deceleration when you set speed. If you use a SPEED command, in the same manner as above, acceleration and deceleration is set. If the robot executes a pass motion by using the set automatic acceleration, its motion path is always constant. Fig. 3-15 shows an example when the speed is set to 60% and 80%.
Chapter 3 Robot Motion 3.2.9 Pass Start Displacement If you designate pass start displacement with “@P,” the next motion starts together at the start of deceleration of the motion, which is executed until that time. Therefore, the distance L between the path start position and passing point B changes depending on the speed and the acceleration. L B Pass start position Fig.
Therefore, when X>S2, the pass motion never changes even if you change X. And when X>S2, the “Set path start displacement distance again” warning is displayed on the pendant. If the deceleration start position changes, the acceleration time of the next path also changes. As shown in Fig. 3-21, the motion time may be longer compared with @P designation. Speed Speed MOVE L,@P P1 MOVE L,@0 P2 Time In the case of @P designation Time In the case of @ numeric value designation Fig.
Chapter 3 Robot Motion 3.2.10 Arch Motion Control [Version 1.9 or later, only for 4-Axis Robot] The arch motion control facilitates an effective pick-and-place motion. P2 P3 L1 L3 L2 P1 P4 The above figure shows a pick-and-place motion from source position P1 to destination position P4. The pick-and-place motion can be usually accomplished by setting route positions P2 and P3.
3.3 Interpolation Control When the robot arm moves, there is not just one path. You can create various paths together with the operation of each axis. You can also control the robot so that it creates line or circle paths. An explanation of the control methods, according to the types of motion paths, is as follows. Use the commands shown below to designate an interpolation method. The commands to designate an interpolation method : APPROACH, DEPART, DRAW, MOVE 3.3.
Chapter 3 Robot Motion 3.3.2 CP Control CP control manages interpolation so that the path to reach the motion destination position will be a straight line. Fig. 3-23 shows an example of CP control motion. If you designate “L” for designation of the interpolation method with the motion control command, the robot executes the CP motion. Motion path is a line. Fig. 3-23 CP Control Motion • When CP control is executed, the robot cannot simply move the position of a different figure from the current figure.
3.4 If Output Command Is Present after Motion Instruction The current position of the robot normally experiences delay in moving to the position commanded by the robot controller, when the motion command is executed. In the case of the end motion, the robot controller proceeds to the next command after the command position reaches the destination position of the motion command.
Chapter 3 Robot Motion 3.5 Compliance Control Function 3.5.1 Overview The compliance control function provides compliance for a robot by software. This function absorbs a position displacement in handling and prevents an excessive force applied to a robot or a work. This function is divided into two parts; setting compliance to individual joints (current limiting function) and compliance function to individual elements of the coordinate system at the tip of a robot (tip compliance control function).
Though you can also use SetGravity and ResetGravity to enable/disable the gravity offset, your robot may present a slight movement while switching between the enabled state and disabled state. We recommend that you use the configuration of the pendant to set the enabling/disabling gravity offset setting to 1 and call SetGravity once in your initialization program.
Chapter 3 Robot Motion 3.5.3 Tip Compliance Control Function [V1.4 or later] This function sets compliance for the individual elements of the coordinate system at the tip of a robot. Controlling motor torque values for individual axes based on the force limit at the tip realizes the compliance of the tip. You can select a coordinate system from either the base, the tool or the work coordinate system.
3.5.3.2 How to Use Tip Compliance Control Function You can use the library function and execute the compliance control libraries (SetCompControl, ResetCompControl) to enable or disable this function. Make sure to provide the following setting. See the section for the PAC library for more information on the library. (1) Tip Payload Specification (Required) See 2-1 “How to Use Current Limiting Function”. (2) Gravity Offset Specification (Required) See 2-1 “How to Use Current Limiting Function”.
Chapter 3 Robot Motion (SetCompControl = SerGrvOffset + SetCompFControl) While your robot is stationary without contacts (interference) with external objects, execute CALL SetGrvOffset Move your robot in contact (interference) with external objects CALL CompFControl (1) Library Execution Procedure ■ When Compliance Control Enabled 1) Use the pendant to set the enabling/disabling gravity offset setting to 1 in the configuration.
(2) Current Limiting Setting under Compliance Control Under the compliance control condition, providing motors with torque according to the position deviations controls the force at the tip. Thus, the conventional control according to angular deviations for individual axes is not active (current limit = 0), and the robot motion may be oscillating.
Chapter 3 Robot Motion 3) Exceeded speed limiting reference under the compliance control (60FC) A high speed motion is not available under the compliance control. This error occurs when the product of the internal speed and the external speed exceeds 50%. When this error occurs, you should reduce the internal speed setting. 4) PTP motion is not available under the compliance control (60FD) The PTP motion (see 3.3.1 “PTP Control”) is prohibited under the compliance control.
(5) (6) (7) (8) 3-22 1) Decide an I type variable for teaching number. We assume I10 here. 2) Prepare the following program. When you use P type variable for teaching: Program DirectTeach P(I10)=CURPOS end When you use J type variable for teaching: Program DirectTeach J(I10)=CURJNT end 3) Assign teaching position number to I10, move a robot to a teaching point, and execute DirectTeach.
Chapter 4 Speed, Acceleration and Deceleration Designation The maximum rates of speed, acceleration and deceleration must be set. This chapter provides explanations of the meanings and settings of speed, acceleration and deceleration.
Chapter 4 Speed, Acceleration and Deceleration Designation 4.1 External Speed and Internal Speed There are external speed and internal speed for VS series robots. The external speed is the speed set from the teach pendant or an external device prior to execution of a program. The internal speed is the speed set with a command in a program. 4.2 Speed Designation The product of external speed and internal speed determines the actual speed of robot motion.
4.4 Setting Acceleration and Deceleration The product of external acceleration and internal acceleration determines actual acceleration and deceleration. For example, if the following conditions are set, external deceleration: 70% internal deceleration: 30% the expression below is obtained. Actual deceleration = maximum deceleration × 0.7 × 0.3 The actual deceleration is 21% of the maximum deceleration. The commands to set acceleration and deceleration are listed in Table 4-1.
Chapter 4 Speed, Acceleration and Deceleration Designation The internal speed is set in the program in Fig. 4-2. If you execute a similar program at 80% external speed, the following results occur.
The program shown in Fig. 4-3 sets internal acceleration and deceleration. If you execute this program at 80% external speed, the following results occur.
Chapter 4 Speed, Acceleration and Deceleration Designation 4.6 Control Sets of Motion Optimization This function is to set proper speed and acceleration according to the mass of payload and the posture of the robot. You can select a control set of motion optimization among 4 sets listed in Table 4-1.
(Sec.) (Load set value) 5 kg Positioning time 4 kg 3 kg 2 kg 1 kg Motion range (deg.) Fig. 4-5 1st- and 2nd-Axis Positioning Time in PTP Motion (VS-D) (Load set value) (Sec.) 5 kg 4 kg Positioning time 3 kg 2 kg 1 kg Motion range (deg.) Fig.
Chapter 4 Speed, Acceleration and Deceleration Designation (Sec.) (Load set value) 5 kg Positioning time 4 kg 3 kg 2 kg 1 kg Motion range (deg.) Fig.
4.6.2 Control Set 1 Set the maximum speed and acceleration for the 1st, 2nd and 3rd axes in PTP motion according to the load condition value of the robot and the robot figure in motion. For the 4th, 5th and 6th axes in PTP motion, and for CO motion, this is the same as that of control set 0. 4.6.2.1 Using Control Set 1 If you need to reduce the motion time in PTP motion, select control set 1. Check the motion time for control set 1 in machine lock operation. 4.6.2.
Chapter 4 Speed, Acceleration and Deceleration Designation 4.6.3 Control Set 2 Set the maximum speed and acceleration in CP motion according to the load condition value of the robot and the robot figure in motion. This is the same as that of control set 0 in PTP motion. 4.6.3.1 Using Control Set 2 Use control set 2 in the following two cases. • If you need to reduce the motion time in CP motion. Fig. 4-8 shows the relation between the load condition and the shortest moving time in control set 2.
4.6.3.2 Precautions for Using Control Set 2 • In this control set, an overload error may occur during the robot motion. When you adjust the speed, check the load rate using the log function of the load estimation value on the pendant. (Refer to the SETTING-UP MANUAL, Section 5.3, “Displaying anticipated overloads to the capacity of motors and brake resistance of the robot controller, [F2]—[F6]—[F10].
Chapter 4 Speed, Acceleration and Deceleration Designation 4.6.6 Notes for Setting There are external load condition values (mass of payload, center of gravity position) and an external mode that are set with the pendant and WINCAPSII and internal load condition values and an internal mode that are set in a program in load condition value (mass of payload and center of gravity position) and mode which are set with this function.
4.7 Setting the Master Control Parameters in User Preferences 4.7.1 Setting Master Control Parameters of the Mass of Payload, Center of Gravity, and Control Set of Motion Optimization n Setting with the Teach Pendant Access: Top screen [F2 Arm] [F6 Aux.] [F7 Config.] If you use the teach pendant and follow the above procedure, the User Preferences window will appear where you can set master control parameters such as the control set of motion optimization and the mass of payload.
Chapter 4 Speed, Acceleration and Deceleration Designation The entry range of "Control set of motion optimization" is from 0 to 3. If you enter any value out of this range, the following error may appear: “Error 6003 Exceeded valid numeric value range.” The entry range of "Mass of load" is specified in each robot model. If you enter any value out of this range, the following error will occur: “Error 60d2 End load set value exceeded permissible value”.
n Setting with WINCAPSII This section explains the methods used to set the external load condition values (Mass of payload and center of gravity) and the external mode with the personal computer teaching system WINCAPSII. Refer to the " SETTING-UP MANUAL, Section 2.9 " and the "WINCAPSII Guide, 8.6.1.2 User Preferences." Select Options from the Tools menu of Arm Manager and the Options window will appear. Click on the User Preferences tab in the Options window to display the User Preferences window.
Chapter 4 Speed, Acceleration and Deceleration Designation After each parameter value is set, transmit the data to the robot controller. First, turn OFF the motor power with the MOTOR key on the teach pendant. Set Arm Manager to the connection status and click on Transmit of Arm Manager to display the Transfer Environment Table. Then, execute transmission. For transmission, refer to the "WINCAPSII Guide, 8.2.5 Transfer Project” .
- b Orientation vector (Y-axis) φ6H7 (pinhole) Normal vector (X-axis) Orientation vector Approach vector (Z-axis) 6th axis flange surface Flange center Approach vector -b - Tool 0 coordinate b Z Payload center of gravity ( X6,Y6,Z6 ) X6 Y Z6 Y6 X Payload center of gravity position in tool 0 coordinate system Fig. 4-9 Payload Center of Gravity +Y axis (Orientation vector) +Z axis (Approach vector) +X axis (Normal vector) Fig. 4-10 Right-Hand Coordinate System 4.7.
Chapter 4 Speed, Acceleration and Deceleration Designation 4.7.2.2 Setting Internal Mode Set this mode by executing the conventional language library aspChange. For details, refer to “22.1.2 aspChange.” 4.7.3 Setting Robot Installation Condition This is a setting for floor installation use and for gantry use. Set “0” for floor installation and “1” for gantry use. Before shipping, it is set to “0” (floor installation). This setting must be changed if the robot is to be installed on the ceiling.
Note: Transmit the installation condition set using the teach pendant to WINCAPSII. For information on the transmission procedure, refer to Note (1) on page 4-18. n Setting with WINCAPSII This section explains the setting method for floor installation and for gantry installation using the personal computer teaching system WINCAPSII. Refer to the " SETTING-UP MANUAL, Section 2.9 " and the "WINCAPSII Guide, 8.6.1.2 User Preferences.
Chapter 4 Speed, Acceleration and Deceleration Designation If the Set value box of [floor or gantry] on the [Using condition (parameter number:) ] screen is double-clicked, the parameter value can be edited. After the parameter values are set, transmit the data to the robot controller. First, turn OFF the motor power with the MOTOR key on the teach pendant. Set Arm Manager to the connection status and click on Transmit of Arm Manager to display the Transfer Environment Table. Then, execute transmission.
4.7.4 How to Set Optimal Load Capacity Initializing [V1.4 or later] This section describes how to set the optimal load capacity initializing mode to the mode 0 or how to maintain the current setting after the controller is turned on. Set Value 0 1 Description Initializes the optimal load capacity setting mode to the mode 0 after the controller is turned on. Does not initialize the optimal load capacity setting mode after the controller is turned on (maintains the current setting).
Chapter 4 Speed, Acceleration and Deceleration Designation You can provide only 0 or 1 to set the optimal load capacity initializing, otherwise you will receive an error, "6003 Exceeding valid range". Note: You should transfer the optimal load capacity initializing settings specified by the teach pendant to WINCAPSII. See 4.7.3 Setting with WINCAPS Note (2) for how to transfer the settings.
n Setting with WINCAPS II This section describes how to use the WINCAPS II, a PC-based teaching system, to set the optimal load capacity initializing. Select [Set] from [Tools] menu of Arm Manager to view [Set] window. Click [User Preference] tab of the [Set] window to see [User Preferences]. Double click a setting item for the optimal load capacity initializing to change the parameter values in this [User Preference (No. of Parameters:)] screen.
Chapter 4 Speed, Acceleration and Deceleration Designation 4.8 Safety Features 4.8.1 ndTc (Statement) [V1.2 or later] Function Sets the TC time length. Syntax ndTc() Explanation This statement is functionally equivalent to the TC command of the conventional language. The TC time length can be set within the range from 0 to 600 seconds. The factory default is 60 seconds. The specification of 0 produces the same function as TC OFF of the conventional language.
Chapter 5 Vision Control This chapter provides an explanation of vision related terms required for creating programs.
Chapter 5 Vision Control 5.1 Vision Control This section explains commands to use the µVision board, which is optionally built in the robot controller. You should read this chapter when you create or enter a program using the vision device. 5.1.1 Terms of Vision Control 5.1.1.1 Pixel The µVision board treats image element data as a group of dots. One dot is called pixel or image element. The number of pixels handled by the µVision board can be expressed in pixels on two different screens.
5.1.1.4 Area, Center of Gravity and Major Axis Angle [ 1 ] Area The board binarizes image data taken from the camera and counts each pixel of white (1) and black (0) in the designated range of the window area. The µVision board counts the area by real-time binarization without changing the brightness value of each pixel in the window. Therefore, you do not have to binarize image data beforehand. Window 1 (Wh) Area=13 0 (Bl) Area=12 Fig.
Chapter 5 Vision Control [ 3 ] Major Axis Angle Image data taken from the camera displays the object as a plane. When the object on this plane is rotated, the longitudinal direction axis, which is easy to rotate, is called the major axis of the main axis. The axis vertical to this is called the minor axis of the main axis. The µVision board defines an angle ( ) from the horizontal axis (X axis) to the major axis of the main axis as the main angle.
5.1.1.5 Binarization [ 1 ] Binarization Image data taken in the µVision board from the camera has 256 levels of brightness for each pixel. Binarization rewrites each pixel’s brightness to white (1) and black (0) with a threshold value as the boundary. This threshold value is called the binarization level. The µVision board designates binarization levels with two values, a lower binary limit and a upper binary limit.
Chapter 5 Vision Control [ 3 ] Binarization Level Detection Mode Method If the histogram of an image forms a double-humped distribution, which has two peaks corresponding to the object shape and the background, the method used to set the binarizatioin level (t) to the valley section (t) which lies between the two humps is called a mode method. Since the µVision board detects the peak and valley in the histogram in the direction from brightness value 0 to 255, as shown in Fig.
P Tile Method This method detects the binarization level where the object area coincides with Sx, by the use of a histogram when the object’s white and black area is already known as Sx. If the object is white, the area is obtained by adding pixels from a higher brightness value of the histogram. If the calculated result reaches Sx at the brightness level, the brightness value is set as the binarization level. If the object is black, the area is obtained by adding pixels from a lower brightness value.
Chapter 5 Vision Control 5.1.1.6 Brightness Integral Value The total of all pixel brightness values in the range designated with the window for the obtained image from the camera is called a brightness integral. The value of the total is called a brightness integral value. Window 100 100 100 100 100 100 100 100 100 100 20 20 20 20 100 20 20 20 20 100 20 20 20 20 100 Brightness integral value =100 ~ 13 { 20 ~ 12=1540 Fig. 5-11 Brightness Integral Value 5.1.1.
5.1.1.8 Labeling Labeling is a process to binarize the obtained image data from the camera and attach a sequence number to the link areas of white (1) or black (0) pixels. 0 1 Window 2 Object Fig. 5-13 Labeling With labeling, you can separately and individually handle multiple objects present in the range designated with the window. When labeling is executed, the µVision board can determine the area, center of gravity, main axis angle, filet shape, and periphery length as individual object features.
Chapter 5 Vision Control 5.1.1.9 Search Search moves the standard image data (search model) previously stored in the searching range (within the window range) of the measuring object image, and finds the matching position with the search model. Search Search model Window Fig. 5-16 Search In the µVision board, standard image data is called a search model. It is comprised of image data and the reference coordinates (OX, OY). Search model OY Image data OX Fig.
PART 2 COMMAND REFERENCE
Chapter 6 Guide to Command Reference This chapter provides command descriptions and a command list for the PAC robot. Use the command list to quickly search for information concerning each command.
Chapter 6 Guide to Command Reference 6.1 Description Format of Command Explanations Chapter 9 and the following chapters provide descriptions of each PAC command. This section explains the description format of commands. 9.4 9.4 HOME Coordinate HOME Coordinates (1) (2) HOME (Statement)[Confirm to SLIM] (3) 2.4.1. Function Declares an arbitrary coordinates as a home position. (4) 2.4.1.2 Format HOME (5) 2.4.1.
6.2 Command List 6.2.1 Commands Listed in Alphabetical Order Refer to Commands Listed in Alphabetical Order that follows the Contents. 6.2.2 Commands Listed According to Functions Refer to Commands Listed According to Functions that follows the Contents.
Chapter 7 PAC Language Configuration Elements This chapter provides an explanation of the elements that configure the PAC language.
Chapter 7 PAC Language Configuration Elements 7.1 New Robot Language PAC A programming language used to describe robot motion and work is called a robot language. The robot language used for DENSO robots is called PAC (Programming language for Assembly Cell). PAC was newly developed to increase efficiency in the development and maintenance of robot control programs over conventional languages. The major features are described below.
7.2 Relation between PAC Robot Language and Conventional Languages Conventionally there are many problems with robot languages such as incompatibility between different robots and manufacturers. JIS has enacted an industrial robot program language SLIM to standardize robot languages to help alleviate the burden of managing different languages for different robots.
Chapter 7 PAC Language Configuration Elements 7.3 Language Element The following elements are used to construct the PAC language. • • • • • • Identifier ...... the name to identify a construction element. Variable ....... to temporarily store data. Constant...... data with a constant value. Operator ...... a symbol to calculate two values. Expression .. a combination of construction elements used to obtain a value. Command.... an instruction built into the PAC language to execute processes.
7.5 Identifier 7.5.1 Variable A variable is used to temporarily store data used in a program. There are global variables, local variables and system variables. A global variable can be commonly used from any program (task). A local variable is valid only in one program. Even if another program executed together also has a variable with the same name, it works only in the program it belongs to and does not affect the programs mutually.
Chapter 7 PAC Language Configuration Elements [ 1 ] Global Variable A global variable name is expressed with an alphabet letter (I, F, D, S, V, P, J, T, IO)that expresses the type with an integer expression added after the letter. Only an I/O variable has 2 letters (IO). For example, F0001, F1, and F[1] all express the same single precision real type variable. Since variable names are reserved by the system, they can be used without declaration. The following types can be used for global variables.
Global Variable Indirect Reference When a global variable is designated, the variable number is designated using an expression. This is called an indirect reference. If an indirect reference is executed, the variable number enclosed in [ ] is expressed. Example: 7-6 I1 = I[5*3] 'Assigns a value of I15 to I1. F1 = F[I1] 'Assigns a type F variable with a value of I1 to F1. D1 = D[I1+1] 'Assigns a type D variable with a value that is I1 plus 1 to D1.
Chapter 7 PAC Language Configuration Elements [ 2 ] Local Variable The following variable types can be used for local variables in the same manner as global variables. • Type I: integer type (range: - 2147483648 ~ + 2147483647) • Type F: single precision real type (-3.402823E + 38 ~ 3.402823E + 38) • Type D: double precision real type (- 1.79769313486231D + 308 ~ 1.
[ 3 ] System Variable A system variable is used to check the system status. Since the variable name uses words reserved by the system, the variable name does not have to be declared. The following are system variables. CURJNT CURPOS CURTRN CURFIG CURACC CURDEC CURJDEC CURJSPD CURSPD DESTJNT DESTPOS DESTTRN DATE$ TIME$ TIMER ERL ERR 7.5.2 Function A function is used to obtain the operation result of the designated value (argument) using the operation method determined beforehand.
Chapter 7 PAC Language Configuration Elements 7.5.4 Program A program can be designated using the program name and calling other programs from the program. Declare a program name at the head of the program using the PROGRAM command. For program names, refer to “8.2 Program Name and Declaration”. Program example: program call using a program name Program on the program calling side PROGRAM PRO1 IF IO[138] = ON THEN CALL MOTION ELSE DELAY 200 END IF END “MOTION” program on called side.
7.6 Data Type The following data types are handled in the PAC language; character string, numeric value, position, vector and I/O. These data types are described below. 7.6.1 Character String Character string (String) type data is also referred to as type S data. It can include a maximum of 247 characters. 7.6.2 Numeric Value The following 3 types of data exist under numeric value type data. Type I: integer type (range: -2147483648 ~ + 2147483647) Type F: single precision real type (-3.402823E + 38 ~ 3.
Chapter 7 PAC Language Configuration Elements 7.7 Data Type Conversion Changing the data type among different data types is also possible. 7.7.1 Numeric Value Numeric value data can be converted by following the rules below. • If numeric value data is assigned to a different type numeric value variable, the numeric value is converted to meet the variable type. • If an operation is executed with a different type numeric value, the operation is carried out so that the higher precision type is used.
7.8 Constant A constant is an expression with a fixed value. Constants in the PAC language are classified into the following.
Chapter 7 PAC Language Configuration Elements Hexadecimal Format This is an integer type constant expressed using hexadecimal numbers. This is expressed by an arrangement of 0 to F with “&H” at the head of the numeric value. If the range for a numeric value of the integer type constant is expressed in the hexadecimal format, it is &H0~&HFFFFFFFF (in the range of 32 bits).
7.8.2 Character String Constant The character string type constant is a constant used to express a character sting. Express a character string by putting it in double quotations. The length of a character string must be 247 characters or less. Example: “PAC” 7.8.3 Vector Type Constant A vector type constant is a constant with vector expression consisting of components X, Y and Z. Each element of X, Y, and Z is expressed with single precision real.
Chapter 7 PAC Language Configuration Elements [ 2 ] Joint Type Constant A joint type constant is constructed of each axis value from the 1st to 6th. Each axis value is expressed using single type real. The unit is degrees. Example: Joint type constant is assigned to axis type variable J1. J[0] = (10,20,30,40,50,60) '1~6 axes: 10°,20°,30°,40°,50°,60° The element component of a joint type variable can be ignored in the middle of programming. If it is ignored, “0” is designated.
7.9 Expression and Operator An expression is used to return a value. There are expressions that have an independent value and expressions that are comprised of multiple elements linked via operators. All data type values in the PAC language are expressed with expressions. If the operators described in the following sections are used, the operation in the expression can be executed. 7.9.1 Assignment Operator Use the assignment operator [=] in the assignment statement to assign variables.
Chapter 7 PAC Language Configuration Elements Note (3): Note (4): Note (5): An error occurs if a digit overflow occurs in addition or multiplication of real or if an attempt is made to assign a value that cannot be recorded with an integer type variable from the real type variable. In subtraction among integers, the result is rounded off to the maximum integer which does not exceed the result. The sign of an integer remainder is decided as given in below Table .
7.9.4 Logical Operator The logical operator executes bit operations. An operation is executed after values other than integer type are converted to integer type. Note: If a value out of the permissible range is designated for integer type, an error occurs in execution. Logical Operators Logical operator Operation description NOT Negation AND Logical product OR Logical addition XOR Exclusive logical addition Example: Bit operation I1 = &B1100 XOR &B0101 The result of this example is &B1001.
Chapter 7 PAC Language Configuration Elements 7.9.6 Vector Operation In a vector operation, use the operators shown in below Table . An operation is carried out according to the priority shown in the table. Vector Operators Vector operator Operation description Operation priority ., *, x Inner product, scalar, outer product High +, - Addition, subtraction Low Example1:Calculation of inner product of V1 and V2. F1 = V1 . V2 Example2:Calculation of twice of V1.
7.9.8 Joint Operation This is the operation executed for joint type data. Only “+” can be used for operations of parallel deviation. Example: Calculation of point J1 which is (d1, d2, d3, d4, d5, d6) away from the reference point J0 deviation in the robot coordinate system. J1 = J0 + (d1, d2, d3, d4, d5, d6) Note : A joint type variable cannot be used for deviation. 7.9.9 Homogeneous Transformation Array Operation This is the operation executed for homogeneous transformation arrays.
Chapter 7 PAC Language Configuration Elements Example of operator precedence 1. if IO128 = ON and IO129 = OFF then (1) (2) (3) 2. if (IO128 = ON) and (IO129 = OFF) (1) (2) (3) then In the above examples, the operation order is (1) through (3).
7.10 Units for the PAC Language Below Table shows the units of expression for each physical value in the PAC language. Units of Expression for Each Physical Value in the PAC Language 7-22 Physical value Unit Length Millimeter (mm) Angle Degree (DEGREE) Time Millisecond (msec.
Chapter 8 PAC Language Syntax This chapter provides an explanation of the regulations for writing a program using the PAC language.
Chapter 8 PAC Language Syntax 8.1 Statement and Line A PAC language program is configured with multiple lines. One statement can be described on an arbitrary line. The length of a line may be up to 255 bytes. A statement is the minimum unit to describe a process in the PAC language and it is comprised of one command. A command is comprised of a command name and the information (parameter) given to the command.
8.2 Program Name and Declaration Declare the items required for program execution such as the program name and variables prior to execution. Especially if a program name is declared, it must be declared on the first valid line of the program. This statement is called a PROGRAM declaration statement. The PROGRAM declaration statement can be ignored. If ignored the program file name is used as the program name. For example, if the program file name is PRO1.
Chapter 8 PAC Language Syntax 8.3 Label A label can be used to indicate a branch destination and the position of a statement in a program. The following rules apply when using a label. • A label name starts with an asterisk ( * ) . • The second letter of a label name must be an arbitrary alphabet letter. • Any combination of alphabet letters and numerals can be used for the third letter and the following letters in a label name. • The last letter of a label name must be a colon ( : ) .
8.4 Character Set The characters which can be used in the PAC language include alphabet letters, numerals, and symbols. For the alphabet letters, no distinction is made between upper case and lower case letters. The symbols include the following in addition to arithmetic operators of (+, -, *, /). • Comma ( , ) Used to separate each parameter. • Semicolon ( ; ) Used to separate each parameter in an argument of a command. • Single quotation ( ' ) Used as a substitute for the REM command.
Chapter 8 PAC Language Syntax 8.5 Reserved Word A word which has fixed usage for PAC language processing such as command names or operators are called a reserved word. To use reserved words, special characters must be inserted (blank characters, ”, # and :) before and/or after each word, in order to identify them. Reserved words in the PAC language are given in “ Reserved word list” in Appendix-5.
8.6 Declaration Statement Declare definitions in a declaration statement before using variables, constants, functions and so on that are required to have designated names or types in a program. The following 3 broad types of statements fall under the declaration statement. • Type declaration : declares the type of a variable on : constant. • Function/program declaration : declares a function or program. • User coordinate system declaration : declares a user coordinate system. 8.6.
Chapter 8 PAC Language Syntax [ 2 ] Type Declaration Instruction The following type declaration commands can be used to declare the variable type.
[ 3 ] Array Declaration This is a declaration statement for an array. An array can be created for all types except for an I/O variable by adding a postposition to a variable name. However, an array cannot be initialized together with the declaration. The subscript of an array must be 0 or more. The array can be up to 3 dimensions. The upper limit of the total number of elements for an array is 32767.
Chapter 8 PAC Language Syntax 8.6.2 Function/program Declaration Commands used to declare a function or a program name are as follows. Function/Program Declaration Type Command Example Function declaration DEF FN DEF FN AREA (R) = PI * R * R Program declaration PROGRAM PROGRAM PRO1 8.6.3 User Coordinate System Declaration Commands shown below are used to declare a user coordinate system.
8.7 Assignment Statement An assignment statement sets a value for a variable of each type. There are 4 assignment statements for numeric values; assignment statement, character string assignment statement, vector assignment statement and pose assignment statement. Note: The LET command can be ignored in all assignment statements. 8.7.1 Numeric Value Assignment Statement A numeric value assignment statement assigns a value to a numeric value variable. Example: LET I[1] = 10 D[2] = 3.
Chapter 8 PAC Language Syntax 8.7.4 Pose Assignment Statement There are 4 types of pose assignment statements: position assignment statement, joint assignment statement, homogeneous transformation assignment statement, and home position assignment statement. [ 1 ] Position Assignment Statement A position assignment statement assigns a position type variable. following commands can be used.
[ 3 ] Homogeneous Transformation Assignment Statement A homogeneous transformation assignment statement assigns a value to a homogeneous transformation type variable. The following commands can be used.
Chapter 8 PAC Language Syntax 8.8 Flow Control Statement Use a flow control statement to control the execution sequence of each statement in a program. Use a label in a program control flow statement to indicate the position of it in a program. The flow control can be roughly classified into 5 statements: unconditional branch, conditional branch, selection, repeat and calling defined process. 8.8.1 Unconditional Branch Use this to transfer program execution to an arbitrary position.
8.8.4 Repeat This controls repetition according to a designated condition. commands for this. There are 4 In FOR ~ NEXT statements, place a repetition condition after the FOR line. The process from FOR to the corresponding NEXT line repeats until this condition is satisfied. In DO ~ LOOP statements, place a relational expression after WHILE or UNTIL.
Chapter 8 PAC Language Syntax 8.8.5 Calling Defined Process If a part of a program that repeats a particular motion is separated, the part can be called as it is required. This is referred to as a calling defined process. For the calling defined process there are two kinds of calling; subroutine calling and program calling. [ 1 ] Subroutine If a subroutine is called, designate a destination with a label in a GOSUB statement. The subroutine must be written in the same file as the program to be called.
[ 2 ] Program If a program is called, designate the program name in a CALL statement and execute it. A recursive call can also be executed. For details refer to “2.1 Calling a Program and Subroutine”.
Chapter 8 PAC Language Syntax 8.9 Robot Control Statement Robot control statements can be roughly classified into a motion control statement, a figure control statement, a stop control statement, a speed control statement, a time control statement, and a coordinate transformation statement. 8.9.1 Motion Control Statement A statement to control the robot motion is called a motion control statement. There are robot arm motion control statements, hand control statements and motor control statements.
8.9.3 Speed Control Statement A speed control statement can be used to set the movement speed, as well as the acceleration and deceleration of the arm. Speed Control Commands Type of motion Command CP control speed designation SPEED PTP control speed designation JSPEED CP control acceleration deceleration ACCEL PTP control acceleration deceleration JACCEL CP control deceleration designation DECEL PTP control deceleration designation JDECEL 8.9.
Chapter 8 PAC Language Syntax 8.10 Input/output Control Statement There are 3 types of input/output control statements; DI/DO statement, RS232C control statement and pendant control statement. 8.10.1 DI/DO Control Statement A DI/DO control statement controls I/O port input/output. DI/DO Control Commands Type of motion Command Data reading IN Data writing OUT I/O port ON SET I/O port OFF RESET Non-motion instruction concurrent processing IOBLOCK 8.10.
8.11 Multitasking Control Statement Multitasking control statements include a task control statement and a semaphore control statement. 8.11.1 Task Control Statement A task control statement controls tasks except for those which include a task control statement. Task Control Commands Type of motion Command Task creation and running RUN Task abort SUSPEND Task deletion KILL Task protection DEFEND 8.11.2 Semaphore Control Statement A semaphore control statement executes semaphore-related control.
Chapter 8 PAC Language Syntax 8.12 Time and Date Control Time and data control statements obtain the current time and date, the elapsed time, and the control interruption due to time.
8.13 Error Control An error control statement controls interruption due to an error.
Chapter 8 PAC Language Syntax 8.14 System Information System information can be obtained using the following commands. System Information Commands Type of motion Command Obtains the system environment setting value GETENV System environment setting value assignment LETENV Obtains the ROM version information VER$ Obtains the program status.
8.15 Preprocessor A preprocessor statement controls character string replacement or file fetch when a program is converted (compiled) into execution form.
Chapter 8 PAC Language Syntax 8.16 Calling with a Value and with Reference It may be desired to pass data to a program when another program is called from the current program. In this case the data can be passed by adding an argument list after by the program name to be called. “Calling with a value” directly passes a value while “calling with reference” passes variables using an argument passing method. The commands to call a program are CALL and RUN.
8.16.2 Calling with Reference A local variable can be passed as an argument. To designate an entire array as an argument, put the array name in parentheses. When the contents of a variable passed by calling with reference are changed in the program to be called, the change is valid even if the flow returns to the calling program.
Chapter 8 PAC Language Syntax 8.17 Vision Control 8.17.1 Image Input/output The commands below control camera images and image data in memory.
8.17.3 Draw The commands below are used to control the draw motion in storage memory (processing screen) and overlay memory (draw only screen) .
Chapter 8 PAC Language Syntax 8.17.5 Code Recognition The command below executes QR code reading. Code Recognition Command Type of motion Command QR code reading VISREADQR 8.17.6 Labeling The commands shown below are used to execute label processing. Labeling Commands Type of motion Command Labeling execution BLOB Feature measurement for label number BLOBMEASURE Label number obtaining BLOBLABEL Label image copy BLOBCOPY 8.17.
8.17.8 Result Obtaining The commands below are used to obtain information related to the contents of results after image processing. Result Obtaining Commands Type of motion Command Image process result obtaining VISGETNUM Control recognition result obtaining VISGETSTR Image process result X coordinate obtaining VISPOSX Image process result Y coordinate obtaining VISPOSY Process result status obtaining VISSTATUS 8.17.
Chapter 9 Declaration Statements When variables or functions are used in a program they must be defined with a declaration statement. The declaration statement commands explained in this chapter are used for this purpose. However, system variables and built-in functions can be used directly in a program without declaration.
Chapter 9 Declaration Statements 9.1 Program Name PROGRAM (Statement) Function Declares a program name. Format PROGRAM [([,...])] Explanation This statement declares the character string designated in as the program name. Declare a program name on the first line of the program. If there is no program name declaration on the first line, the file name becomes the program name.
9.2 Interference Area Coordinates AREA (Statement ) Function Declares the area where an interference check is performed. Format AREA , , , , [,] Explanation This statement declares an interference check area. The number of areas that can be declared with is 8, from 0 to 7. is the center position and angle of an interference check area.
Chapter 9 Declaration Statements Notes The center position of an area is always based on WORK0. Even if the user coordinate system is changed, the position of the interference check area will not change. Tool coordinate reference point for WORK 1. Tool coordinate reference point for WORK 0.
9.3 User Function DEF FN (Statement) [Conforms to SLIM] Function Declares a user-defined function. Format DEF FN [] = DEF FN []([,...]) = Explanation This statement declares a starting with FN as the user defined function. Designate a variable name used in for . can be ignored.
Chapter 9 Declaration Statements 9.4 Home Coordinates HOME (Statement)[Conforms to SLIM] Function Declares arbitrary coordinates as a home position. Format HOME Explanation Declares arbitrary coordinates designated with as a home position. Define a home position for each program. If multiple HOME statements are declared, the most recent declaration is taken as the home position.
9.5 Tool Coordinates TOOL (Statement) Function Declares a tool coordinate system. Format TOOL , Explanation Declares a position specified with as the tool coordinate system specified with . A number from 1 to 63 can be specified for the tool coordinate system number.
Chapter 9 Declaration Statements 9.6 Work Coordinates WORK (Statement) Function Declares a user coordinate system. Format WORK , Explanation Declares the user coordinates assigned to the position type variable shown in as the user coordinate system specified by . A number from 1 to 7 can be used for the user coordinate system number.
9.7 Local Variable DEFINT (Statement) Function Declares an integer type variable. −2147483648 to 2147483647. The range of the integer is from Format DEFINT [=][,[=]...] Explanation This statement declares the variable designated by as the integer type variable. By writing a constant after , initialization can be carried out simultaneously with the declaration.
Chapter 9 Declaration Statements DEFSNG (Statement) Function Declares a single precision real type variable. The range of single precision real variables is from -3.402823E+38 to 3.402823E+38. Format DEFSNG [=][,[=]...] Explanation This statement declares a variable designated by as a single precision real type variable. By writing a constant after , initialization can be done simultaneously with the declaration.
DEFDBL (Statement) Function Declares a double precision real type variable. The range of double precision real type variables is from -1.79769313486231D + 308 to 1.79769313486231D + 308. Format DEFDBL [=][,[=]...] Explanation Declares the variable designated by as a double precision real type variable. By writing a constant after , initialization can be performed simultaneously with the declaration.
Chapter 9 Declaration Statements DEFSTR (Statement) Function Declares a character string type variable. You can enter 247 characters or less as a character string. Format DEFSTR [=][,[=]...] Explanation Declares a variable designated by as a character string. By writing a constant after , initialization can be done simultaneously with the declaration.
DEFVEC (Statement) Function Declares a vector type variable. Format DEFVEC [=][, [=]...] Explanation This statement declares a variable designated by as a vector type variable. By writing a constant after , initialization can be carried out simultaneously with the declaration. Multiple variable names can be declared at a time by delineating the names using “,”.
Chapter 9 Declaration Statements DEFPOS (Statement) Function Declares a position type variable. Format DEFPOS [=][, [=]...] Explanation Declares a variable designated by as a position type variable. By writing a constant after , initialization can be carried out simultaneously with the declaration. Multiple variable names can be declared at a time by delineating the names using “,”.
DEFJNT (Statement) Function Declares a joint type variable. Format DEFJNT [=][,[=]...] Explanation This statement declares a variable designated by as a joint type variable. By writing a constant after , initialization can be carried out simultaneously with the declaration. Multiple variable names can be declared at a time by delineating the names using “,”.
Chapter 9 Declaration Statements DEFTRN (Statement) Function Declares a homogeneous transformation type variable. Format DEFTRN [=] [,[=]...] Explanation This statement declares a variable designated by as a homogeneous transformation type variable. By writing a constant after , initialization can be carried out simultaneously with the declaration.
DEFIO (Statement) [Conforms to SLIM] Function Declares an I/O variable corresponding to the input/output port. Format DEFIO = ,[,] Explanation This statement declares a variable designated by as an I/O variable. Selects the type of the I/O variable. The I/O variable types include BIT, BYTE, WORD and INTEGER.
Chapter 9 Declaration Statements 9.8 Array DIM (Statement) [Conforms to SLIM] Function Declares an array. Format DIM [] [([,[,]])][AS][,[]...] Explanation This statement declares a variable designated by as an array variable. By adding , the system can declare the variable type together. The following postpositions are available.
Example DIM samp1(5) DIM samp2(10, 10) DIM samp3(20, 5, 10) DIM samp4% (3, 3, 3) DIM samp5! (4, 3) DIM samp6# (3) 9-18 'Declares samp1 as an array variable 'real type with size (5). 'Declares samp2 as an array variable 'real type with size (10, 10). 'Declares samp3 as an array variable 'real type with size (20, 5, 10). 'Declares samp4 as an array variable 'size (3, 3, 3). 'Declares samp5 as an array variable 'real type with size (4, 3). 'Declares samp6 as an array variable 'real type with size (3).
Chapter 10 Assignment Statements Use an assignment statement command when assigning a value to variables. Use commands properly according to the type or contents of the value to be handled.
Chapter 10 Assignment Statements 10.1 Variables LET (Statement) [Conforms to SLIM] Function Assigns a value to a variable. Format [LET] = Explanation You can ignore [LET]. As a rule the type and the type must be the same. If the variable name type and the arithmetic expression type are different, they are converted as follows. • is converted to the variable type.
10.2 Vector LETA (Statement) Function Assigns a value to an approach vector of the homogeneous transformation type. Format LETA = Explanation The assignment statement starts with LETA and the right side of the statement is a vector. By the execution of this assignment the approach vector of is changed to .
Chapter 10 Assignment Statements LETO (Statement) Function Assigns a value to an orientation vector of the homogeneous transformation type. Format LETO = Explanation The assignment statement starts with LETO and the right side of the expression is a vector. By the execution of this assignment the orientation vector of is changed to .
LETP (Statement) Function Assigns a value to a position vector of the position type or homogenous transformation type. Format LETP {|} = Explanation The statement starts with LETP and the right side of the expression is a vector. By the execution of this assignment, the position vector of or is changed to .
Chapter 10 Assignment Statements 10.3 Figure LETF (Statement) Function Assigns a value to a figure component of the position type or homogenous transformation type. Format LETF | Explanation The statement starts with LETF and the right side of the expression is . By the execution of this assignment, the figure component of is changed to the value of .
10.4 Link Angle LETJ (Statement) Function Assigns a value to a designated link angle of the joint type. Format LETJ , = Explanation The statement starts with LETJ and the right side of the expression is . By the execution of this assignment the link angle designated by of is changed to the value of .
Chapter 10 Assignment Statements 10.5 Posture LETR (Statement) Function Assigns a value to three rotation components of the position type. Format LETR = Explanation The statement starts with LETR and the right side of the expression is a vector. By the execution of this assignment, the figure of is changed to .
10.6 Rotation Component LETRX (Statement) Function Assigns a value to the X axis rotation component of the position type. Format LETRX = Explanation The statement starts with LETRX and the right side of the expression is an X axis rotation angle. By the execution of this assignment, the X axis rotation component of is changed to the value of .
Chapter 10 Assignment Statements LETRY (Statement) Function Assigns a value to the Y axis rotation component of the position type. Format LETRY = Explanation The statement starts with LETRY and the right side of the expression is an Y axis rotation angle. By the execution of this assignment, the Y axis rotation component of is changed to the value of .
LETRZ (Statement) Function Assigns a value to the Z axis rotation component of the position type. Format LETRZ = Explanation The statement starts with LETRZ and the right side of the expression is a Z axis rotation angle. By the execution of this assignment, the Z axis rotation component of is changed to the value of .
Chapter 10 Assignment Statements LETT (Statement) Function Assigns a value to the T axis component of the position type. Format LETT = Explanation The statement starts with LETT and the right side of the expression is a T axis rotation angle. By the execution of this assignment, the T axis rotation component of is changed to the value of .
10.7 Axis Component LETX (Statement) [Conforms to SLIM] Function Assigns a value to the X axis component of the Vector type/ Position type/ Homogenous transformation type. Format LETX {||}= Explanation The statement starts with LETX and the right side of the expression is an X axis component.
Chapter 10 Assignment Statements LETY (Statement) [Conforms to SLIM] Function Assigns a value to the Y axis component of the Vector type/ Position type/ Homogenous transformation type. Format LETY {||}= Explanation The statement starts with LETY and the right side of the expression is Y axis component.
LETZ (Statement)[Conforms to SLIM] Function Assigns a value to the Z axis component of the vector type/ position type/ homogeneous transformation type. Format LETZ {||}= Explanation The statement starts with LETZ and the right side of the expression is a Z axis component.
Chapter 11 Flow Control Statements A flow control statement is used to change the program flow depending on the situation. There are many ways to have the program proceed to the next process.
Chapter 11 Flow Control Statements 11.1 Program Stop END (Statement) [Conforms to SLIM] Function Declares the motion end by a program. Format END Explanation The motion by a program will end if this command is executed. This does not mean the end of the program file. When subroutines are used, the subroutines will be arranged after the main routine in some cases. Use this END instruction to delimit the main routine from the subroutines.
STOP (Statement) [Conforms to SLIM] Function Ends program execution. Format STOP Explanation During program execution, if the system executes a STOP statement, the program execution ends there. Related Terms DELAY, HALT, HOLD, STATUS Example REM Executes plural condition decision. SELECT CASE Index 'The command is executed if the index value and the CASE 'statement value match. CASE 0 'When the index is 0. STOP 'Ends a program. CASE 1 'When the index is 1. HALT “STOP” 'Suspends program execution.
Chapter 11 Flow Control Statements STOPEND (Statement) Function This statement stops a continuously executed program or stops a program with a cycle option after a cycle. When a cycle of a program that includes this statement is started, the motion will not be affected even if this statement is executed. Format STOPEND Explanation If a program in execution encounters a STOPEND statement, the system stops the program being executed after a cycle.
11.2 Call CALL (Statement) Function Calls a program and executes it. Format CALL [([,…])] Explanation A CALL statement calls the program designated by and transfers control. An END statement in a CALL program has the same meaning as a RETURN statement in a subroutine and returns control to the calling program. Designate an argument to send the program designated by for .
Chapter 11 Flow Control Statements 2. Calling with reference In calling with reference, a variable can be sent as an argument. When you wish to designate a whole array as , add parentheses ( ) to the array name. For a variable sent by calling with reference, if its contents are modified in the called program, the modification is valid even if it returns to the calling program.
GOSUB (Statement) [Conforms to SLIM] Function Calls a subroutine. Format GOSUB
Chapter 11 Flow Control Statements ON-GOSUB (Statement) [Conforms to SLIM] Function Calls a corresponding subroutine to the value of an expression. Format ON GOSUB [,]… Explanation This statement makes control jump to the label written in the same order as the value of to continue program execution. The labels are counted in the order of 1, 2, … from the left.
RETURN (Statement) [Conforms to SLIM] Function Returns from a subroutine. Format RETURN Explanation This statement ends the execution of a subroutine to which control has been transferred with a GOSUB statement and returns to the calling program. Related Terms GOSUB Example DIM li1 As Integer IF li1 = 0 THEN 'When li1 is 0. STOP 'Stops the execution of the program. ELSEIF li1 = 1 THEN 'When li1 is 1. GOTO *samp1 'Jumps to the label of *samp1. GO TO *samp2 'Jumps to the label of *samp2.
Chapter 11 Flow Control Statements 11.3 Repeat DO-LOOP (Statement) Function Executes a decision iteration (repetition). Format DO [{WHILE|UNTIL}[]] : LOOP Or DO : LOOP [{WHILE|UNTIL}[]] Explanation DO WHILE and DO UNTIL are head decision iterations. LOOP WHILE and LOOP UNTIL are tail decision iterations.
Example DEFINT li1, li2, li3, li4, li5, li6, li7, li8, li9 DO WHILE li1 > li2 'Executes a head decision iteration. IF li1 = 4 THEN EXIT DO 'Exits from DO-LOOP if li1 = 4. FOR li3 = 0 TO 5 'Repeats the process of FOR-NEXT 5 times. FOR li4 = li5 TO li6 'Repeats the process of FOR-NEXT by adding 1 to the value of 'li5 every time the repetition is done until li5 becomes the value 'of li6.
Chapter 11 Flow Control Statements EXIT DO (Statement) Function Forcibly exits from DO-LOOP. Format EXIT DO Explanation This statement forcibly exits from DO-LOOP and proceeds to the next instruction of a DO-LOOP statement. Related Terms DO-LOOP Example DEFINT li1, li2, li3, li4, li5, li6, li7, li8, li9 DO WHILE li1 > li2 'Executes a head decision iteration. IF li1 = 4 THEN EXIT DO 'Escapes from DO-LOOP if li1 = 4. FOR li3 = 0 TO 5 'Repeats the process of FOR-NEXT 5 times.
FOR-NEXT (Statement) [Conforms to SLIM] Function Repeatedly executes a series of instructions between FOR-NEXT sections. Format FOR = TO [STEP ] : NEXT [] Explanation This statement repeatedly executes a series of instructions between FORNEXT according to the condition designated on the FOR line. Set the initial value of the variable designated by for .
Chapter 11 Flow Control Statements Example DEFINT li1, li2, li3, li4, li5, li6, li7, li8, li9 DO WHILE li1 > li2 'Executes a head decision iteration. IF li1 = 4 THEN EXIT DO 'Exits from DO-LOOP if li1 = 4. FOR li3 = 0 TO 5 'Repeats the process of FOR-NEXT 5 times. FOR li4 = li5 TO li6 'Repeats the process of FOR-NEXT by adding 1 to the 'value of li5 every time the repetition is done until 'li5 becomes the value of li6.
EXIT FOR (Statement) Function Forcibly exits from FOR-NEXT. Format EXIT FOR Explanation This statement forcibly exits from FOR-NEXT and proceeds to the next instruction after a FOR-NEXT statement. Related Terms FOR-NEXT Example DEFINT li1, li2, li3, li4, li5, li6, li7, li8, li9 DO WHILE li1 > li2 'Executes a head decision iteration. IF li1 = 4 THEN EXIT DO 'Exits from DO-LOOP if li1 = 4. FOR li3 = 0 TO 5 'Repeats the process of FOR-NEXT 5 times.
Chapter 11 Flow Control Statements REPEAT-UNTIL (Statement) Function Executes a tail decision iteration. Format REPEAT : UNTIL [] Explanation This statement repeats statements between a REPEAT statement and an UNTIL statement until is satisfied. If is ignored, it is regarded as true (except for 0) and a loop is executed only once.
WHILE-WEND (Statement) Function Executes a head decision iteration. Format WHILE [] : WEND Explanation This statement repeats statements between a WHILE statement and a WEND statement while is satisfied. If is ignored, it is regarded as true (except for 0) and the loop is infinitely repeated.
Chapter 11 Flow Control Statements 11.4 Conditional Branch IF-END IF (Statement) Function Conditionally decides a conditional expression between IF-END IF. Format IF THEN : [ELSEIF THEN] : [ELSE] : END IF Explanation The execution of a program is controlled with the condition of . If of an IF statement is true (except for 0), then the statements between the IF-ELSEIF statement are executed.
IF-THEN-ELSE (Statement)[Conforms to SLIM] Function Executes a conditional decision of a logical expression. Format IF THEN {|} [ELSE {|}] Explanation This statement controls the execution of a program depending on the condition of . If is true (except for 0), then the latter section of THEN is executed.
Chapter 11 Flow Control Statements SELECT CASE (Statement) Function Executes a plural condition decision. Format SELECT CASE CASE - [,
- ...] : [CASE ELSE] END SELECT Explanation This statement executes a series of instructions after CASE if the value of matches
- of the CASE statement. An arithmetic expression or character string can be designated for . A variable, a constant, an expression or a conditional expression can be designated for
- .
Example REM Executes a plural condition decision. SELECT CASE Index 'The command is executed if the index value matches the CASE 'statement value. CASE 0 'When the index is 0. STOP 'Ends the program. CASE 1 'When the index is 1. HALT “STOP” 'Suspends the execution of the program. CASE 2 'When the index is 2. HOLD “STOP” 'Suspends the execution of the program. CASE 3 'When the index is 3. STOPEND 'Stops a continuous program or stops the program after a cycle. CASE 4 'When the index is 4.
Chapter 11 Flow Control Statements 11.5 Unconditional Branch GOTO (Statement) [Conforms to SLIM] Function Unconditionally branches a program. Format {GOTO|GO TO} Explanation This statement jumps to the label designated by and continues execution there. GO TO can be used instead of GOTO. Related Terms GOSUB Example DIM li1 As Integer IF li1 = 0 THEN STOP ELSEIF li1 = 1 THEN GOTO *samp1 GO TO *samp2 ELSEIF li1 = 2 THEN GOSUB *samp3 ELSE RETURN END IF 'When li1 is 0.
ON-GOTO (Statement) [Conforms to SLIM] Function Executes an unconditional branch due to the value of an expression. Format ON GOTO [,]… Explanation This statement jumps to the line number written at the same level as the value of and continues the execution of the program there. The order of this is counted as 1, 2, … from the left. The system rounds down the value of to an integer and processes it.
Chapter 11 Flow Control Statements 11.6 Comment REM (Statement)[Conforms to SLIM] Function Describes a comment. Format {REM|'}[] Explanation This statement is added when is described in a program. A character string after REM does not affect program execution. A single quote (') can be used instead of REM. Example REM Executes a plural condition decision. SELECT CASE Index 'The command is executed when the index value matches the CASE 'statement value. CASE 0 'When the index is 0.
Chapter 12 Robot Control Statements This chapter provides an explanation of the commands and robot control statements used for robot motion control.
Chapter 12 Robot Control Statements 12.1 Motion Control APPROACH (Statement) Function Executes the absolute movement designated in the tool coordinate system. Format APPROACH , ,[ ][,][,NEXT] start Explanation The position type, joint type or homogeneous type can be used for .
If is added, the robot proceeds to the next no-movement instruction without waiting for movement to finish. However, the following instructions are not executed until robot movement ends (pass start). Robot motion instructions (CHANGETOOL, CHANGEWORK, SPEED, JSPEED, ACCEL, JACCEL, DECEL, JDECEL), optimal carrying mass setting library (aspACLD, aspChange), arm movement library (mvSetPulseWidth, etc.) If this command is used with a movement option, the NEXT option is no longer valid.
Chapter 12 Robot Control Statements 4-axis APPROACH P, (100, 200, 300, 45, 1), 70 'Moves to a position 70mm far form a point (100, 200, '300, 45,1) with posture 1 in +Zb direction (PTP 'control) APPROACH L, lp1, lf1, SPEED=100 'Moves to a position lf1 far form lp1 in +Zb direction '(CP control, internal speed=100%) APPROACH P, lp2, @P, lf2, S=50 'Moves to a position lf2 far form lp2 in +Zb direction 'along a path (PTP control, internal speed=50%) APPROACH L, lp3, 80 'Moves to a position 80 mm far from lp3
DEPART (Statement) Function Executes the relative motion in the tool coordinate system. Format DEPART ,[[,][,NEXT] start displacement> ] distance from the current position in the – Z direction of the tool coordinate system. 4-axis The robot moves by distance from the current position in the – Z direction of the tool coordinate system.
Chapter 12 Robot Control Statements If is added, the robot proceeds to the next no-movement instruction without waiting for movement to finish. However, the following instructions will not be executed until robot movement ends (pass start). Robot motion instructions (CHANGETOOL, CHANGEWORK, SPEED, JSPEED, ACCEL, JACCEL, DECEL, JDECEL), optimal carrying mass setting library (aspACLD, aspChange), arm movement library (mvSetPulseWidth, etc.
Related Terms APPROACH, SPEED Example 6-axis DEFSNG lf1, lf2 DEPART P, 70 4-axis DEPART P, 70 'The robot moves (PTP control) to a position 70 mm 'away from the current position in the –Zm direction. DEPART L, lf1, SPEED = 100 'The robot moves (CP control, S = 100) to a position lf1 'distance away from the current position in the –Zm 'direction. DEPART P, lf2, S = 50 'The robot moves (PTP control, S = 50) to a position lf2 'distance away from the current position in the –Zm 'direction.
Chapter 12 Robot Control Statements DRAW (Statement) Function Executes the relative movement designated in the work coordinate system. Format DRAW ,[][,][,NEXT] Explanation The robot moves from the current position by a distance of . Either P (or PTP) or L can be selected for . Interpolation method Meaning P (or PTP) Moves in PTP control.
If is added, the robot proceeds to the next no-movement instruction without waiting for movement to finish. However, the following instructions will not be executed until the robot movement ends (pass start). Robot motion instructions (CHANGETOOL, CHANGEWORK, SPEED, JSPEED, ACCEL, JACCEL, DECEL, JDECEL), optimal carrying mass setting library (aspACLD, aspChange), arm movement library (mvSetPulseWidth, etc.) If this command is used with the movement option, the NEXT option is no longer valid.
Chapter 12 Robot Control Statements DRIVE (Statement) [Conforms to SLIM] Function Executes the relative motion of each axis. Format DRIVE[ ](,)[,(,)…][,][,NEXT] Explanation This statement moves the axis designated by to the angle (DEG) designated by .
If is added, the robot proceeds to the next no-movement instruction without waiting for movement to finish. However, the following instructions will not be executed until robot movement ends (pass start). Robot motion instructions (CHANGETOOL, CHANGEWORK, SPEED, JSPEED, ACCEL, JACCEL, DECEL, JDECEL), optimal carrying mass setting library (aspACLD, aspChange), arm movement library (mvSetPulseWidth, etc.) If this command is used with the movement option, the NEXT option is no longer valid.
Chapter 12 Robot Control Statements DRIVEA (Statement) Function Executes the absolute motion of each axis. Format DRIVEA[ ] (,)[,(,)…][,][,NEXT] Explanation This statement moves the axis designated by to the angle (DEG) designated by . To execute this command, it is necessary to get an arm group including a joint(s) to be moved.
If is added, the robot proceeds to the next no-movement instruction without waiting for movement to finish. However, the following instructions will not be executed until robot movement ends (pass start). Robot motion instructions (CHANGETOOL, CHANGEWORK, SPEED, JSPEED, ACCEL, JACCEL, DECEL, JDECEL), optimal carrying mass setting library (aspACLD, aspChange), arm movement library (mvSetPulseWidth, etc.) If this command is used with the movement option, the NEXT option is no longer valid.
Chapter 12 Robot Control Statements GOHOME (Statement) [Conforms to SLIM] Function Moves to the position (home position) defined by the HOME statement. Format GOHOME Explanation This statement moves the robot from the current position to the home position using PTP control. Use the HOME statement to declare a home position. An error will occur if this statement is executed without setting HOME. Related Terms HOME Example GOHOME 'The robot moves from the current position to the home position.
MOVE (Statement) [Conforms to SLIM] Function Moves the robot flange to the specified coordinates. If specified with an EX option (relative motion of extended-joints) or EXA option (absolute motion of extended-joints), the MOVE can move both the robot flange and the extended-joints synchronously. (i.e. Synchronized start and stop from/at the specified positions is possible.
Chapter 12 Robot Control Statements The value of is expressed using the radius of the globe with the designated coordinates centered. If the motion instruction value is entered, the robot proceeds to the next control. Designate the value in millimeters. This value aims to change the pass start timing, and if the end of the arm enters the globe, the robot does not always proceed to the next control. If the value is ignored, it is processed as the default value @0.
(The left expressions have higher priority in processing.) Therefore, (1) If these expressions are present between IOBLOCK ON and OFF, the next non-motion instruction is not executed until the motion of the final pose (P5 or P9) motion starts. Refer to Part 2 “6.1.3 IOBLOCK ON/OFF.” (2) If the NEXT option is added, the next non-motion instruction is not executed until the final pose (P5 or P9) motion starts. The syntax of an EX or EXA option is shown below.
Chapter 12 Robot Control Statements Ex2 PROGRAM PRO1 TAKEARM 2 MOVE P, P0 EX ((7,30),(8,10)) MOVE P, P1 EXA ((7,30)) 'Get Arm Group 2 involving both robot 'joints and extended-joints. 'Move robot flange to P0 as well as 'moving 7th and 8th extended-joints to 'relative coordinates synchronously. 'Move robot flange to P1 as well as 'moving 7th extended-joint to absolute 'coordinates synchronously.
Notes (1) If a pose is designated in the position type and the homogeneous transformation type, the designated pose goes beyond the robot motion space. As a result of this an error with level 6070 (J* software motion limit over, out of motion space, singular point) may occur. Be careful when designating specific figures of 16 to 31. (2) In CP motion or arc interpolation motion, if the current figure (refer to the "Setting-up Guide, 4.1.
Chapter 12 Robot Control Statements ROTATE (Statement) [Conforms to SLIM] Function Executes a rotation movement around the designated axis.
6-axis For , designate a work coordinate point if the rotation plane is of {XY|YZ|ZX} and(Vector type, Vector type, Vector type). And if the rotation plane is of {XYH|YXH|ZXH}, designate a tool coordinate point. If is ignored, the rotation center will be (0,0,0) when the rotation plane is of {XY|YZ|ZX}. And when the rotation plane is of (Vector type, Vector type, Vector type), the first vector becomes the rotation center.
Chapter 12 Robot Control Statements Related Terms ROTATEH Example ROTATE XY,45,V1 posture 'The robot 'around the rotates axis by 45 degrees at a passing through point constant V1 and vertical 6-axis only 'to the XY plane. ROTATE(V2, V3, V4),F1 'The robot rotates around the axis vertical to the plane 'created from (V2, V3, V4) passing point V2 by the 'value of F1.
ROTATEH (Statement) Function Executes rotary motion by taking an approach vector as an axis. Format ROTATEH [@ ][,][,NEXT] Explanation This statement rotates the hand end by taking the approach vector as the axis. The unit of measurement for is degrees (DEG).
Chapter 12 Robot Control Statements For there are SPEED, ACCEL, and DECEL options. Motion option Meaning SPEED (or S) Designates the movement speed. The meaning is the same as the SPEED statement. ACCEL Designates acceleration. The meaning is the same as the ACCEL statement. However, deceleration cannot be designated. Use the DECEL statement to designate deceleration. DECEL Designates deceleration. The meaning is the same as the DECEL statement.
CURJNT (System Variable) Function Obtains the current angle of the robot using type J. Format {CURJNT | *} Explanation The Joint angles detected by each axis encoder of the robot are stored using type J data. If the robot is in operation the values are obtained when this instruction is executed. If the destination pose is obtained use DESTJNT. Related Terms DESTJNT, CURPOS, CURTRN Example DIM lj1 As Joint lj1 = CURJNT 6-axis 4-axis 'Assigns the current joint angle to lj1.
Chapter 12 Robot Control Statements CURPOS (System Variable)[Conforms to SLIM] Function Obtains the current position in the tool coordinate system using type P. Format {CURPOS|*} Explanation The current positions detected by each axis encoder in the tool coordinate system are stored using type P data. If the robot is in operation the values are obtained when this instruction is executed. If the destination pose is obtained use DESTPOS.
CURTRN (System Variable) [Conforms to SLIM] Function Obtains the current position in the tool coordinate system using type T. Format {CURTRN | *} Explanation The current positions detected by each axis encoder in the tool coordinate system are stored using type T data. If the robot is in operation the values are obtained when this instruction is executed. If the destination pose is obtained use DESTTRN.
Chapter 12 Robot Control Statements CUREXJ (Statement) Function Gets the current angle of an extended-joint into a floating-point variable. Format CUREXJ() Explanation CUREXJ reads an angle detected by the encoder of an extended-joint specified by into a floating-point variable. If the specified joint is in motion, this command will get the current angle of the joint detected when this command executes. To get the target angle of an extended-joint, use a DESTEXJ command.
DESTJNT (System Variable) Function Obtains the current movement instruction destination position using type J. The current position (instruction value) is obtained when the robot stops. Format DESTJNT Explanation The destination position of the previous movement instruction is stored using a type J data format. Because the data can be obtained with a system variable, the transfer of data to another program using local variables or global variables is not required.
Chapter 12 Robot Control Statements DESTPOS (System Variable) Function Obtains the current movement instruction destination position with type P. When the robot stops, the current value (instruction value) is obtained. Format DESTPOS Explanation The destination position of the previous movement instruction is stored with a format of a type P data.
DESTTRN (System Variable) Function Obtains the current movement instruction destination position with type T. When the robot stops, the current position (instruction value) is obtained. Format DESTTRN Explanation The destination position of the previous movement instruction is stored using a type T data format. Because the data can be obtained with a system variable, it does not require to transfer the data to another program with variables such as local variables or global variables.
Chapter 12 Robot Control Statements DESTEXJ (Statement) Function Gets the target position of an extended-joint invoked by the current motion command into a floating-point variable. If the robot is on halt, this command will get the current position (commanded value). Format DESTEXJ() Explanation DESTEXJ reads the target position of an extended-joint invoked by the current motion command and specified by into a floating-point variable.
ARRIVE (Statement) [Ver.1.2 or later] Function Defines the motion ratio relative to the programmed full travel distance to the target point in order to make the current program stand by to execute the next step until the robot reaches the defined motion ratio. Format ARRIVE Explanation When an usual motion command is executed, any command on the subsequent step cannot be executed until the completion of the current motion or the start of pass motion.
Chapter 12 Robot Control Statements Notes An ARRIVE command defines the motion ratio for the immediately preceding motion command in a TAKEARMed task that has obtained arm-semaphore. If an ARRIVE command is executed after arm-semaphore is obtained and before execution of a motion command, Error 648C will result. If an ARRIVE command is executed without arm-semaphore obtained, Error 21F7 will result.
POSCLR (Statement) Function Forcibly restores the current position of a joint to 0 mm or 0 degree. Format POSCLR Explanation POSCLR forcibly restores the angle of a joint specified by to 0 mm or 0 degree. This command is applicable only to joints specified for boundless rotation. Use this command if a joint keeps on rotating in the same direction so that any of the following happens: - The current position value becomes too large to handle.
Chapter 12 Robot Control Statements 12.2 Figure Control CURFIG (System variable) Function Obtains the current value of the robot figure. Format CURFIG Explanation The current robot figure is stored with integers. The relation between the integer value and the figure is listed in the following table.
22 DOUBLE4 SINGLE6 NONFLIP BELOW RIGHTY 23 DOUBLE4 SINGLE6 NONFLIP BELOW LEFTY 24 DOUBLE4 DOUBLE6 FLIP ABOVE RIGHTY 25 DOUBLE4 DOUBLE6 FLIP ABOVE LEFTY 26 DOUBLE4 DOUBLE6 FLIP BELOW RIGHTY 27 DOUBLE4 DOUBLE6 FLIP BELOW LEFTY 28 DOUBLE4 DOUBLE6 NONFLIP ABOVE RIGHTY 29 DOUBLE4 DOUBLE6 NONFLIP ABOVE LEFTY 30 DOUBLE4 DOUBLE6 NONFLIP BELOW RIGHTY 31 DOUBLE4 DOUBLE6 NONFLIP BELOW LEFTY Related Terms LETF, Robot figure (Appendix 2) Example DIM li1 As Integer li1 = CUR
Chapter 12 Robot Control Statements FIGAPRL (Function) Function Calculates figures at an approach position and a standard position available to move in CP motion. Format FIGAPRL (, ) Explanation For , you can use only a position type.
Related Terms FIGAPRP, APPROACH Example 6-/4-axis 6-axis 4-axis I1=FIGAPRL(P1, 100.0) LETF P1, I1 APPROACH P, P1, 100.0 MOVE L, P1 I1=FIGAPRL(P1 + (100.200, 0, 0, 10, 0), 100) LETF P1, I1 APPROACH P, P1, 100.0 MOVE L, P1 I1=FIGAPRL(P1 + (100.200, 0, 0), 100) LETF P1, I1 APPROACH P, P1, 100.0 MOVE L, P1 Notes (1) Use FIGAPRL if the movement action after the approach is the CP motion. If it is PTP motion, use FIGAPRP.
Chapter 12 Robot Control Statements FIGAPRP (Function) Function Calculates an approach position where the PTP motion is available, and a reference position figure. Format FIGAPRP (, ) Explanation For , you can use only a position type.
12.3 Stop Control HOLD (Statement) [Conforms to SLIM] Function Holds program processing for a time. Format HOLD Explanation This statement holds program processing and outputs the contents designated in to the pendant. For contents of , refer to the RINTMSG statement. If you restart the system, it executes the suspended program from the next statement after the HOLD statement. The number of characters for a message is 60 letters (One-byte character).
Chapter 12 Robot Control Statements HALT (Statement) [Conforms to SLIM] Function Stops executing a program. Format HALT Explanation This statement stops program execution and outputs the contents designated by to the pendant. For contents of , refer to the PRINTMSG statement. If you restart the system, the system starts the program from the first line. The maximum number of letters available for a message is 60.
INTERRUPT ON/OFF (Statement) Function Interrupts a robot motion. Format INTERRUPT {ON|OFF} Explanation INTERRUPT ON and INTERRUPT OFF are used as a pair. In program lines sandwiched by the pair, if an interrupt skip signal turns ON during execution of motion commands, then the robot controller will interrupt execution of the current motion command and proceeds to the next program step. To execute the INTERRUPT command, the task must have gotten an arm group semaphore.
Chapter 12 Robot Control Statements Notes (1) If the controller executes any relative motion command immediately following an interrupt skip, then the subsequent relative motion will start from the position where the robot stops. In program lines sandwiched by the INTERRUPT pair, therefore, use an absolute motion command. (2) The system does not perform a pass motion during INTERRUPT ON. If the system finds the pass motion designated, all of then are executed in the end motion.
12.4 Speed Control SPEED (Statement) [Conforms to SLIM] Function Specifies the internal composite speed of joints included in a currently held arm group. Format SPEED Explanation The should be the target ratio (%) of the maximum internal composite speed of joints in a currently held arm group. The entry range is from 0.1 to 100 of a real number. NOTE: If less than 0.1 is specified, no error will occur, but the actual speed may differ from the specification.
Chapter 12 Robot Control Statements Example Ex1 DIM li1 As Integer SPEED 100 'Sets the movement speed of the hand to 100. SPEED li1/100 'Sets the movement speed of the hand to a value of (li1/100). Ex2(extended-joint) PROGRAM PRO1 TAKEARM 1 'Get Arm Group 1 (including 7th and 8th joints). SPEED 100 'Specify composite speed of joints (7th and 8th) 'involved in Arm Group 1.
JSPEED (Statement) Function Specifies the internal speed of individual joints included in a currently held arm group. Format JSPEED Explanation The should be the target ratio (%) of the maximum internal speed of individual joints in a currently held arm group. The entry range is from 0.1 to 100 of a real number. NOTE: If less than 0.1 is specified, no error will occur, but the actual speed may differ from the specification.
Chapter 12 Robot Control Statements ACCEL (Statement) [Conforms to SLIM] Function Designates internal acceleration and internal deceleration. Format ACCEL [,] Explanation The or should be the target ratio (%) of the maximum internal composite acceleration or deceleration of joints in a currently held arm group, respectively. The entry range is from 0.0001 to 100 of a real number. NOTE: If less than 0.
JACCEL (Statement) [Conforms to SLIM] Function Specifies the internal acceleration and deceleration of individual joints included in a currently held arm group. Format JACCEL [,] Explanation This statement designates the maximum internal axis acceleration/deceleration rates (%) to / in a range from 0.0001 to 100. NOTE: If less than 0.
Chapter 12 Robot Control Statements DECEL (Statement) [Conforms to SLIM] Function Specifies the internal composite deceleration of joints involved in a currently held arm group. Format DECEL Explanation The should be the target ratio (%) of the maximum internal composite deceleration of joints in a currently held arm group. The entry range is from 0.0001 to 100 of a real number. NOTE: If less than 0.
JDECEL (Statement) [Conforms to SLIM] Function Specifies the internal deceleration ratio of individual joints included in a currently held arm group. Format JDECEL Explanation The should be the target ratio (%) of the maximum internal deceleration of individual joints in a currently held arm group. The entry range is from 0.0001 to 100 of a real number. NOTE: If less than 0.
Chapter 12 Robot Control Statements CURACC (System Variable) Function Gets the current internal composite acceleration of joints included in a currently held arm group. Format CURACC Explanation Executing this command in a task holding no arm group will return a value of 100. Related Terms ACCEL, DECEL, CURDEC, CURJACC, CURJDEC, CURJSPD, CURSPD Example Ex1 DIM lf1 As Single lf1 = CURACC ACCEL CURACC * 0.5 'Assigns the current acceleration value to lf1.
CURJACC (System Variable) Function Gets the current internal acceleration of individual joints included in a currently held arm group. Format CURJACC Explanation Executing this command in a task holding no arm group will return a value of 100. Related Terms JACCEL, JDECEL, JSPEED, SPEED, CURDEC, CURJDEC, CURJSPD, CURSPD Example Ex1 DIM lf1 As Single lf1 = CURJACC JACCEL CURJACC * 0.5 'Assigns the current axis acceleration value to lf1. 'Sets the axis acceleration to 50% of the current speed.
Chapter 12 Robot Control Statements CURDEC (System Variable) Function Gets the current internal composite deceleration of joints included in a currently held arm group. Format CURDEC Explanation Executing this command in a task holding no arm group will return a value of 100. Related Terms ACCEL, DECEL, CURACC, CURJACC, CURJDEC, CURJSPD, CURSPD Example Ex1 DIM lf1 As Single lf1 = CURDEC DECEL CURDEC * 0.5 'Assigns the current deceleration value to lf1.
CURJDEC (System Variable) Function Gets the current internal deceleration of individual joints included in a currently held arm group. Format CURJDEC Explanation Executing this command in a task holding no arm group will return a value of 100. Related Terms JACCEL, JDECEL, JSPEED, SPEED, CURACC, CURDEC, CURJACC, CURJSPD, CURSPD Example Ex1 DIM lf1 As Single lf1 = CURDEC DECEL CURDEC * 0.5 'Assigns the current deceleration value to lf1. 'Sets the deceleration to 50% of the current value.
Chapter 12 Robot Control Statements CURJSPD (System Variable) Function Gets the current internal speed of individual joints included in a currently held arm group. Format CURJSPD Explanation Executing this command in a task holding no arm group will return a value of 100. Related Terms JSPEED, CURACC, CURDEC, CURJACC, CURJDEC, CURSPD Example Ex1 DIM lf1 As Single lf1 = CURJSPD JSPEED CURJSPD * 0.5 'Assigns the current axis movement speed value to lf1.
CURSPD (System Variable) Function Gets the current internal composite speed of joints included in a currently held arm group. Format CURSPD Explanation Executing this command in a task holding no arm group will return a value of 100. Related Terms CURACC, CURDEC, CURJSPD, CURJACC, CURJDEC Example Ex1 Ex2 12-56 DIM lf1 As Single lf1 = CURJSPD JSPEED CURJSPD * 0.5 'Assigns the current axis movement speed. 'Sets the axis movement speed to 50% of the current value.
Chapter 12 Robot Control Statements CUREXTACC (System Variable) [Ver.1.4 or later] Function Obtains the current value of the external acceleration Format CUREXTACC Explanation Stores the external acceleration currently set Related Terms ACCEL, DECEL, CUREXTDEC Example DIM lf1 As Single lf1 = CUREXTACC ACCEL CUREXTACC * 0.
CUREXTDEC (System Variable) [Ver.1.4 or later] Function Obtains the current value of the external deceleration Format CUREXTDEC Explanation Stores the external deceleration currently set Related Terms ACCEL, DECEL, CUREXTACC Example DIM lf1 As Single lf1 = CUREXTDEC DECEL CUREXTDEC * 0.
Chapter 12 Robot Control Statements CUREXTSPD (System Variable) [Ver.1.4 or later] Function Obtains the current value of the external speed Format CUREXTSPD Explanation Stores the external speed currently set Related Terms SPEED Example DIM lf1 As Single lf1 = CUREXTSPD SPEED CUREXTSPD * 0.
12.5 Time Control DELAY (Statement) [Conforms to SLIM] Function Suspends program processing for a designated period time. Format DELAY Explanation The program processing stops until the time designated by elapses. is expressed in ms, however, the actual delay time changes in increments of 1/60. If multiple tasks are processed at the same time, the delay time may possibly be longer than the designated value.
Chapter 12 Robot Control Statements WAIT (Statement) [Conforms to SLIM] Function Stops program processing based on a condition. Format WAIT [, [,]] Explanation This statement stops program processing until is satisfied. If is set, control stops the execution of a WAIT statement after the designated time elapses and proceeds to the next command. Infinite stoppage can be avoided by using this.
12.6 Coordinate Transformation CHANGETOOL (Statement) Function Changes the tool coordinate system. Format CHANGETOOL Explanation This statement changes the tool coordinate system to the coordinate system designated by . This declaration is valid until the next CHANGETOOL statement is executed. Numbers from 0 to 63 are valid for . Tool 0 is a mechanical interface coordinate system.
Chapter 12 Robot Control Statements CHANGEWORK (Statement) Function Changes the user coordinate system. Format CHANGEWORK Explanation This statement changes the user coordinate system to the coordinate system designated by . This declaration is valid until the next CHANGEWORK statement is executed. Numbers from 0 to 7 are valid for . User 0 signifies the base coordinate system.
CURTOOL (System Variable) [Ver.1.4 or later] Function Obtains the TOOL number currently set. Format CURTOOL Explanation Stores the TOOL number currently set.
Chapter 12 Robot Control Statements CURWORK (System Variable) [Ver.1.4 or later] Function Obtains the WORK number currently set. Format CURWORK Explanation Stores the WORK number currently set.
12.7 Interference Check SETAREA (Statement) Function Selects the area where an interference check is performed. Format SETAREA Explanation selects the interference check area previously defined. The valid area numbers are from 0 to 7. This must be declared beforehand using the AREA command. An interference check is performed during the time after the SETAREA command is executed and prior to the execution of the RESETAREA command.
Chapter 12 Robot Control Statements RESETAREA (Statement) Function Initializes an interference check. Format RESETAREA Explanation This statement resets the I/O set when interference was detected and makes an interference check invalid. When the input/output control statement directly resets an I/O even if interference occurs again, the I/O will not be set. To check interference again, execute the RESETAREA command to initialize, and then execute the SETAREA command again.
12.8 Supervisor Task INIT [Ver.1.7 or later] Function Turns on motors, carrier out CAL, and sets the speed according to the preset supervisor task parameters. Format INIT Explanation (1) If the supervisor task is disabled ("Not Use Supervisor TASK" parameter is selected), then the INIT command causes no operation.
Chapter 12 Robot Control Statements 12.9 Internal Servo Data GetSrvData (System Variable) [Ver.1.5 or later] Function Gets the internal servo data of robot joints. Format = GetSrvData() Explanation GetSrvData gets the internal servo data specified by into . is a joint type data of robot.
GetJntData (System Variable) [Ver.1.5 or later] Function Gets the internal servo data of a specified joint. Format = GetJntData(,) Explanation GetJntData gets the internal servo data (specified by ) of a joint specified by into . .is a floating point type data of the specified joint.
Chapter 12 Robot Control Statements 12.10 Particular Control This section describes newly added commands (statements) that have been used as servo-related PAC libraries. Using these commands will improve the efficiency of program development. ST_aspACLD (Statement) [Ver.1.9 or later] Function Changes the internal load condition values. There are the mass of payload, noted in grams (g), and the payload center of gravity, noted in millimeters (mm), for the load condition values. Designate both of them.
Notes (1) For the mass of payload, designate it with a numerical value of the specified range for each robot type. If you designate a value out of this range, the error message "60d2 Mass of payload out of setting range" will be displayed. (2) For the payload center of gravity, enter it so that it satisfies the specified range for each robot type. If it is out of this range, the error message "60d2 Mass of payload out of setting range" will be displayed.
Chapter 12 Robot Control Statements ST_SetGravity (Statement) [Ver.1.9 or later] Function Compensates for the static load (gravity torque) applied to each joint and attains balance with gravity torque. Format ST_SetGravity Explanation Each joint of the robot undergoes downward static load (gravity torque) due to earth gravity. The effects of the gravity torque will vary depending upon the mass of payload (tool and workpiece), the payload center of gravity, and robot figures.
ST_ResetGravity (Statement) [Ver.1.9 or later] Function Disables the balance setting between the limited motor torque and gravity torque, which is made with ST_SetGravity. Format ST_ResetGravity Explanation This command disables the balance setting between the motor torque limited by the current limit function and gravity torque. Related Terms ST_ResetCurLmt, ST_SetEralw Notes (1) Execute this command in a TAKEARMed task that has obtained arm semaphore.
Chapter 12 Robot Control Statements ST_SetGrvOffset (Statement) [Ver.1.9 or later] Function Compensates the torque of each joint programmed with ST_SetGravity for gravity torque. Format ST_SetGrvOffset Explanation Each joint of the robot undergoes downward static load (gravity torque) due to earth gravity.
ST_ResetGrvOffset (Statement) [Ver.1.9 or later] Function Disables the gravity offset function. Format ST_ResetGrvOffset Explanation Disables the gravity offset function which has been enabled with ST_SetGrvOffset. Related Terms ST_SetGrvOffset Notes (1) Execute this command in a TAKEARMed task that has obtained arm semaphore. If this command is executed without arm semaphore obtained, Error 21F7 "Arm semaphore cannot be fetched." will result.
Chapter 12 Robot Control Statements ST_SetCurLmt (Statement) [Ver.1.9 or later] Function Sets the limit of motor current to be applied to the specified axis. Format ST_SetCurLmt , Explanation Limits the value of motor current (torque) to be applied to the axis specified by to the value specified by . This command is useful when you want to limit torque that a workpiece will undergo during insertion or butting jobs.
6-axis (7) Set the mass of payload and the payload center of gravity accurately. Otherwise, the robot may move down due to gravity if you set a low current limit value (e.g., less than 30). For the entry procedure of the mass of payload and the payload center of gravity, refer to the Programmer's Manual, " 4.7 Control Set of Motion Optimization in User Preferences." 6-axis (8) If the current limit reset value is set to "1," the robot might move down due to gravity the moment you turn on the motor power.
Chapter 12 Robot Control Statements ST_ResetCurLmt (Statement) [Ver.1.9 or later] Function Resets the motor current limit of the specified axis. Format ST_ResetCurLmt Explanation ResetCurLmt releases the drive current limit set for the motor of a joint specified by . The motor drive current limit and positioning error allowances will revert to the defaults. [For Ver. 1.
ST_SetEralw (Statement) [Ver.1.9 or later] Function Modifies the allowable deviation of the specified axis. Format ST_SetEralw , Explanation Sets the allowable deviation of the axis specified by . Use this command if angle deviation occurs due to external force when the current limit function is enabled. The is the arm joint angle and specified in degrees.
Chapter 12 Robot Control Statements ST_ResetEralw (Statement) [Ver.1.9 or later] Function Resets the allowable deviation value of the specified axis to the initial value. Format ResetEralw Explanation Resets the allowable deviation value of the axis specified by to the default value. If is specified to "0," the allowable deviation values of all the axes will be reset. [For Ver. 1.
ST_OnSrvLock (Statement) [Ver.1.9 or later] Function Servo-locks a specified axis (exclusively designed for four-axis robots). Format ST_OnSrvLock Explanation Provides a function similar to that of the ON SVLOCK instruction in the conventional language. Servo lock means that robot arms are controlled and their positions are held. Related Term ST_OffSrvLock Notes (1) Set servo lock as the robot stops. If it is set during path operation, an error may occur.
Chapter 12 Robot Control Statements ST_OffSrvLock (Statement) [Ver.1.9 or later] Function Releases servo lock for the specified axis. (Exclusively designed for four-axis robots) Format ST_OffSrvLock Explanation Provides a function similar to the OFF SVLOCK instruction in the conventional language. Servo lock refers to the state where the robot arm is controlled to keep its position.
ST_SetCompControl (Statement) [Ver.1.9 or later] Function Enables the compliance function (exclusively designed for 6-axis robots) Format ST_SetCompControl Explanation Enables the compliance function. Enables the compliance conditions set by ST_SetFrcLimit, ST_SetCompRate, and ST_SetFrcCoord.
Chapter 12 Robot Control Statements Example ST_SetFrcCoord 1 'Set the compliance control coordinate system.
ST_SetCompFControl (Statement) [Ver.1.9 or later] Function Enables the compliance control function (exclusively designed for 6-axis robots). Format ST_SetCompFControl Explanation Enables the compliance control function, just like the ST_SetCompControl. Note that this command will not execute the gravity offset compensation.
Chapter 12 Robot Control Statements ST_ResetCompControl (Statement) [Ver.1.9 or later] Function Disables the compliance control function (exclusively designed for 6-axis robots). Format ST_ResetCompControl Explanation Disables the compliance control function. Related Terms ST_SetCompControl Notes (1) Execute this command in a TAKEARMed task that has obtained arm semaphore. If this command is executed without arm semaphore obtained, Error "21F7 Cannot take arm semaphore" will result.
ST_SetFrcCoord (Statement) [Ver.1.9 or later] Function Selects a force limiting coordinate system (exclusively designed for 6-axis robots). Format ST_SetFrcCoord Explanation Selects a coordinate system for force limiting values specified by ST_SetFrcLimit and ST_SetCompRate. You can use a set value 0 for the base coordinate system, a set value 1 for the tool coordinate system, and a set value 2 for the work coordinate system of your robot.
Chapter 12 Robot Control Statements ST_SetFrcLimit (Statement) [Ver.1.9 or later] Function Sets the force limiting rates (exclusively designed for 6-axis robots). Format ST_SetFrcLimit , , , , , Explanation Sets the force limiting rates along and about X, Y, and Z axes of a coordinate system specified by ST_SetFrcCoord. Setting ranges from 0 to 100.
ST_ResetFrcLimit (Statement) [Ver.1.9 or later] Function Initializes the force limiting rates (exclusively designed for 6-axis robots). Format ST_ResetFrcLimit Explanation Initializes the force limiting rates. All rates along and about X, Y, and Z axes are set to 100%. Related Terms ST_SetFrcLimit Notes (1) Execute this command in a TAKEARMed task that has obtained arm semaphore. If this command is executed without arm semaphore obtained, Error "21F7 Cannot take arm semaphore" will result.
Chapter 12 Robot Control Statements ST_SetCompRate (Statement) [Ver.1.9 or later] Function Sets the compliance rates under the compliance control (exclusively designed for 6axis robots). Format ST_SetCompRate , , , , , Explanation Sets the compliance rates along and about X, Y, and Z axes of a coordinate system specified by SetFrcCoord.
ST_ResetCompRate (Statement) [Ver.1.9 or later] Function Initializes the compliance rates (exclusively designed for 6-axis robots). Format ST_ResetCompRate Explanation Initializes the compliance rates along and about X, Y, and Z axes to 100%. Related Terms ST_SetCompRate Notes (1) Execute this command in a TAKEARMed task that has obtained arm semaphore. If this command is executed without arm semaphore obtained, Error "21F7 Cannot take arm semaphore" will result.
Chapter 12 Robot Control Statements ST_SetFrcAssist (Statement) [Ver.1.9 or later] Function Sets the force assistance under the compliance control (special compliance control function statement) (exclusively designed for 6-axis robots).
ST_ResetFrcAssist (Statement) [Ver.1.9 or later] Function Initializes the force assistance (special compliance control function statement) (exclusively designed for 6-axis robots). Format ST_ResetFrcAssisit Explanation Initializes the force assistance along and the moment assistance about X, Y, and Zaxes of a coordinate system specified by ST_SetFrcCoord are set to 100%. Related Terms ST_SetFrcAssist Notes (1) Execute this command in a TAKEARMed task that has obtained arm semaphore.
Chapter 12 Robot Control Statements ST_SetCompJLimit (Statement) [Ver. 1.9 or later] Function Sets the current limit under the compliance control (special compliance control function statement) (exclusively designed for 6-axis robots). Format ST_SetCompJLimit , , , , , Explanation Sets the current limit under the compliance control. The rated current of a motor corresponds to 100.
ST_ResetCompJLimit (Statement) [Ver.1.9 or later] Function Initializes the current limit under the compliance control (special compliance control function statement) (exclusively designed for 6-axis robots). Format ST_ResetCompJLimit Explanation Initializes the current limit under the compliance control and set 0 to all axes. Related Terms ST_SetCompJLimit, ST_SetCompControl Notes (1) Execute this command in a TAKEARMed task that has obtained arm semaphore.
Chapter 12 Robot Control Statements ST_SetCompVMode (Statement) [Version 1.9 or later] Function Sets the velocity control mode under the compliance control (special compliance control function statement) (exclusively designed for 6-axis robots). Format ST_SetCompVMode Explanation Enables the compliance velocity control mode when ST_SetCompControl is executed. Related Terms ST_ResetCompVMode Notes (1) Execute this command in a TAKEARMed task that has obtained arm semaphore.
ST_ResetCompVMode (Statement) [Ver.1.9 or later] Function Disables the velocity control mode under the compliance control (special compliance control function statement) (exclusively designed for 6-axis robots). Syntax ST_ResetCompVMode Explanation Disables the compliance velocity control mode when ST_SetCompControl is executed. Related Terms ST_SetCompControl Notes (1) Execute this command in a TAKEARMed task that has obtained arm semaphore.
Chapter 12 Robot Control Statements ST_SetCompEralw (Statement) [Ver.1.9 or later] Function Sets the allowable deviation values of the position and the posture of the tool tip under the compliance control (exclusively designed for 6-axis robots).
ST_ResetCompEralw (Statement) [Ver.1.9 or later] Function Initializes the allowable deviation values of the position and the posture of the tool end under the compliance control (exclusively designed for 6-axis robots). Format ST_ResetCompEralw Explanation Initializes the allowable deviation values of the position and the posture of the tool tip under the compliance control. The initial values of allowable deviation are 100 (mm) along X, Y, and Z and 30 (degree) about X, Y, and Z.
Chapter 12 Robot Control Statements ST_SetDampRate (Statement) [Ver.1.9 or later] Function Sets the damping rates under the compliance control (exclusively designed for 6-axis robots). Fomat ST_SetDampRate , , , , , Explanation Sets the damping rates along and about X, Y, and Z axes on the coordinate system specified by ST_SetFrcCoord. The entry range is from 0 to 100.
ST_ResetDampRate (Statement) [Ver.1.9 or later] Function Initializes the damping rates under the compliance control (exclusively designed for 6-axis robots). Format ST_ResetDampRate Explanation Initializes all damping rates along and about X, Y, and Z axes to 100. Related Terms ST_SetDampRate Notes (1) Execute this command in a TAKEARMed task that has obtained arm semaphore. If this command is executed without arm semaphore obtained, Error "21F7 Cannot take arm semaphore " will result.
Chapter 12 Robot Control Statements ST_SetZBalance (Statement) [Ver.1.9 or later] Function Sets the gravity compensation value of the Z and T axes (exclusively designed for 4axis robots). Format ST_SetZBalance Explanation Having no air balance mechanism, the Z and T axes of a 4-axis robot undergo a downward static load (gravity torque). If you set the current limit value less than the gravity torque in the current limit function, then the Z axis will move down and the T axis will rotate.
ST_ResetZBalance (Statement) [Ver.1.9 or later] Function Disables the gravity compensation function (exclusively designed for 4-axis robots). Format ST_ResetZBalance Explanation Disables the gravity compensation function set by the ST_SetZBalance for Z and T axes of 4-axis robots. Related Terms ST_SetZBalance Notes (1) Execute this command in a TAKEARMed task that has obtained arm semaphore. If this command is executed without arm semaphore obtained, Error "21F7 Cannot take arm semaphore" will result.
Chapter 13 Input/Output Control Statements This chapter provides an explanation of the commands used to control various I/Os.
Chapter 13 Input/Output Control Statements 13.1 I/O Port IN (Statement)[Conforms to SLIM] Function Reads data from the I/O port designated by an I/O variable. Format IN = Explanation This statement assigns the I/O port data designated by to the variable designated by . The is declared using a DEFIO statement or an I/O type variable.
OUT (Statement) [Conforms to SLIM] Function Outputs data to the I/O port designated by an I/O variable. Format OUT =
Chapter 13 Input/Output Control Statements IOBLOCK ON/OFF (Statement) [Conforms to SLIM] Function Concurrently executes a non-motion instruction such as an I/O or calculation instruction during execution of a motion instruction. Format IOBLOCK {ON|OFF} Explanation Use IOBLOCK ON and IOBLOCK OFF as a pair. Non-motion instructions such as plural I/O instructions or calculation instructions that follow a motion instruction, can be executed concurrently during execution of a robot motion instruction.
Notes (1) Concurrent processing is not executed in the following cases. i) If a motion option is added to a motion instruction ii) If you execute CHANGEWORK, CHANGETOOL, SPEED, JSPEED, ACCEL, or JACCEL. iii) If you execute the conventional language library of [aspChange], [aspACLD], arm motion library [mvSetPulseWidth], [mvSetTimeOut], [mvReverseFlip], [mvResetPulsetWidth], or [mvResetTimeOut].
Chapter 13 Input/Output Control Statements SET (Statement) [Conforms to SLIM] Function Sets an I/O port to ON. Format SET [,] Explanation This statement sets the designated port in to ON. If is designated a pulse is output. (The output time unit is ms.) If is designated the system does not proceed to the next instruction until this time elapses.
Notes (1) If output time is designated, it may be extended due to factors such as the presence of another program during movement, pendant operation, or communication with external devices. (2) When output time is designated, it may possibly shift by ±16.7ms since the standard clock for controller processing is 16.7 ms. (3) Note the following two points when using the time designation SET.
Chapter 13 Input/Output Control Statements RESET (Statement) [Conforms to SLIM] Function Sets an I/O port to OFF. Format RESET Explanation Sets the port designated by to OFF. Related Terms SET, DEFIO Example TAKEARM IOBLOK ON 'Obtains the robot control priority. 'Executes an I/O instruction concurrently with the next 'instruction. MOVE P, (902.7,0,415.3,180,50,180,1) 'Moves to the coordinates (902.7,0,415.
13.2 Command for RS232C and Ethernet (Server/Client) Port INPUT (Statement)[Conforms to SLIM] Function Obtains data from the RS232C or Ethernet port. Format INPUT [#,][,…] Explanation This statement stores data received via the RS232C or Ethernet port into the variable designated by . Designate a circuit number to use for . If is ignored the default value of ch2 is set.
Chapter 13 Input/Output Control Statements LINEINPUT (Statement) Function Reads data to a delimiter through the RS232C or Ethernet port and assigns it to a character string type variable. Format LINEINPUT [#,] Explanation All characters, from the data received via the RS232C or Ethernet port to a delimiter (CR or CR + LF), are stored into the variable designated by . Delimiter is not stored into any variable.
PRINT (Statement)[Conforms to SLIM] Function Outputs data from the RS232C or Ethernet port. Format PRINT [#] number>,] [ …] Explanation This statement outputs the value of from the RS232C or Ethernet port to an external device. For , designate the circuit number of the RS232C or Ethernet port to be used. If is ignored, the default value of ch2 is set. Ch1 cannot be designated since it is used for the pendant.
Chapter 13 Input/Output Control Statements WRITE (Statement) Function Outputs data from the RS232C or Ethernet port. Format WRITE [#,][,…] Explanation This statement outputs the value of from the RS232C or Ethernet port to an external device. For , designate the circuit number of the RS232C or Ethernet port to be used. If is ignored, the default value of ch2 is set. Ch1 cannot be designated since it is used for the pendant.
FLUSH (Statement) Function Clears the input buffer. Format FLUSH [#] Explanation This statement clears the input buffer of the RS232C or Ethernet port. Designate a circuit number to clear the input buffer for . If is ignored, the default value of ch2 is set. Ch1 cannot be designated since it is used for the pendant. (Refer to Section 2.4.1, “Circuit Number.”) Execute a FLUSH command to clear the data remaining in the input buffer prior to receiving data.
Chapter 13 Input/Output Control Statements 13.3 Serial Binary Transmission Commands (RS232C and Ethernet ports) printb (Version 1.5 or later) Function Outputs a single byte of data to the RS-232C or Ethernet port.
inputb (Version 1.5 or later) Function Inputs a single byte of data from the RS-232C or Ethernet port. Format inputb #, Input port number (1: Controller RS-232C port, -1: µVision RS-232C port, 4 to 7: Ethernet server ports, 8 to 15: Ethernet client ports) Integer variable number where input data is to be stored Explanation This command stores a single byte of data inputted from the specified port, into .
Chapter 13 Input/Output Control Statements lprintb (Version 1.5 or later) Function Outputs multiple bytes of data to the RS-232C or Ethernet port.
linputb (Version 1.5 or later) Function Inputs multiple bytes of data from the RS-232C or Ethernet port.
Chapter 13 Input/Output Control Statements com_encom (Version 1.5 or later) Function Enables the RS-232C port only for binary transmission. (Occupies the COM port.) If the Ethernet client port has been occupied, this command enables it to establish Ethernet connection. Format com_encom # Explanation This command discriminates binary data from ASCII data in binary transmission between the PC and robot controller e.g., in WINCAPSII.
com_discom (Version 1.5 or later) Function Releases the RS-232C port from binary transmission. (Releases the COM port.) If the Ethernet client port has been used, this command disables the Ethernet client port to disconnect the Ethernet connection. Format com_discom # Explanation This command disables com_encom command to release the RS-232C dedicated to binary transmission for other uses.
Chapter 13 Input/Output Control Statements com_state (Version 1.5 or later) Function Gets the status of RS-232C or Ethernet port. Format com_state #, Explanation This command gets bytes of data remaining in the transmission buffer, into the integer variable specified by . Note that -1 will be returned if a transmission port error occurs. At the time of Ethernet use, -1 will be also returned if network connection of the port is not established.
13.4 Pendant PRINTMSG (Statement) Function Displays a message with a caption and icon on the color LCD of the teach pendant. Format PRINTMSG ,, Explanation The system displays the message designated by each argument with a caption and icon on the color LCD of the teach pendant. Icon type Icon 0 1 2 3 4 A maximum of 60 characters can be used for a message character string and a maximum of 40 characters for a caption character string.
Chapter 13 Input/Output Control Statements PRINTDBG (Statement) Function Outputs data to the debug window. Format PRINTDBG […][] Explanation This statement outputs the value of in the debug window of the pendant. For a comma (,) or semicolon (;) can be used. In the case of a comma (,) a blank character should be inserted between the comma and the that follows.
BUZZER (Statement) Function Sounds a buzzer. Format BUZZER Explanation This statement sounds the buzzer on the pendant for the time designated in . The unit of is msec. Related Terms Example BUZZER 3000 13-22 'The buzzer sounds for 3 seconds.
Chapter 13 Input/Output Control Statements PRINTLBL (Statement) Function Sets a label (caption) for a user definition button. Format PRINTLBL ,
13.5 Customizing TP Operation Screens Main software version 1.5 or later allows you to easily customize your own operation screens on the teach pendant for facilitating control of the robot by the robot controller in stand-alone mode. In PAC language, you may program your own control buttons in size, position, and color and paste them onto the Teach Pendant screen.
Chapter 13 Input/Output Control Statements 13.5.1 Programming a TP operation screen Program a TP operation screen as follows: (1) Setting button parameters Use set_button command to specify button parameters for a button. (Example) Create a button numbered 1 with background (7) set to black (0) set_button 1,7,0 (2) Setting page parameters Use set_page command to specify page parameters for a page.
(6) Displaying a programmed TP operation screen From the top screen of the teach pendant, choose [F9: Panel] to display a TP operation screen you have programmed.
Chapter 13 Input/Output Control Statements set_button (Version 1.5 or later) Function Sets button parameters. Format set_button ,, Number indicating the button location in all button arrangement on a TP operation panel. Button attributes including color, position and others. (See the table below.) Parameter value for making new settings (See the table below.
Explanation 8 Text color 0: 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: Black Blue Green Cyan Red Magenta Brown Light gray Gray Light blue Light green Light cyan Light red Light magenta Yellow White 9 Usable state 0: 1: Disable Enable 10 Visible/invisible state 0: 1: Invisible Visible 11 Variable type (Note 2) 1: Integer 2: Floating point 3: Double-precision floating point 4: Character string (up to 32 characters) 12 Variable number Variable number that
Chapter 13 Input/Output Control Statements Explanation set_button changes the current value of a parameter specified by to to modify the specifications of a button specified by .
set_page (Version 1.5 or later) Function Sets page parameters. Format set_page ,, Number indicating a page out of all pages arranged on a TP operation panel. Page attributes including color, position and others. (See the table below.) Parameter value for making new settings (See the table below.) 13-30 Explanation 1 Page type 0 (Fixed) 2 Button status Not used.
Chapter 13 Input/Output Control Statements Explanation set_page changes the current value of a parameter specified by to to modify the specifications of a page specified by . Example '!TITLE "" PROGRAM sample2 . . . set_page panel_no, P_BGCOLOR,GRAY set_page panel_no, P_USESTATE,ON set_page panel_no, P_VISSTATE,ON 'Set background color of the 'page. 'Enable page. 'Make page visible. . . .
change_bCap (Version 1.5 or later) Function Edits a caption for a specified button. Format change_bCap , Number indicating the button location in all button arrangement on a TP operation panel. Character string to be displayed on the center of a button. Button caption example Explanation change_bCap displays a character string specified by on the center of a button specified by . Example '!TITLE "" PROGRAM sample3 . . .
Chapter 13 Input/Output Control Statements change_pCap (Version 1.5 or later) Function Edits a caption for a specified page. Format change_pCap , Number indicating a page out of all pages arranged on a TP operation panel. Character string to be displayed in the title bar of a page. Page caption example Explanation change_pCap displays a character string specified by in the title bar of a page specified by .
disp_page (Version 1.5 or later) Function Displays a specified page of a TP operation screen. Format disp_page Number indicating a page out of all pages arranged on a TP operation panel. Explanation disp_page displays the page specified by on the TP operation screen. Example '!TITLE "" PROGRAM sample3 . . . 'disp_page panel_no . . . end 13-34 'Display the specified page.
Chapter 13 Input/Output Control Statements Sample Program: Creating a TP Operation Panel Shown below is a sample program for creating a TP operation panel.
'Button #define #define #define status ON 1 OFF 0 I_VAL 1 'ON 'OFF 'Integer 'Button address #define IO_PB_ADRS 170 'I/O number assigned to the 1st button 'on a TP operation panel.
Chapter 13 Input/Output Control Statements 'Label display select case loopcnt case 0 set_button btn_no,B_KIND,LABEL 'Set button type. set_button btn_no,B_IO_NO,io_adrs 'Set I/O address. set_button btn_no,B_BGCOLOR,GRAY 'Set background color. set_button btn_no,B_FGCOLOR,RED 'Set foreground color. change_bCap btn_no,bcap0 'Set button number. case 1 set_button btn_no,B_KIND,LABEL 'Set button type. set_button btn_no,B_IO_NO,io_adrs 'Set I/O address. set_button btn_no,B_BGCOLOR,GRAY 'Set background color.
'Display in the lower row loopcnt = 0 while loopcnt < 6 'Loop 6 times.
Chapter 13 Input/Output Control Statements case 4 ' set_button btn_no,B_KIND,3DBUTTON_V 'Set set_button btn_no,B_KIND,3DBUTTON_V2 'Set set_button btn_no,B_IO_NO,io_adrs 'Set set_button btn_no,B_BGCOLOR,CYAN 'Set set_button btn_no,B_FGCOLOR,LIGHTMAGENTA var_index = loopcnt set_button btn_no,B_VALUE_NO,var_index change_bCap btn_no,bcap7 button type. button type. I/O address. background color. 'Set foreground color case 5 ' set_button btn_no,B_KIND,3DBUTTON_V 'Set button type.
TP Operation Panel Sample: Result of the above sample program 13-40
Chapter 14 Multitasking Control Statements Multitasking control is one of the features of PAC. This chapter provides explanations of the commands used for multitasking control.
Chapter 14 Multitasking Control Statements 14.1 Task Control RUN (Statement) Function Concurrently runs another program. Format RUN [([,…])][,] Explanation This statement allows the currently executed program to run a program designated in . However, the current program cannot run the program itself. Only values are usable for . Even if you specify reference pass, the reference data will automatically be changed to values.
Notes (1) When a task for which motion is being suspended is run again with a SUSPEND instruction, execute RUN after the motion completely stops. If RUN is executed and the robot is moved again before the motion stop finishes, an error such as a command speed limit over error may occur. (2) If a CYCLE option is used, note that cycle synchronization elapses even during suspension after an instantaneous stop of the robot during instruction execution followed by a restart of the robot.
Chapter 14 Multitasking Control Statements SUSPEND (Statement) Function Suspends a task. Format SUSPEND Explanation This statement suspends the processing of a designated task. However, it cannot suspend a program that contains the statement. To suspend a statement-containing program, use a HOLD instruction. Related Terms KILL, HOLD Example SUSPEND samp1 'Suspends task execution of samp1.
DEFEND (Statement) Function Defends a task. Format DEFEND {ON|OFF} Explanation A program task usually releases execution priority to another program task with equal or higher priority at fixed intervals. Use a DEFEND command when a program is processed without releasing execution priority to another task. After DEFEND ON is executed the execution priority is kept until DEFEND OFF is executed.
Chapter 14 Multitasking Control Statements STATUS (Function) Function Obtains the program status. Format STATUS () Explanation This statement stores the program status of the program designated in using an integer.
14.2 Semaphore A semaphore can be used to communicate (connect a signal) among tasks when multiple tasks are synchronized (synchronized control) or when multiple tasks are not permitted to operate at the same time (exclusive control). To use a semaphore, create a semaphore with a CREATESEM command to obtain a semaphore ID. Then a specific semaphore can be designated among plural semaphores.
Chapter 14 Multitasking Control Statements CREATESEM (Function) Function Creates a semaphore. Format CREATESEM () Explanation This function creates a semaphore and obtains a semaphore ID. If there is no semaphore ID, other semaphore related commands cannot be used. Therefore, be sure to execute this CREATESEM command prior to using a semaphore. Designate a task queuing (execution waiting) system using an argument.
Example DEFINT Li1 Li2 Li3 = 1 Li1 = CREATESEM(Li3) 'Creates a semaphore with the queuing system designated in Li3 'and the semaphore ID obtained in Li1. Li2 = CREATESEM(Li3) 'Creates a semaphore with the queuing system designated in Li3 'and the semaphore ID obtained in Li2. TAKESEM Li1 'Obtains the semaphore designated in Li1. TALESEM Li2 100 'Obtains the semaphore designated in Li1. However, a timeout 'occurs after 100 ms.
Chapter 14 Multitasking Control Statements PROGRAM PRO1 i1 = CREATESEM(0) RUN PRO2 RUN PRO3 END PROGRAM PRO2 TAKESEM i1 . . . GIVESEM i1 END PROGRAM PRO3 TAKESEM i1 . . . GIVESEM i1 END (3) Countermeasure when an infinite wait occurs. To get out of this status, run a calling program (ipro1 in this example) after stopping the program (pro3 in this example) that is in an infinite wait status. (4) Observe the following for proper use of this statement.
DELETESEM (Statement) Function Deletes a semaphore. Format DELETESEM Explanation This statement deletes a semaphore with the semaphore ID designated in . Related Terms CREATESEM, FLUSHSEM, GIVESEM, TAKESEM Example DEFINT Li1 Li2 Li3 = 1 Li1 = CREATESEM(Li3) 'Creates a semaphore with the queuing system designated in Li3 and Li2 = CREATESEM(Li3) TAKESEM Li1 TALESEM Li2 100 'the semaphore ID obtained in Li1.
Chapter 14 Multitasking Control Statements FLUSHSEM (Statement) Function Releases tasks from waiting for a semaphore. Format FLUSHSEM Explanation This statement permits all tasks that are waiting for the semaphore designated in to resume processing. Related Terms CREATESEM, DELETESEM, GIVESEM, TAKESEM Example DEFINT Li1 Li2 Li3 = 1 Li1 = CREATESEM(Li3) 'Creates a semaphore with the queuing system designated in Li3 'and the semaphore ID obtained in Li1.
GIVESEM (Statement) Function Releases a task from waiting for a semaphore. Format GIVESEM Explanation This statement releases the semaphore designated in . The system permits a restart of a process if there is one task which has the semaphore designated in when it is released.
Chapter 14 Multitasking Control Statements TAKESEM (Statement) Function Obtains a semaphore with a designated semaphore ID. Format TAKESEM [,] Explanation This statement obtains the semaphore designated in . If another task obtains a semaphore, the system waits for the semaphore to be released before the semaphore is obtained. Waiting time can be designated in milliseconds (ms) using the option .
14.3 Arm Semaphore TAKEARM (Statement) Function Gets an arm group. Upon execution of this statement, the programmed speed, acceleration and deceleration will be set to 100. If the gotten arm group includes any robot joint, this statement restores the tool coordinates and work coordinates to the origin.
Chapter 14 Multitasking Control Statements Note 1: Note 2: Note 3: Robot control priority is automatically released in the following cases. • If an END command is executed (Except for an END command at the end of a called program) • If a KILL command is executed • If a HALT command is executed • If a STOP command is executed • If the robot controller is initialized with the teach pendant or I/O. If a TAKEARM command is executed, the system automatically executes the following process.
Related Terms GIVEARM, TAKEVIS, GIVEVIS Example Example 1: PROGRAM PRO1 TAKEARM MOVE P, P1 MOVE P, P2 GIVEARM 1 END Example 2: PROGRAM PRO2 MOVE P, P3 END Example 3: PROGRAM PRO3 TAKEARM MOVE P, P4 CALL SUB1 END PROGRAM SUB1 MOVE P, P5 END Example 4: PROGRAM PRO4 TAKEARM SPEED 50 CHANGEWORK 3 CHANGETOOL 1 MOVE P, P5 CALL PRO5 END PROGRAM PRO5 TAKEARM ' 'Executes TAKEARM on the first line of the program which 'instructs the robot motion.
Chapter 14 Multitasking Control Statements Example 5: PROGRAM PRO6 TAKEARM RUN PRO7 MOVE P, P7 END ' ' ' ' ' PROGRAM PRO7 TAKEARM ' '×: An error occurs when an attempt is made to obtain the robot 'execution priority with PRO7 which is run as another task of 'PRO6, since PRO6 already has robot control priority. ' ' MOVE P, P7 END Example 6:(extended-joints)_ Shown below are program samples for the TAKEARM command when arm groups are arranged as listed below (for 4-axis robots).
Notes (1) One program cannot hold more than one different arm group. However, it can get the same arm group again in one program. Example: TAKEARM 0 MOVE P, P0 TAKEARM 0 TAKEARM 1 'Can get Arm Group 0 again, even if this 'program has got it. 'Error occurs since TAKEARM attempts to 'get Arm Group 1 while Arm Group 0 has been 'held. (2) If TAKEARM with KEEP option being set to "1" gets an arm group, the arm speed will not be initialized and remain as that of the old arm group.
Chapter 14 Multitasking Control Statements GIVEARM (Statement) Function Releases robot control priority. Format GIVEARM Explanation This statement releases the robot control priority. With this, other tasks can obtain a control task. If an attempt is made to execute a GIVEARM command although another task has already obtained robot control priority, an error occurs. Note: Robot control priority is automatically released in the following cases. Therefore, it is possible to ignore a GIVEARM command.
TAKEVIS (Statement) Function Obtains visual process priority. Format TAKEVIS Explanation This statement obtains visual process priority on the µVISION board optionally installed in the robot controller. Without a µVISION board installed, an error will occur if the TAKEVIS command is executed. If another task has already obtained visual process priority and the system cannot obtain it, an error occurs.
Chapter 14 Multitasking Control Statements GIVEVIS (Statement) Function Releases visual process priority. Format GIVEVIS Explanation This statement releases visual process priority on the µVISION board optionally installed in the robot controller. With this, another task can obtain visual process priority. Without a µVISION board installed, an error will occur if the GIVEVIS command is executed.
Chapter 15 Functions This chapter provides an explanation of various functions prepared in PAC.
Chapter 15 Functions 15.1 Arithmetic Function ABS (Function) [Conforms to SLIM] Function Obtains the absolute value of an expression value. Format ABS () Explanation This statement obtains the absolute value of the value designated in . If includes a double precision real numeral, the value obtained becomes double precision. Otherwise, a single precision value is obtained. Explanation: The absolute value is a numeric value of which the sign is removed.
EXP (Function) [Conforms to SLIM] Function Obtains an exponential function with a natural logarithm taken as a base. Format EXP () Explanation If includes a double precision real numeral, the obtained value becomes double precision. Otherwise, a single precision value is obtained. Explanation: Memo: If the value of an argument number exceeds 709.782712893 , an overflow error occurs. The constant “e” is approximately 2.718282.
Chapter 15 Functions INT (Function) [Conforms to SLIM] Function Obtains the maximum integer value possible from a designated value. Format INT () Explanation This statement returns the maximum integer that does not exceed the value of . If the value overflows, the maximum integer value with the same sign as is applied. Example DIM li1 As Integer li1 = INT(123.456) 'Rounds down after the decimal point and assigns the value to 'integer variable li1. '123.
LOG (Function) [Conforms to SLIM] Function Obtains a natural logarithm. Format LOG () Explanation This statement obtains the natural logarithm of the value designated in . Designate a value that is greater than 0 for . If includes a double precision real numeral, the obtained value becomes double precision. Otherwise, a single precision value is obtained. Explanation: The natural logarithm is a logarithm with the constant “e” as the base.
Chapter 15 Functions LOG10 (Function) [Conforms to SLIM] Function Obtains a common logarithm. Format LOG10 () Explanation This statement obtains the common logarithm of the value designated in . The base of the common logarithm is 10. Designate a value larger than 0 for . If includes a double precision real numeral, the obtained value becomes double precision. Otherwise, a single precision value is obtained.
POW (Function) [Conforms to SLIM] Function Obtains an exponent. Format POW (,) Explanation This statement obtains the exponent of the value designated in of . If or includes a double precision real numeral, the obtained value becomes double precision. Otherwise, a single precision value is obtained. Related Terms EXP Example DEFSNG lf1, lf2 DEFINT li1, li2 li1 = POW(5, 2) lf1 = POW(lf2, li2) 'Assigns the 2nd power of 5 to li1.
Chapter 15 Functions MAX (Function) [Conforms to SLIM] Function Extracts the maximum value. Format MAX (,[,…]) Explanation This statement extracts the maximum value from an arbitrary number of ’s. The maximum number of expressions is 32. Explanation: If the MIN function and the MAX function are used, the minimum or maximum value of the designated accumulation method or group fields can be obtained.
MIN (Function) [Conforms to SLIM] Function Extracts the minimum value. Format MIN (,[,…]) Explanation This statement extracts the minimum value from an arbitrary number of ’s. The minimum number of expressions is 32. Explanation: If the MIN function and the MAX function are used, the minimum or maximum value of the designated accumulation method or group fields can be obtained.
Chapter 15 Functions RND (Function) Function Generates random numbers from 0 to 1. Format RND () Explanation According to the value in , processing varies as shown in the table below. applies to integer values. If a real value is designated, it is rounded down and converted to an integer. Value of Expression Processing Expression <0 is applied as the seed value for the random number.
SGN (Function) Function Checks a sign. Format SGN () Explanation This statement checks the sign of and returns the following numeric value. If positive 1 If 0 0 If negative -1 Example DEFSNG lf1, lf2 lf2 = SGN (lf1) 15-10 'Returns the sign of the real variable lf1.
Chapter 15 Functions SQR (Function) [Conforms to SLIM] Function Obtains the square root. Format SQR () Explanation This statement obtains the square root of the value in . If includes a double precision real numeral, the obtained value becomes double precision. Otherwise, a single precision value is obtained. must be a value greater than or equal to 0. Example DEFSNG lf1, lf2, lf3, lf4, lf5, lf6, lf7 lf1 = SQR (2) 'Assigns the square root of 2 to lf1.
15.2 Trigonometric Function ACOS (Function) [Conforms to SLIM] Function Obtains an arc cosine. Format ACOS () Explanation This statement obtains the arc cosine of the value in . The obtained value is expressed in degrees and ranges from 0 to 180. If includes a double precision real numeral, the obtained value becomes double precision. Otherwise, a single precision value is obtained.
Chapter 15 Functions ASIN (Function) [Conforms to SLIM] Function Obtains an arc sine. Format ASIN () Explanation This statement obtains the arc sine of the value in . The obtained value is expressed in degrees and ranges from -90 to 90. If includes a double precision real numeral, the obtained value becomes double precision. Otherwise, a single precision value is obtained.
ATN (Function) [Conforms to SLIM] Function Obtains an arc tangent. Format ATN () Explanation This statement obtains the arc tangent of the value in . The obtained value is expressed in degrees and ranges from -90 to 90. If includes a double precision real numeral, the obtained value becomes double precision. Otherwise, a single precision value is obtained.
Chapter 15 Functions ATN2 (Function) [Conforms to SLIM] Function Obtains the arc tangent of expression 1 divided by expression 2. Format ATN2 (, ) Explanation This statement obtains the arc tangent value of divided by . The unit of the obtained value is degrees and its range is from -180 to 180. If includes a double precision real numeral, the obtained value becomes double precision. Otherwise, a single precision value is obtained.
COS (Function) [Conforms to SLIM] Function Obtains a cosine. Format COS () Explanation This statement obtains the cosine value of the value in . Designate the unit of in degrees. If includes a double precision real numeral, the obtained value becomes double precision. Otherwise, a single precision value is obtained. If an argument is entered in radians, add RAD followed by the constant.
Chapter 15 Functions SIN (Function) [Conforms to SLIM] Function Obtains a sine. Format SIN () Explanation Obtains the sine value of the value in . Designate the unit of in degrees. If includes a double precision real numeral, the obtained value becomes double precision. Otherwise, a single precision value is obtained. If an argument is entered in radians, add RAD after the constant.
TAN (Function) [Conforms to SLIM] Function Obtains a tangent. Format TAN () Explanation This statement obtains the tangent value of the value in . Designate the unit of in degrees. If includes a double precision real numeral, the obtained value becomes double precision. Otherwise, a single precision value is obtained. If an argument is entered in radians, add RAD after the constant.
Chapter 15 Functions 15.3 Angle Conversion DEGRAD (Function) [Conforms to SLIM] Function Converts the unit to a radian. Format DEGRAD () Explanation This statement converts the unit of the value designated in from degrees to radians. Related Terms RADDEG Example DEFSNG lf1, lf2, lf3 lf1 = DEGRAD(90) 'Assigns the value of 90 converted to radians to lf1. lf2 = SIN(DEGRAD(lf3 + 20)) 'Assigns the sign value of (lf3 + 20) converted to 'radians to lf2.
RAD (Function) Function Converts a value set in radians to degrees. Format RAD Explanation This statement converts a set in radians to degrees and calculates it. Related Terms RADDEG Example DIM lf1 As SINGLE lf1 = 2RAD 'Converts radian 2 to degrees and assigns it to lf1.
Chapter 15 Functions RADDEG (Function) [Conforms to SLIM] Function Converts the unit to degrees. Format RADDEG () Explanation This statement converts the unit of the value designated in from radians to degrees. Related Terms RAD, DEGRAD Example DEFSNG lf1, lf2 lf1 = RADDEG(1.5705) lf2 = RADDEG(PI/2) 'Assigns the value of 1.5705 converted to degrees to lf1. 'Assigns the sine value of (π/2) converted to degrees to lf2.
15.4 Speed Conversion MPS (Function) Function Converts an expression of speed. Format MPS () Explanation This statement converts the speed value (percentage) to the arm end movement speed value %. is expressed in mm/sec. Related Terms SPEED Example SPEED MPS(50/2) 15-22 'Converts the internal movement speed to 50/2 (mm/sec).
Chapter 15 Functions 15.5 Time Function SEC (Function) Function Converts a value expressed in seconds to milliseconds. Format SEC Explanation This statement converts set in seconds to milliseconds and calculates it. Use this statement for an instruction set in milliseconds. Example DELAY(10SEC) 'Waits until 10 seconds elapse.
15.6 Vector AVEC (Function) Function Extracts an approach vector. Format AVEC () Explanation This statement extracts an approach vector from homogeneous transformation type coordinates. Related Terms OVEC, PVEC Example DEFTRN lt1, lt2, lt3 DEFVEC lv1, lv2 lv1 = AVEC(lt1) lv2 = AVEC(lt2 * lt3) 15-24 'Assigns the approach vector of lt1 to lv1. 'Assigns an approach vector with a value of (lt2 * lt3) to lv2.
Chapter 15 Functions OVEC (Function) Function Extracts an orient vector. Format OVEC () Explanation This statement extracts an orient vector from homogeneous transformation type coordinates. Related Terms AVEC, PVEC Example DEFTRN lt1, lt2, lt3 DEFVEC lv1, lv2 lv1 = OVEC(lt1) lv2 = OVEC(lt2 * lt3) 'Assigns the orient vector of lt1 to lv1. 'Assigns an orient vector with a value of (lt2 * lt3) to lv2.
PVEC (Function) Function Extracts a position vector. Format PVEC ({|}) Explanation This statement extracts a position vector from homogeneous transformation type coordinates or from position type coordinates. Related Terms AVEC, OVEC, RVEC Example DIM DIM DIM lv1 lt1 As Trans lv1 As Vector lp1 As Position = PVEC(lt1) 'Assigns the position vector of lt1 to lv1.
Chapter 15 Functions MAGNITUDE (Function) Function Obtains the vector size. Format MAGNITUDE () Explanation This statement obtains the vector size of a vector type coordinate value. Related Terms DIST Example DEFSNG lf1, lf2 DIM lv1 As Vector lf1 = MAGNITUDE((10, 10, 10)) lf2 = MAGNITUDE(lv1) 'Assigns the size of vector (10, 10, 10) to lf1. 'Assigns the size of vector lv1 to lf2.
15.7 Pose Data Type Transformation J2P (Function) Function Transforms joint type data to position type data. Format J2P () Explanation This statement transforms the joint type data designated in to position type data. The value to be obtained reflects the tool and work coordinate systems that are set at the moment. Related Terms J2T, P2J, P2T, T2J, T2P Example DEFPOS lp1, lp2 DIM lj1 As Joint lp1 = J2P(lj1) lp1.
Chapter 15 Functions J2T (Function) Function Transforms joint type data to homogeneous transformation type data. Format J2T () Explanation This statement transforms the joint type data designated in to homogeneous transformation type data. The value to be obtained reflects the tool and work coordinate systems that are set at the moment.
P2J (Function) Function Transforms position type data to joint type data. Format P2J () Explanation This statement transforms the data designated in to joint type data. If the FIG value in the position type data is -1 (undetermined), transformation is executed with the current figure. The value to be obtained reflects the tool and work coordinate systems that are set at the moment.
Chapter 15 Functions P2T (Function) Function Transforms position type data to homogeneous transformation type data. Format P2T () Explanation This statement transforms the data designated in to homogeneous transformation type data. The value to be obtained reflects the tool and work coordinate systems that are set at the moment.
T2J (Function) Function Transforms homogeneous transformation type data to joint type data. Format T2J () Explanation This statement transforms the data designated in to joint type data. If “-1” (indefinite) is set in in homogeneous transformation type data, the data is transformed using the current robot figure. The value to be obtained reflects the tool and work coordinate systems selected at the moment.
Chapter 15 Functions T2P (Function) Function Transforms homogeneous transformation type data to position type data. Format T2P () Explanation This statement transforms the data designated in to position type data. The value to be obtained reflects the tool and work coordinate systems that are set at the moment.
TINV (Function) Function Calculates an inverse matrix of homogeneous transformation type data. Format TINV () Explanation This statement inversely transforms the data designated in . Example DEFTRN lt1, lt2, Lt3 lt1 = TINV(350, 0, 450, 0, 1, 0, 0, 0, -1) 'Assigns the inverse matrix of (350, 0, 450, 0, 1, 0, 0, 0, '-1) to lt1. lt2 = TINV(lt3) 'Assigns the inverse matrix of lt3 to lt2. NORMTRN (Function) [Ver.1.
Chapter 15 Functions 15.8 Distance Extraction DIST (Function) [Conforms to SLIM] Function Returns the distance between two points. Format DIST (,) Explanation This statement obtains the distance between and . Example DEFSNG lf1, lf2 DEFPOS lp1, lp2, lp3 6-axis lf1 = DIST((350, 0, 450, 0, 0, 180), lp1) 'Assigns the distance between (350, 0, 450, 0, 0, 180) 'and lp1 to lf1.
15.9 Figure Component FIG (Function) Function Extracts a figure. Format FIG ({|}) Explanation This statement extracts a figure from position type data and homogeneous transformation type data. Related Terms CURFIG, LETF, Robot figure (Appendix 2) Example DIM li1 As Integer DIM lp1 As Point li1 = FIG(lp1) 'Assigns the figure of lp1 to li1. 6-axis li1 = FIG(lp1 + (0, 0, 100, 0, 0, 0) ) 'Assigns the figure of lp1 + (0,0,100,0,0,0) to li1.
Chapter 15 Functions 15.10 Angle Component JOINT (Function) Function Extracts an angle from joint type coordinates. Format JOINT (, ) Explanation Extracts the joint angle of the axis designated in from the joint type coordinates designated in . Related Terms LETJ Example DEFJNT lj1, lj2 DEFSNG lf1, lf2 DIM li1 As Integer lf1 = JOINT(1, lj1) 'Assigns the 1st axis joint angle of lj1 to lf1.
15.11 Axis Component POSX (Function) [Conforms to SLIM] Function Extracts the X-component. Format POSX ({|}) Explanation This statement extracts the X-component from position type or vector type coordinates. Related Terms POSY, POSZ Example DIM lf1 As Single DIM lp1 As Position lf1 = POSX(lp1) 'Assigns the X-component of lp1 to lf1. 6-axis lf1 = POSX(lp1 + (100, 100, 100, 0, 0, 0) ) 'Assigns the X-component of lp1 + '(100, 100, 100, 0, 0, 0)to lf1.
Chapter 15 Functions POSY (Function) [Conforms to SLIM] Function Extracts the Y-component. Format POSY ({|}) Explanation This statement extracts the Y-component from position type or vector type coordinates. Related Terms POSX, POSZ Example DIM lf1 As Single DIM lp1 As Position lf1 = POSY(lp1) 'Assigns the Y-component of lp1 to lf1. 6-axis lf1 = POSY(lp1 + (100, 100, 100, 0, 0, 0) ) 'Assigns the Y-component of lp1 to lp1 + '(100, 100, 100, 0, 0, 0).
POSZ (Function) [Conforms to SLIM] Function Extracts the Z-component. Format POSZ ({|}) Explanation This statement extracts the Z-component from position type or vector type coordinates. Related Terms POSX, POSY Example DIM lf1 As Single DIM lp1 As Position lf1 = POSZ(lp1) 'Assigns the Z-component of lp1 to lf1. 6-axis lf1 = POSZ(lp1 + (100, 100, 100, 0, 0, 0) ) 'Assigns the Z-component of lp1 to lp1 + '(100, 100, 100, 0, 0, 0).
Chapter 15 Functions 15.12 Rotation Component POSRX (Function) Function Extracts the X-axis rotation component. Format POSRX () Explanation This statement extracts the X-axis rotation component from the position type coordinates designated in . Related Terms POSRY, POSRZ Example DIM lf1 As Single DIM lp1 As Position lf1 = POSRX(lp1) 'Assigns the X-axis rotation component of lp1 to lf1.
POSRY (Function) Function Extracts the Y-axis rotation component. Format POSRY () Explanation This component extracts the Y-axis rotation component from the position type coordinates designated in . Related Terms POSRX, POSRZ Example DIM lf1 As Single DIM lp1 As Position lf1 = POSRY(lp1) 15-42 'Assigns the Y-axis rotation component of lp1 to lf1.
Chapter 15 Functions POSRZ (Function) Function Extracts the Z-axis rotation component. Format POSRZ () Explanation This statement extracts the Z-axis rotation component from the position type coordinates designated in . Related Terms POSRX, POSRY Example DIM lf1 As Single DIM lp1 As Position lf1 = POSRZ(lp1) 'Assigns the Z-axis rotation component of lp1 to lf1.
POST (Function) Function Extracts the T-axis rotation component. Format POST () Explanation This statement extracts the T-axis rotation component from the position type coordinates designated in . Example DIM lf1 As Single DIM lp1 As Position lf1 = POST(lp1) 15-44 'Assigns the T-axis rotation component of lp1 to lf1.
Chapter 15 Functions 15.13 Figure Component RVEC (Function) Function Extracts a figure. Format RVEC () Explanation This statement extracts a figure from position type coordinates. Related Terms PVEC Example DIM lp1 As Point DIM lv1 As Vector lv1 = RVEC(lp1) 'Assigns the figure of lp1 to lv1.
15.14 Position Function AREAPOS (Function) Function Returns the center position and direction of a rectangular parallelepiped with the position type for an area where an interference check is performed. Format AREAPOS () Explanation This statement designates declared using the AREA command and returns the current setting (center position) with the position type.
Chapter 15 Functions AREASIZE (Function) Function Returns the size (each side length) of a rectangular parallelepiped which defines the interference check area with the vector type. Format AREASIZE () Explanation Designate declared using the AREA command, and the statement will return the size (each side length) of the rectangular parallelepiped which defines the area with the vector type.
TOOLPOS (Function) Function Returns a tool coordinate system as the position type. Format TOOLPOS () Explanation Designate declared using the TOOL command, and this statement will return a tool coordinate system setting with the position type. In this case, -1 (indefinite) is entered for a FIG component of the position data.
Chapter 15 Functions WORKPOS (Function) Function Returns the user coordinate system as the position type. Format WORKPOS () Explanation Designate declared using the WORK command, and this statement will return a work coordinate system setting with the position type. In this case, -1 (indefinite) is entered for a FIG component of the position data.
15.15 Character String Function ASC (Function) Function Converts to a character code. Format ASC () Explanation This statement converts the first character of to a character code. Note: This function returns only the first byte value of a character string. Therefore, even if the first character is kanji, the first 1 byte of the Shift-JIS code is returned.
Chapter 15 Functions BIN$ (Function) [Conforms to SLIM] Function Converts the value of an expression to a binary character string. Format BIN$ () Explanation This statement converts the value designated in to a binary form and converts the value to a character string. Related Terms CHR$, HEX$, STR$, VAL Example DIM li1 As Integer DEFSTR ls1, ls2 ls1 = BIN$(20) ls2 = BIN$(li1) 'Converts 20 to a binary form and assigns it to ls1.
CHR$ (Function) [Conforms to SLIM] Function Converts an ASCII code to a character. Format CHR$ () Explanation This statement obtains a character with the character code of the value designated in . Related Terms BIN$, HEX$, STR$, VAL, Character code table (Appendix 1) Example DEFSTR ls1, ls2 ls1 = CHR$(49) ls2 = CHR$(&H4E) 15-52 'Assigns a character with the character code of 49 to ls1. 'Assigns a character with the character code of &H4E to ls2.
Chapter 15 Functions SPRINTF$ (Function) Function Converts an expression to a designated format and returns it as a character string. Format SPRINTF$ (, ) Explanation includes a character string for output as it is, and a conversion designation character string for converting and outputting the contents of (as a part of a character string). The first character of the conversion designation character string is % and a character (string) follows it.
: If and a + flag at the head of the result are designated when the first character is not a sign in conversion with a sign, or when no characters are created after a conversion with a sign, is ignored. # : Conversion is done using the “Replacement format.” In conversion with conversion designation symbol o, the precision is changed so that the leading digit of the result becomes 0.
Chapter 15 Functions f : e, E : Converts a real type argument to a character string of decimals displayed in a “[-] ddd.ddd” format. The number of digits after the decimal point is determined by the designated precision. If the precision is not designated, the number of digits after the decimal point is 6. If the precision is 0 and a # flag is not designated, the characters after the decimal point are not displayed.
HEX$ (Function) [Conforms to SLIM] Function Obtains a value converted from a decimal to a hexadecimal number as a character string. Format HEX$ () Explanation This statement converts the designated value in from a decimal number to a hexadecimal number and converts the value to a character string. Explanation: If an argument is not an integer, the argument is rounded down to an integer which does not exceed the value prior to conversion.
Chapter 15 Functions LEFT$ (Function) [Conforms to SLIM] Function Extracts the left part of a character string. Format LEFT$ (, ) Explanation This statement extracts a character string for from the left side of . If the character string includes a NULL value, the NULL value is returned. If a value longer than the character string is designated in , the whole character string is returned.
LEN (Function) [Conforms to SLIM] Function Obtains the length of a character string in bytes. Format LEN () Explanation This statement obtains the total sum byte count of the character string length designated in . Related Terms MID$, LEFT$, RIGHT$ Example DEFINT li1, li2 DIM ls1 As String li1 = LEN( “abcdefg” ) 'Assigns 7 characters of the character string “abcdefg” to li1. li2 = LEN( ls1 ) 'Assigns the byte count of ls1 to li2.
Chapter 15 Functions MID$ (Function) [Conforms to SLIM] Function Extracts a character string for the designated number of characters from a character string. Format MID$ (, [, ]) Explanation This statement extracts a character string for from of . If the character string includes a NULL value, the NULL value is returned.
ORD (Function) [Conforms to SLIM] Function Converts to a character code. Format ORD () Explanation This statement converts the first character in to a character code. Note: This function returns only the first byte value of a character string. Therefore, even if the first character is kanji, the first byte of the Shift-JIS code is returned. If the character string is “ ”, it returns 0.
Chapter 15 Functions RIGHT$ (Function) [Conforms to SLIM] Function Extracts the right part of a character string. Format RIGHT$ (, ) Explanation This statement extracts a character string from the right side of for . If the character string includes a NULL value, the NULL value is returned. If a value longer than the character string is designated in , the whole character string is returned.
STRPOS (Function) [Conforms to SLIM] Function Obtains the position of a character string. Format STRPOS (, ) Explanation This statement obtains the position of in . For the order, count 1, 2, … from the left. If the string is not found, 0 is returned. Related Terms Example DIM li1 As Integer li1 = STRPOS(“abcdefg”, “bc”) 15-62 'Assigns position (2) of “bc” in “abcdefg” to li1.
Chapter 15 Functions STR$ (Function) [Conforms to SLIM] Function Converts a value to a character string. Format STR$ () Explanation This statement converts the value designated in to a character string. Explanation: If a value is converted to a character string, there is always a blank to display a sign at the head of the return value. If the value is positive, a blank is inserted at the head of the return value of the Str function. This blank denotes the plus sign.
VAL (Function) [Conforms to SLIM] Function Converts a character string to a numeric value. Format VAL () Explanation This statement converts a character string designated in to a numeric value. If the first character of is not +, -, &, or numeric value, VAL becomes 0. Explanation: If the system finds a character other than the figures in the character string, the Val Function stops reading.
Chapter 16 Constants This chapter provides an explanation about PAC prepared constants.
Chapter 16 Constants 16.1 Built-in Constants OFF (Built-in Constant) Function Sets an OFF (0) value. Format OFF Explanation This statement sets an OFF (0) value in an expression. Related Terms ON Example 1F I1 = TRUE THEN I1 = ON ELSEIF I1 = FALSE THEN I1 = OFF ELSE D1 = PI ENDIF 'Sets 'Sets 'Sets 'Sets the Boolean value to true (1). ON(1) to the integer type variable. the Boolean value to true (1). OFF(0) to the integer type variable. 'Assigns π to the real type variable.
ON (Built-in constant) Function Sets an ON (1) value. Format ON Explanation This statement sets an ON (1) value in an expression. Related Terms OFF Example 1F I1 = TRUE THEN I1 = ON ELSEIF I1 = FALSE THEN I1 = OFF ELSE D1 = P ENDIF 16-2 'Sets 'Sets 'Sets 'Sets the Boolean value to true (1). ON(1) to the integer type variable. the Boolean value to true (1). OFF(0) to the integer type variable. 'Assigns π to the real type variable.
Chapter 16 Constants PI (Built-in constant) Function Sets a π value. Format PI Explanation This statement returns a double-precision type value of π. Example 1F I1 = TRUE THEN I1 = ON ELSEIF I1 = FALSE THEN I1 = OFF ELSE D1 = PI ENDIF 'Sets 'Sets 'Sets 'Sets the Boolean value to true (1). ON(1) to the integer type variable. the Boolean value to true (1). OFF(0) to the integer type variable. 'Assigns π to the real type variable.
FALSE (Built-in constant) Function Sets a value of false (0) to a Boolean value. Format FALSE Explanation This statement sets a value of false (0) to a Boolean value in an expression. Related Terms TRUE Example 1F I1 = TRUE THEN I1 = ON ELSEIF I1 = FALSE THEN I1 = OFF ELSE D1 = PI ENDIF 16-4 'Sets 'Sets 'Sets 'Sets the Boolean value to true (1). ON(1) to the integer type variable. the Boolean value to true (1). OFF(0) to the integer type variable. 'Assigns π to the real type variable.
Chapter 16 Constants TRUE (Built-in constant) Function Sets a value of true (1) to a Boolean value. Format TRUE Explanation This statement sets a value of true (1) to a Boolean value. Related Terms FALSE Example 1F I1 = TRUE THEN I1 = ON ELSEIF I1 = FALSE THEN I1 = OFF ELSE D1 = PI ENDIF 'Sets 'Sets 'Sets 'Sets the Boolean value to true (1). ON(1) to the integer type variable. the Boolean value to true (1). OFF(0) to the integer type variable. 'Assigns π to the real type variable.
Chapter 17 Time/Date Control This chapter provides an explanation of commands necessary to understand time, date or elapsed time and other commands to control interruptions due to time.
Chapter 17 Time/Date Control 17.1 Time/Date DATE$ (System Variable) [Conforms to SLIM] Function Obtains the current date. Format DATE$ Explanation This statement stores the “yyyy/mm/dd”(year/month/day). current date in the following format: Related Terms TIME$ Example DIM ls1 As String ls1 = DATE$ 'Assigns the current date to ls1.
TIME$ (System Variable) [Conforms to SLIM] Function Obtains the current time. Format TIME$ Explanation This statement stores the current time in the following format: “hh:mm:ss” (Time: minute: second). Time is displayed using the 24 hour system. Related Terms DATE$ Example DIM ls1 As String ls1 = TIME$ 17-2 'Assigns the current time to ls1.
Chapter 17 Time/Date Control TIMER (System Variable) [Conforms to SLIM] Function Obtains the elapsed time. Format TIMER Explanation This statement obtains the elapsed time, measured in milliseconds from the time, when the controller power is ON (0). Note: If the elapsed time exceeds 2147483647 milliseconds, the elapsed time will be displayed from -214148.3648 milliseconds. Related Terms Example DEFINT li1, li2, li3 li1 = TIMER li2 = TIMER + li3 'Assigns the elapsed time from the reference time to li1.
Chapter 18 Error Controls When an error occurs, you can check the contents of the error, or program a procedure to recover. This chapter provides an explanation of commands necessary to handle an error.
Chapter 18 Error Controls 18.1 Error Information ERL (System Variable) Function Obtains the line number where an error occurred. Format ERL Explanation This program stores the line number of the program where an error occurred. The initial status is quite unstable and even if you can read the contents of the ERL before an error occurs, it does not have any meaning. The ERL does not include any error line number of other programs being executed in multitasking operation.
ERR (System Variable) Function Obtains an error number that occurred. Format ERR Explanation This program stores an error number that occurred. The ERR does not include any error number of other programs being executed in multitasking operation. Remarks: This command has no meaning when “Error interruption process code deletion” is set to ON (1) in [Program] of [Project setting] of PAC manager in WINCAPSII. The same setting has been prepared in the teach pendant.
Chapter 18 Error Controls ERRMSG$ (Function) Function Sets an error message. Format ERRMSG$ () Explanation This statement sets the error message corresponding to the error number designated with . Related Terms ERL, ERR, ON ERROR GOTO Example Ex. 1: DIM ls1 As String ls1 = ERRMSG$(&H600C) Ex. 2: DIM Li1 As INTEGER DIM Li2% (2, 3) ON ERROR GOTO *Error1 FOR Lil = 0 TO 3 Li2 (0, Li1) = 0 'Assigns the error message with an error number of &H600C to ls1.
18.2 Error Interruption ON ERROR GOTO (Statement) Function Interrupts when an error occurs. Format ON ERROR {GOTO|GO TO} Explanation This statement defines and executes an interruption process routine when an error occurs. If this interruption occurs, the program with the error process routine designated with is executed. To return from the error process routine to the program, execute the RESUME statement.
Chapter 18 Error Controls RESUME (Statement) Function Returns from an interruption process routine. Format RESUME [NEXT|] Explanation This statement returns to the program before it has been branched from an interruption process routine, as defined in the ON ERROR GOTO statement. With RESUME NEXT, the program returns to the line following the line where an error occurred. With RESUME , the program passes control to a designated label line.
Chapter 19 System Information This chapter provides an explanation of commands necessary to obtain robot system information.
Chapter 19 System Information 19.1 System GETENV (Function) Function Obtains the environment setting values of the system. Format GETENV (
, ) Explanation This statement obtains the environment setting values of the system designated with and . For the items of the environment setting values, refer to Appendix 3 “Environment Setting Value.LETENV (Statement) Function Sets the environment setting values of the system. Format LETENV
, , Explanation This statement sets the environment setting values of the system designated with and to For the items of the environment setting values, refer to Appendix 3 “Environment Setting Value.” An error may occur when execution starts, if you set an element number or any set value exceeds the setting range.Chapter 19 System Information VER$ (Function) Function Obtains the version of each module. Format VER$ () Explanation This statement stores the version of each module corresponding to the value of with a character string. Refer to Appendix 9 “Version Corresponding Table.” Related Terms GETENV, Version corresponding table (Appendix 9) Example DEFSTR ls1, ls2, ls3 DIM li1 As Integer li1 = 1 ls1 = VER$ (1) 'Assigns the main board version to ls1.
19.2 Log NOTE: Control log is greatly enhanced in Ver. 1.20 or later. If you use Ver. 1.20 or later, refer to “WINCAPSII Guide”, Section 10.7, "New Control Log" on page 10-27. STARTLOG (Statement) Function Starts recording of the servo control log. Format STARTLOG Explanation Use the STARTLOG command to start recording of the servo control log in the program.
Chapter 19 System Information Related Terms CLEARLOG, STOPLOG Example STARTLOG 'Starts recording of the servo control log. CLEARLOG (Statement) NOTE: Control log is greatly enhanced in Ver. 1.20 or later. If you use Ver. 1.20 or later, refer to “WINCAPSII Guide”, Section 10.7, "New Control Log" on page 10-27. Function Initializes recording of the servo control log. Format CLEARLOG Explanation Use the CLEARLOG command to instruct initialization of the servo control log in the program.
STOPLOG (Statement) NOTE: Control log is greatly enhanced in Ver. 1.20 or later. If you use Ver. 1.20 or later, refer to “WINCAPSII Guide”, Section 10.7, "New Control Log" on page 10-27. Function Stops servo control log recording. Format STOPLOG Explanation Use the STOPLOG command to instruct the servo control log to stop in a program. In automatic mode, if the buffer is full after recording starts, the log recording automatically stops.
Chapter 20 Preprocessor If you create a program with the PAC manager, you can use the preprocessor commands described in this chapter. The PAC manager automatically replaces designated character strings or files according to the definitions of the preprocessor commands and then compiles them. By using the preprocessor commands, you can use the library program or you can describe a program that is easy to read.
Chapter 20 Preprocessor 20.1 Symbol Constants · Macro Definitions #define (Preprocessor Statement) Function Replaces a designated constant or macro name in the program with a designated character string. Format #define or #define Explanation This statement replaces or in the program with a designated character string.
#undef (Preprocessor Statement) Function Makes a symbol constant defined with #define or macro definition invalid. Format #undef {|} Explanation This statement makes a symbol constant defined with #define or macro definition invalid in the program after this #undef. Designate only the macro name for a macro with an argument. Related Terms #define Example #UNDEF NAME 20-2 'Makes NAME defined with a symbol definition or macro definition 'in the #DEFINE statement invalid.
Chapter 20 Preprocessor #error (Preprocessor Statement) Function Forcibly generates a compiling error if the #error command is executed. Format #error [] Explanation Use this statement when you purposely want to generate an error to test a program. If you compile a line using the #error command, an error occurs. At this time, an error message appears, showing the contents defined in . Example #error “Error Occur” 'If compiling is executed, the message “Error Occur” 'appears.
20.2 File Fetch #include (Preprocessor Statement) Function Fetches the preprocessor program. Format #include “[Path] file name” #include <[Path] file name> Explanation This statement fetches the preprocessor program file, at a position where the #include statement is placed. In the case of “ ”, if the path of the file is ignored the system searches for the file in the current directory first and then the system directory. In the case of < >, it searches only the system directory.
Chapter 20 Preprocessor 20.3 Optimization #pragma optimize (Preprocessor Statement) Function Designates optimization to be executed for each program. Format #pragma optimize (“
Chapter 21 Vision Control (Option) This chapter lists all the commands available for use with the µVision board and µVision-21.
Chapter 21 Vision Control (Option) 21.1 Precautions for using vision commands. (1) To use vision commands, an optional µVision board is required. (2) A vision command should be preceded by a vision process priority command (TAKEVIS). Example: TAKEVIS CAMIN 1 VISPLNOUT 0 . . (3) If an error occurs during execution of a vision command except camera input commands, the error message will appear when the next vision command is executed.
Draw µVision-15 CROSS CRSALN LOC PRINT GETP HIST HCLR Image Process Search Function 21-2 LEVEL BINA RBINA AREA BIGT CENTR MOMENT STRT PROJ EDGE CORN CIRC µVision board Description Page VISCROSS Draws cross symbols. 14-36 VISLOC VISDEFCHAR VISPRINT VISGETP Locates character display positions. Draw character setting Draws characters. Obtains brightness of designated coordinates. 14-37 14-39 14-40 14-42 VISHIST Executes histograms.
Chapter 21 Vision Control (Option) 21.3 Image Input and Output CAMIN (Statement) Function Stores an image from the camera in the image memory (process screen). Format CAMIN [, [, ] ] Explanation Designates the camera number (1 or 2). Designates the number of the storage memory (process screen) (0 to 3). If this is ignored, 0 is set as the default.CAMMODE (Statement) Function Sets the function used to store a camera image. Format CAMMODE , , Explanation Designates the number of the camera (1 or 2). Designates the function of the camera (0 or 1). 0: 1: Normal (in the case of the normal setting) Reset function. (After the camera operation is reset, a camera image is stored.) For further details, refer to the “2.5.2.
Chapter 21 Vision Control (Option) Related Terms CAMIN, VISSTATUS Example CAMMODE 1, 0, 0 I1 = VISSTATUS(0) IF I1 = 0 THEN CAMIN 1 'Sets the function of camera 1 to normal and sets the storage 'method to frame. 'When normal, I1 = 0 'Converts an image from camera 1 with table 0 (with the same 'brightness as of the camera image) and stores it in storage 'memory 0. VISPLNOUT 0 'Outputs an image (still image) in storage memory 0 on the 'monitor. VISLOC 10, 10 'Sets the position to display.
CAMLEVEL (Statement) Function Sets the camera image input level. Format CAMLEVEL , , Explanation Designates the number of the camera (1 or 2). Sets the lower limit level for reading camera images (0 to 93). Sets the upper limit level for reading camera images (7 to 100). Note (1): This instruction sets the lower limit of the maximum input range to 0% and the upper limit to 100%.
Chapter 21 Vision Control (Option) VISCAMOUT (Statement) Function Displays an image from the camera on the monitor. Format VISCAMOUT [, ] Explanation Designates the number of the camera (1 or 2). Designates the number of the look-up table to display (0~15). If this is ignored, 1 is set as the default.VISPLNOUT (Statement) Function Displays an image in the storage memory on the monitor. Format VISPLNOUT [, ] Explanation Designates the number of the storage memory (process screen number) (0 to 3). Designates the number of the look-up table to display (0~15). If this is ignored, 1 is set as the default.Chapter 21 Vision Control (Option) VISOVERLAY (Statement) Function Displays draw screen information on the monitor. Format VISOVERLAY Explanation Sets draw screen display (0 to 3). 0: Does not display the draw screen. 1: Displays draw screen 0. 2: Displays draw screen 1. 3: Displays both draw screens 0 and 1 at the same time.
Example VISOVERLAY 3 'Sets the destination screen to draw. VISSCREEN 1, 0 ' VISCLS 0 ' VISLOC 10, 10 'Sets the position to display. VISPRINT “Draw on the draw screen 0” 'Draws characters on the screen. VISSCREEN 1, 1 'Sets the destination screen to draw. VISLOC 10, 11 'Sets the position to display. VISPRINT “Draw on draw screen 0” 'Draws characters on the screen. VISOVERLAY 0 'Stops displaying the draw screen. DELAY 5000 'Stops for 5 seconds. VISOVERLAY 1 'Displays draw screen 0 on the monitor.
Chapter 21 Vision Control (Option) VISDEFTABLE (Statement) Function Reads images on the camera and sets the look-up table data for image output. Format VISDEFTABLE
, , Explanation Designates the number of the look-up table (5 to 15). Designates the input value of the table (0 to 255). Designates the output value of the table (0 to 255). Look-up table Table No.Example VISSCREEN 1, 0, 1 VISCLS 0 VISCAMOUT 1, 1 ' ' 'Converts an image (dynamic image) from camera 1 with table '1 (0~175, 75% brightness compressed) and displays it on 'the monitor. DELAY 5000 'Stops for 5 seconds. VISDEFCHAR 4, 4, 2 ' FOR I1 = 0 TO 255 ' VISLOC 10, 10 ' VISPRINT I1 ' VISDEFTABLE 5, I1, 255-I1 'Set table number 5. NEXT I1 ' VISCAMOUT 1, 5 'Reverses an image (dynamic image) from camera 1 and displays 'it on the monitor.
Chapter 21 Vision Control (Option) VISREFTABLE (Function) Function Refers to data on the look-up table. Format VISREFTABLE (
, ) Explanation Designates the number of the look-up table (0 to 15). Designates the input value of the table (0 to 255).21.4 Window Setting WINDMAKE (Statement) Function Designates an area for image processing.
Chapter 21 Vision Control (Option) Line window (2 point designation) Designates the line start point X coordinate (0 to 511). Designates the line start point Y coordinate (0 to 479). Designates the line end point X coordinate (0 to 511). Designates the line start point Y coordinate (0 to 479).
Ellipse window: Designates the width of an ellipse (1 to 256). Designates the height of an ellipse (1 to 240). X axis aaxis xis Width Height Sector window: Designates the outer diameter of a sector (outer diameter > inner diameter) (1 to 9999). Designates the inner diameter of a sector (outer diameter > inner diameter) (1 to 9999). Designates the start angle of a sector (-720 to 720).
Chapter 21 Vision Control (Option) Rectangle window: Designates the width of a rectangle (1 to 512). Designates the height of a rectangle (1 to 480). Designates the angle of the line. If this is ignored, 0 degrees is entered (-720 to 720). Designates the mode to draw (0 to 2). 0: Designates the VISPROJ and VISEDGE scanning direction to the width direction. 1: Designates the VISPROJ and VISEDGE scanning direction to the height direction.
Example VISSCREEN 1, 0, 1 VISCLS 0 VISCAMOUT 1 CAMIN 1 VISPLNOUT 0 WINDMAKE P, 1, 50, 100, 100, 150 WINDMAKE L, 2, 100, 45 WINDMAKE C, 3, 50 WINDMAKE E, 4, 50, 100 WINDMAKE S, 5, 100, 80, 90, 300, 1, 2 WINDMAKE R, 6, 100, 50, 45, 2 VISMEASURE 1, 100, 100, 1, 1, 128 WINDDISP VISMEASURE 2, 150, 150, 1, 1, 128 WINDDISP 2 VISMEASURE 3, 200, 200, 1, 1, 128 WINDDISP 3 VISMEASURE 4, 250, 250, 1, 1, 128 WINDDISP 4 VISMEASURE 5, 300, 300, 1, 1, 128 WINDDISP 5 VISMEASURE 6, 350, 350, 1, 1, 128 WINDDISP 6 21-18 ' '
Chapter 21 Vision Control (Option) WINDCLR (Statement) Function Deletes set window information. Format WINDCLR Explanation Designates the window number (0 to 511). Note (1): This instruction does not change the initial setting. When restarting the system with the power OFF, the initial setting values are restored. Note (2): If it is necessary to permanently delete data, delete if with the WINCAPSII VisManager.
WINDCOPY (Statement) Function Copies window data. Format WINDCOPY , Explanation Designates the window number from which data will be copied (0 to 511). Designates the window number to which data will be copied (0 to 511). Note (1): This instruction does not change the initial setting. When restarting the system with power the OFF, the copied setting is lost.
Chapter 21 Vision Control (Option) Example VISSCREEN 1, 0, 1 VISCLS 0 VISCAMOUT 1 WINDCLR 2 WINDMAKE R, 1, 50, 100, 0, 2 VISLOC 0, 0 VISPRINT “Copy source window information” FOR I1 = 0 TO 7 FOR I2 = WINDREF(1, I1) FOR VISLOC 0, 1+I1 FOR VISPRINT “Data”;I1;“=”;I2 NEXT I1 VISLOC 0, 9 VISPRINT “Before window information copy” FOR I1 = 0 TO 7 FOR I2 = WINDREF(2, I1) FOR VISLOC 0, 10+I1 FOR VISPRINT “Data”;I1;“=”;I2 NEXT I1 WINDCOPY 1, 2 VISLOC 0, 18 VISPRINT “After window information copy” FOR I1 = 0 TO 7 FOR
WINDREF (Function) Function Obtains window information. Format WINDREF (, - ) Explanation This statement designates the window number with (0 to 511). Designates the number to obtain the data with
- (0 to 7). Item number 0: Presence of the Item number 0: window setting Item number 1: Window shape Return value Present = 0 Not present = -1 Return value (Refer to the table below.
Chapter 21 Vision Control (Option) WINDDISP (Statement) Function Draws a designated window. Format WINDDISP Explanation This statement designates the window number with (0 to 511). Note (1): In window information, there is a reference point to process a window. This data is determined with each image process instruction. Therefore, if you execute this instruction after process instructions are executed , the window will be displayed at a right position.
21.5 Draw VISSCREEN (Statement) Function Designates a drawing screen. Format VISSCREEN , [, ] Explanation Designates the storage memory or overlay memory (screen) (0 or 1). 0: Storage memory (Processing screen) 1: Overlay memory (Draw only screen) Screen number on each screen Storage memory (Processing screen): 4 screens from 0 to 3 Overlay memory (Draw only screen): 2 screens, 0 and 1.
Chapter 21 Vision Control (Option) Example VISSCREEN 1,0,1 VISCLS 0 FOR I1 = 100 TO 200 STEP 2 FOR VISRECT I1,I1,200,200 NEXT I1 VISCLS 0 VISSCREEN 1,0,0 FOR I1 = 100 TO 200 STEP 2 FOR VISRECT I1,I1,200,200 NEXT I1 VISOVERLAY 1 'Instantaneously draws the drawing screen 0. ' ' 'Draws a rectangle with a width of 200 and a height of 200. ' 'Clears the screen. 'Draws on drawing only screen 0. ' 'Draws a rectangle with a width of 200 and a height of 200. ' 'Displays (Renews) draw only screen 0 on the monitor.
VISBRIGHT (Statement) Function Designates a drawing brightness value. Format VISBRIGHT Explanation Designates a drawing brightness value (0 to 255). Note (1): If a drawing object is in the storage memory (Processing screen), it is drawn with a designated brightness. If it is in the overlay memory (draw only memory), the following brightness will be used.
Chapter 21 Vision Control (Option) VISCLS (Statement) Function Fills (clears) a designated screen, set in a mode with a designated brightness. Format VISCLS [[,]] Explanation (0~3) If ignored, 2 is set. 0: Fills the screen set with VISSCREEN instruction with a designated brightness. 1: Fills the entire processing screen with a designated brightness. 2: Fills the entire screen with a designated brightness. 3: Fills all screens with a designated brightness.
Example VISSCREEN 1,0,1 VISCLS 0 VISSCREEN 1,1,1 VISCLS 0 VISPLNOUT 0 VISSCREEN 0,0,1 FOR I1 = 10 TO 200 STEP 5 FOR VISCLS 0,I1 NEXT I1 DELAY 500 VISCLS 0 VISRECT 200,200,200,200 DELAY 500 VISCLS 0 VISCAMOUT 1 VISSCREEN 1,0,1 VISRECT 100,100,200,200 DELAY 500 VISCLS 0 VISCLS 0,127 DELAY 500 VISCLS 0,255 DELAY 500 VISCLS 0 21-28 ' ' ' ' 'Displays storage memory 0 (processing screen). 'Instantaneously draws on processing screen 0. ' 'Fills the screen with the designated brightness of I1. ' 'Stops for 0.
Chapter 21 Vision Control (Option) VISPUTP (Statement) Function Draws a point on the screen. Format VISPUTP , Explanation Designates the X coordinate in order to draw a point. Designates the Y coordinate in order to draw a point. Note (1): The values of the X and Y coordinates are not checked. Fven if they are out of the permissible drawing range, no error will result. Note (2): The object screen is the screen set with VISSCREEN.
VISLINE (Statement) Function Draws a line on the screen. Format VISLINE, , [, ] Explanation Designates the X coordinate in order to draw a line. Designates the Y coordinate in order to draw a line. Designates the length of the line to be drawn. Designates the angle of the line to be drawn. If ignored, 0 degrees will be the default setting.
Chapter 21 Vision Control (Option) VISPTP (Statement) Function Draws a line connecting two points on the screen. Format VISPTP , , , Explanation Designates the start point of the X coordinate of the line to be drawn. Designates the start point of the Y coordinate of the line to be drawn.
VISRECT (Statement) Function Draws a rectangle on the screen. Format VISRECT , , , [, [, ] ] Explanation Designates the X coordinate of the rectangle to be drawn. Designates the Y coordinate of the rectangle to be drawn. Designates the width of the rectangle to be drawn. Designates the height of the rectangle to be drawn. Designates the mode for drawing.
Chapter 21 Vision Control (Option) VISCIRCLE (Statement) Function Draws a circle on the screen. Format VISCIRCLE , , [, ] Explanation Designates the X coordinate of the circle to be drawn. Designates the Y coordinate of the circle to be drawn. Designates the radius of the circle to be drawn. Designates the mode of drawing. 0: Draws only an outline of a circle 1: Draws a whole filled circle.
VISELLIPSE (Statement) Function Draws an ellipse on the screen. Format VISELLIPSE , , , [, ] Explanation Designates the X coordinate of the ellipse to be drawn. Designates the Y coordinate of the ellipse to be drawn. Designates the width of the ellipse to be drawn. Designates the height of the ellipse to be drawn. Designates the mode of drawing. 0: Draws only an outline of an ellipse.
Chapter 21 Vision Control (Option) VISSECT (Statement) Function Draws a sector on the screen. Format VISSECT , , , , , Explanation Designates the X coordinate of the sector to be drawn. Designates the Y coordinate of the sector to be drawn. Designates the outer diameter of the sector to be drawn. Designates the inner diameter of the sector to be drawn.
VISCROSS (Statement) Function Draws a cross symbol on the screen. Format VISCROSS , [, [, [, ] ] ] Explanation Designates the X coordinate of the cross symbol to be drawn. Designates the Y coordinate of the cross symbol to be drawn. Designates the axis length of the cross symbol to be drawn. If ignored, 10 will be the default setting. Designates the axis length of the cross symbol to be drawn.
Chapter 21 Vision Control (Option) VISLOC (Statement) Function Designates the display position of characters. Format VISLOC , [, ] Explanation Designates the X coordinate of the character to be drawn. Designates the Y coordinate of the character to be drawn. Designates the coordinate mode of X and Y position data. If ignored, 0 will be the default setting. 0: Designates by column and line. 1: Designates with the XY coordinate system.
Related Terms VISPRINT Example VISPLNOUT 0 VISSCREEN 0,0,1 VISCLS 0 VISBRIGHT 255 VISLOC 10,10 VISPRINT “Test mode 0” VISLOC 10,10,1 VISPRINT “Test mode 1” VISPRINT “Continuing Test mode 'Displays storage memory 0 (processing screen). 'Instantaneously draws on processing screen 0. 'Clears the screen. 'Sets the brightness value for drawing. 'Designates the position to display characters. ' 'Designates the position to display characters.
Chapter 21 Vision Control (Option) VISDEFCHAR (Statement) Function Designates the size of characters and the display method. Format VISDEFCHAR , , Explanation Designates the lateral size of character (1 to 4). Designates the longitudinal size of characters (1 to 4). Designates the display method of characters (0 to 3).
VISPRINT (Statement) Function Displays characters and figures on the screen. Format VISPRINT [ …] Explanation Designates characters, variables and constants specified in “”. Uses a comma (,) or semicolon (;). Comma: Creates blank spaces between messages. Semicolon: No spaces between messages. If you designate a comma or semicolon at the end of , no line feed is generated and the next display with VISPRINT continues from that line.
Chapter 21 Vision Control (Option) 21.6 Vision Processing VISWORKPLN (Statement) Function Designates the storage memory (process screen) to process. Format VISWORKPLN Explanation Designates the storage memory number to process (0 to 3). If ignored, 0 is set. Note (1): When you turn ON the power, VISWORKPLN 0 is the initial setting. Note (2): For this instruction, a µVision board (option) is required.
VISGETP (Function) Function Obtains designated (processing screen). coordinate brightness from the storage memory Format VISGETP (, ) Explanation Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479). Note (1): Note (2): The processing object is the screen designated with VISWORKPLN. For this instruction, a µVision board (option) is required.
Chapter 21 Vision Control (Option) VISHIST (Statement) Function Obtains the histogram (brightness distribution) of the screen. Format VISHIST , , Explanation Designates the window number (0 to 511). Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479). Note (1): Note (2): Note (3): Note (4): Note (5): Note (6): Note (7): Designate the process area with a window.
VISREFHIST (Function) Function Reads histogram results. Format VISREFHIST () Explanation Designates the brightness value of the histogram to read (0 to 255). Related Terms VISHIST Example WINDMAKE R,1,100,100,0,2 CAMIN 1 VISWORKPLN 0 VISHIST 1,100,100 'Sets window 1 to rectangle. 'Obtains a camera image from the storage memory. 'Sets the processing object screen for storage memory 0.
Chapter 21 Vision Control (Option) VISLEVEL (Function) Function Obtains a binarization level based on the histogram result. Format VISLEVEL ([, [, ] ] ) Explanation Designates the method of obtaining the binarization level (0 to 2). 0: Mode method 1: Discrimination analysis method 2: P tile method For details, refer to Part 1 “6.1.1.5 Binarization”.
Example VISCLS 0 WINDMAKE R,1,100,100,0,2 CAMIN 1 VISWORKPLN 0 ' 'Sets window 1 to rectangle. 'Obtains a camera image from the storage memory. 'Sets the processing object screen to storage memory '0. VISHIST 1,100,100 'Executes the histogram in window 1 with the 'coordinates (100, 100) as the home position. WINDDISP 1 ' I2 = VISLEVEL(0) 'Obtains the binarization level using the mode 'method.
Chapter 21 Vision Control (Option) VISBINA (Statement) Function Binarizes the screen. Format VISBINA , , , [, ] Explanation Designates the window number (0 to 511). Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479). Designates the upper level for binarization (0 to 254 lower limit < upper limit).
Example VISSCREEN 1,0,1 WINDMAKE R,1,100,100,0,2 CAMIN 1 VISWORKPLN 0 'Instantaneously draws on drawing screen 0. 'Sets window 1 to rectangle. 'Obtains a camera image from the storage memory. 'Sets the processing object screen to storage memory VISPLNOUT 0 VISBINA 1,100,100,128,255 WINDDISP 1 'Displays storage memory 0 on the monitor. 'Binarizes in the window. 'Draws the window. 0.
Chapter 21 Vision Control (Option) VISBINAR (Statement) Function Displays a binarized screen. Format VISBINAR [, [, Binary upper limit]] Explanation Designates the mode to display the binarized screen (0 or 1). 0: Quits binarization display and returns to the original display. 1: Executes binarization display. Designates the lower level for binarization (0 to 254 lower limit < upper limit).
VISFILTER (Statement) Function Executes filtering on the screen. Format VISFILTER , , , , [, ] Explanation Designates the window number (0 to 511). Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479). Designates the storage memory number (0 to 3). Designates the storage memory number to store filtering results (0~3).
Chapter 21 Vision Control (Option) Note (1): Note (2): Note (3): Note (4): Note (5): If the process screen and the storage screen have the same number, an error will result. Designate the process area with a window. If the designated window position is out of screen, the execution will result in an error. The only possible window shape that may be designated is a rectangle with 0 degrees. If another window shape is designated, an error will result.
VISMASK (Statement) Function Executes calculations between images. Format VISMASK , , , ,, [, [, ]] Explanation Designates the window number (0 to 511). Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479). Designates the storage memory number to calculate (0 to 3).
Chapter 21 Vision Control (Option) An image of image storage memory 0 After execution Addition An image of image storage memory 1 Example of addition for VISMASK) To delete an unnecessary section (IC pins) in the image, create the image with the draw instruction from image storage memory 1 (process screen 1) and add it to image storage memory 0 along with the brightness value. You can obtain the same result if you use the maximum value setting.
VISCOPY (Statement) Function Copies the screen. Format VISCOPY , Explanation Note (1): Designates the storage memory number of the copy source. (0 to 3) Designates the storage memory number of the copy destination.(0 to 3) If the copy source and copy destination numbers are the same, an error will result.
Chapter 21 Vision Control (Option) VISMEASURE (Statement) Function Measures features in the window (area, center of gravity, main axis angle). Format VISMEASURE , , , , , [, ] Explanation Designates the window number (0 to 511). Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479).
Note (1): Designate the process area with a window. (Only the sector window cannot measure the main axis angle.) Line (2-point designation) Line (Length and angle) Circle Ellipse Sector Rectangle Note (2): Note (3): 1 2 2 3 4 5 6 7 8 9 0 Mode 1 2 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ × ¡ If the designated window position is out of screen, the execution will result in an error. The following data can be obtained with the processing result obtaining function.
Chapter 21 Vision Control (Option) Example VISSCREEN 0,0,1 WINDMAKE R,1,512,480,0,2 CAMIN 1 VISWORKPLN 0 VISPLNOUT 0 VISMEASURE 1,0,0,1,2,128 'Instantaneously draws on storage memory 0. 'Sets window 1 to rectangle. 'Obtains a camera image from the storage memory. 'Designates the object from storage memory 0. ' 'Obtains the accumulated brightness, area, center of 'gravity and main axis angle. IF VISSTATUS(0) = 0.
VISPROJ (Statement) Function Measures the projected data in the window. Format VISPROJ , , , , [, ] Explanation Designates the window number (0 to 511). Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479). Designates the object to measure (0 or 1).
Chapter 21 Vision Control (Option) Note (3): The following data can be obtained with the processing result obtaining function.
VISEDGE (Statement) Function Measures the edge in a window. Format VISEDGE,,, , , [,[, [,]]] Explanation Designates the window number (0 to 511). Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479). Designates the scanning direction and the sampling rate (-511 to 511).
Chapter 21 Vision Control (Option) Designates the level to detect the edge (0 to 512). Designates the method for detecting the edge. If this is ignored, 0 will be the default setting.
Note (1): Designate the processing range with a window. ¡: Available ×: Not available Line (2 point specification) Windmake P ¡ Line (Length, angle) Windmake L ¡ × Circle Windmake C Ellipse Windmake E × Sector Windmake S ¡ Rectangle Windmake R ¡ Note (2): If the specified window is larger than the screen, an error will result. Note (3): The following data can be obtained with the processing result obtaining function.
Chapter 21 Vision Control (Option) Example VISSCREEN 1,0,1 'Instantaneously draws on drawing screen 0. VISPLNOUT 0 ' VISCLS 0 ' WINDMAKE R,1,300,20,0,0 'Sets window 1 to rectangle. CAMIN 2 'Obtains a camera image from the storage memory. VISWORKPLN 0 'Designates the object to storage memory 0. VISPLNOUT 0 ' VISEDGE 1,100,100,1,0,128 'Measures an edge.
21.7 Code Recognition VISREADQR (Statement) Function Reads the QR code. Format VISREADQR , , , [, [, ] ] Explanation Designates the window number (0 to 511). Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479). Designate the method for binarization. 0: Automatic binarization (Binarizes the process range with the decision analysis method.
Chapter 21 Vision Control (Option) Note (1): Designate the process range with a window. Note (2): The only window shape that can be designeted is a rectangle with 0 degrees. If another window shape is designated, an error will result. Note (3): The processing object is the screen designated with VISWORKPLN. Note (4): The memory board stores the contents of the codes and you can obtain them with VISGETSTR. Note (5): If the code has an error and it cannot be read, the result of VISSTATUS (0) will be -1.
Example VISSCREEN 1,0,1 ' VISCLS ' WINDMAKE R,1,512,480,0,2 'Sets window 1 to a rectangle. CAMIN 1 'Obtains a camera image from storage memory. VISPLNOUT 0 ' VISREADQR 1,0,0,0 'Reads the QR code.
Chapter 21 Vision Control (Option) 21.8 Labeling BLOB (Statement) Function Executes labeling. Format BLOB , , , , [, [, [, [, ]]]] Explanation Designates the window number (0 to 511). Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479).
Note (1): Designate the process range with a window. Note (2): If the designated window position is out of screen, the execution will result in an error. Note (3): The only window shape you are able to designate is a rectangle with 0 degrees. If another window shape is designated, an error will result. Note (4): The processing object is a screen designated with VISWORKPLN. Note (5): The following data can be obtained with the process result obtaining function.
Chapter 21 Vision Control (Option) Example VISSCREEN 1,0,1 'Instantaneously draws on drawing screen 0. VISCLS 0 ' WINDMAKE R,1,512,480,0,2 'Sets window 1 to rectangle. CAMIN 1 'Obtains a camera image to storage memory 0. VISPLNOUT 0 ' VISWORKPLN 0 'Designates the object to storage memory 0. BLOB 1,0,0,0,128 'Executes labeling.
BLOBMEASURE (Statement) Function Executes feature measurement of the object label number. Format BLOBMEASURE , Explanation Designates the label number obtained by labeling. (0 to 511) Designates the feature to obtain. (0 or 1) 0: Main axis angle 1: Periphery length Main axis angle Peripheral length Binarization is automatically done inside without changing the original image. You do not need to execute binarization beforehand.
Chapter 21 Vision Control (Option) Note (1): Before executing this function, you need to execute labeling with BLOB. Note (2): When you obtain the periphery length, you need to leave the source image when you executed labeling. Note (3): The following is an example of the data you can obtain with the processing result obtaining function.
BLOBLABEL (Function) Function Obtains the label number for designated coordinates. Format BLOBLABEL(, ) Explanation Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479). Label number 0 P2 Label number 1 P1 BLOBLABEL checks if the designated coordinates are included in each labeled object. If you designate the coordinates.
Chapter 21 Vision Control (Option) Example VISSCREEN 1,0,1 'Instantaneously draws on drawing screen 0. WINDMAKE R,1,512,480,0,2 'Sets window 1 to rectangle. CAMIN 1 'Obtains a camera image from the storage memory. BLOB 1,0,0,0,128 'Executes labeling. IF VISSTATUS(0)=0.0 THEN ' IF VISSTATUS(1)<>0.
BLOBCOPY (Statement) Function Copies an object label number. Format BLOBCOPY , , , Explanation Designates the label number obtained with labeling (0 to 511). Designates the storage memory number of the copy destination (0 to 3). Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479).
Chapter 21 Vision Control (Option) Example VISSCREEN 0,1, VISCLS 128 VISSCREEN 1,0,1 VISCLS 0 WINDMAKE R,1,512,480,0,2 CAMIN 1 BLOB 1,0,0,0,128 I1 = VISSTATUS(0) IF I1 = 0 THEN I1 = VISSTATUS(1) IF I1<>0 THEN BLOBCOPY 0,1,100,100 END IF END IF VISPLNOUT 0 DELAY 2000 VISPLNOUT 1 DELAY 2000 VISCAMOU VISCAMOUT 1 'Instantaneously draws on storage memory 1. 'Clears the screen. 'Instantaneously draws on drawing screen 0. ' 'Sets window 1 to rectangle. 'Obtains a camera image for the storage memory.
21.9 Search Function SHDEFMODEL (Statement) Function Registers the search model. Format SHDEFMODEL , , , , , , [, ] Explanation Designates the model number to register (0 to 99). Designates the home position X coordinate (16 to 485). Designates the home position Y coordinate (16 to 463). Designates the width of the registered model (10 to 256).
Chapter 21 Vision Control (Option) Note (1): If the model to be registered is not more than 16 pixels inside from the edge of the screen, it cannot be registered. Note (2): The reference coordinates are used to designate a point to detect when a model is searched. Note (3): A registered model requires a certain amount of brightness distribution. If the brightness distribution is too flat or there are many small differences in the model, it cannot be registered.
SHREFMODEL (Statement) Function Refers to registered model data. Format SHREFMODEL (,- ) Explanation Designates the reference model number (0 to 99).
- Designates the data type of a reference model (0 to 8).
Chapter 21 Vision Control (Option) SHCOPYMODEL (Statement) Function Copies a registered model. Format SHCOPYMODEL , Explanation Designates the model number to copy (0 to 99). Designates the new model number (0 to 99). Note (1): If the copy source number and the copy destination member are the same, an error occurs.
SHCLRMODEL (Statement) Function Deletes a registered model. Format SHCLRMODEL Explanation Designates the model number to delete (0 to 99). Note (1): If the model number designated does not exist, nothing is executed. Note (2): For this instruction, a µVision board (option) is required. Note (3): During execution of this instruction, do not power off the controller.
Chapter 21 Vision Control (Option) SHDISPMODEL (Statement) Function Displays a registered model on the screen. Format SHDISPMODEL , , , Explanation Designates the model number to display (0 to 99). Designates the storage memory number for display (0 to 3). Designates the home position coordinate X of the registered model (0 to 511).
SHMODEL (Statement) Function Searches for a model. Format SHMODEL , , , , [, [, [, [, ]]]] Explanation Designates the window number (0 to 511). Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479). Designates the model number to search for (0 to 99).
Chapter 21 Vision Control (Option) 270° -90° Start angle 180° -180° 315° -45° 90° -270° End angle 180° -180° 0° End angle 270° -90° 45° -315° 315° -45° 0° Start angle 90° -270° 45° -315° Measures an angle of an object whose angle from the angular origin exists in an area ranging from [Start Angle] to [End Angle]. As shown in the figure, both condition (1) and (2) give the same measuring range.
Note (7): The shape of the window available to designate is a rectangle with 0 degrees. If you designate any shape other than this, an error occurs. Note (8): The processing object is the screen designated with VISWORKPLN. Note (9): When this command is executed, the process screen 3 (VISWORKPLN 3) is used as a work area and data on the process screen 3 are not guaranteed. Also, you cannot use the process screen 3 for processing.
Chapter 21 Vision Control (Option) Related Terms WINDMAKE, VISWORKPLN, VISGETNUM, VISSTATUS, SHDEFMODEL Example VISSCREEN 1,0,1 VISCLS 0 VISPLNOUT 0 WINDMAKE R,1,512,480,0,2 CAMIN 1 VISWORKPLN 0 SHMODEL 1,0,0,1,80 'Instantaneously draws on drawing screen 0. ' ' 'Sets window 1 to rectangle. 'Obtains a camera image from the storage memory. 'Designates an object to storage memory 0. 'Searches for model 1 and the part whose correspondence 'degree is 80% on the screen.
SHDEFCORNER (Statement) Function Sets the conditions for a corner search. Format SHDEFCORNER , , , Explanation Designates the distance from a pad corner in the corner search. (1 to 10) Designates the space of pads in the corner search (1 to 10). Designates the pad width in the corner search (1 to 10). Designates the pad height in the corner search (1 to 10).
Chapter 21 Vision Control (Option) SHCORNER (Statement) Function Searches for a corner. Format SHCORNER , , , , Explanation Designates the window number (0 to 511). Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479). Designates the detection level in the corner search (0 to 255). Designates an object in the corner search (0 to 7).
Note (1): Designate the process range with a window. Note (2): If the designated window is not positioned on the screen, an execution error will result. Note (3): Only rectangular windows with an angle of 0 degrees can be designated. If you designate any shape other than this, an error occurs. Note (4): The processing object is the screen designated with VISWORKPLN.
Chapter 21 Vision Control (Option) SHDEFCIRCLE (Statement) Function Sets the condition for searching a circle. Format SHDEFCIRCLE , Explanation Designates the clearance between pads for the circle search (1 to 10). Designates the pad width for the circle search (1 to 10). B Pad width A Clearance A circle is detected with an average brightness of 2 pads, as shown in the left figure.
SHCIRCLE (Statement) Function Searches for a circle. Format SHCIRCLE , , , , , Explanation Designates the window number (0 to 511). Designates the X coordinate (0 to 511). Designates the Y coordinate (0 to 479). Designates the radius of the circle to search for (3 to 240). Designates the detection level for the circle search (0 to 255).
Chapter 21 Vision Control (Option) Note (1): Designate the process range with the window. Note (2): If the position of the designated window is not on the screen, an execution error will result. Note (3): The shape of the window available to designate is a rectangle with 0 degrees. If you designate any shape other than this, an error occurs. Note (4): The processing object is the screen designated with VISWORKPLN.
Example VISSCREEN 1,0,1 'Instantaneously draws on drawing screen 0. VISCLS 0 ' WINDMAKE R,1,512,480,0,2 'Sets window 1 to rectangle. CAMIN 1 'Obtains a camera image from the storage memory. VISWORKPLN 0 'Designates an object to storage memory 0. SHCIRCLE 1,0,0,30,128,1 'Searches for a black circle.
Chapter 21 Vision Control (Option) 21.10 Obtaining Results VISGETNUM (Function) Function Obtains an image process result from the storage memory. Format VISGETNUM(, ) Explanation Designates the number of the process result to obtain (0 to 511). Designates the type of the process result to obtain (0 to 9). Note (1): The result contents stored change depending on an image process instruction executed in advance.
VISGETSTR (Function) Function Obtains code recognition result. Format VISGETSTR(, ) Explanation Designates the leading character number to obtain (1 to 611). Designates the number of characters to obtain (1 to 240). Note (1): If the number of characters to obtain is unknown, refer to a the process result for each instruction, Note (2): For this instruction, a µVision board (option) is required.
Chapter 21 Vision Control (Option) VISPOSX (Function) Function Obtains an image process result (Coordinate X) from the storage memory. Format VISPOSX () Explanation Designates the number of the process result (Coordinate X) to obtain (0 to 511). Note (1): This is the same as when the VISGETNUM parameter is set to 1. VISGETNUM (n, 2) = VISPOSY (n) Note (2) : The process results are different from the results stored with previous image processing instructions.
VISPOSY (Function) Function Obtains an image process result (Coordinate Y) from the storage memory. Format VISPOSY () Explanation Designates the number for the processing result (Coordinate Y) to obtain (0 to 511). An obtained value is represented as a single precision real type constant (F type). Note (1): This is the same as when parameter 1 of VISGETNUM is designated to 2.
Chapter 21 Vision Control (Option) VISSTATUS (Function) Function Monitors the process result of each instruction. Format VISSTATUS () Explanation Designates the data to obtain (0 to 2). 0: Execution result status 1: Auxiliary data 2: Processing time An obtained value is represented as a single precision real type constant (F type). Note (1): The obtained data varies depending on the instructions previously executed. Refer to the explanation of each instruction.
VISREFCAL (Function) Function Obtains calibration data (Vision-robot coordinate transformation). Format VISREFCAL (, ) Explanation Designates the number of the calibration data group to use (0 to 31). Designates the number of the calibration data (0 to 11). Note (1): The system can store up to 32 sets of calibration data groups. Note (2): Use a personal computer to set calibration data.
Chapter 22 Appendices
Chapter 22 Appendices 22.1 Character Code Table Table 1. Character Code Table +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F ! ” # $ ~ & ’ ( ) * + , - .
22.2 Figures of the Shoulder, Elbow, and Wrist [ 1 ] Available 32 Figures A 6-axis robot can take different figures for its shoulder, elbow, wrist, 6th axis, and 4th axis for a single point and attitude (X, Y, Z, RX, RY, and RZ) at the end of the endeffector. Figures 1 through 5 show how the robot can take different figures for its shoulder, elbow, wrist, 6th axis, and 4th axis, respectively.
Chapter 22 Appendices (1) Shoulder figure A shoulder figure is defined by a set of the values of the 1st-, 2nd-, and 3rd-axis components. The robot can take two different shoulder figures--Left-handed (LEFTY) and Righthanded (RIGHTY). (J1 to J6 denote Joint 1 to Joint 6.) LEFTY RIGHTY Figure 1. Shoulder Figure (2) Elbow figure An elbow figure is defined by a set of the values of the 2nd- and 3rd-axis components. The robot can take two different elbow figures--Over-handed (ABOVE) and Underhanded (BELOW).
(3) Wrist figure A wrist figure is defined by a set of the values of the 4th- and 5th-axis components. The robot can take two different shoulder figures--Normal (NONFLIP) and Reversed (FLIP). The NONFLIP figure refers to a figure of the robot whose 4th axis is turned by 180 degrees without changing the wrist figure. (J1 to J6 denote Joint 1 to Joint 6.) FLIP NONFLIP Figure 3. Wrist Figure (4) 6th-axis figure A 6th-axis figure is defined by the value of the 6th-axis component.
Chapter 22 Appendices (5) 4th-axis figure The 4th-axis figure is defined by a value of the 4th-axis component. The robot can take two different 4th-axis figures--SINGLE 4 and DOUBLE 4. If the 4th axis rotates by -180°<θ4≤180° in mechanical interface coordinates, the figure is SINGLE 4; if it rotates by 180°<θ4≤185° or -185°<θ4≤-180°, the figure is DOUBLE 4. The robot takes quite different figures when θ4 is 180° or 181°. Take special care when changing any position data fort the 6th-axis figure.
Figure-1 LEFTY, ABOVE, and NONFLIP Figure-2 LEFTY, ABOVE, and FLIP Figure-3 LEFTY, BELOW, and NONFLIP Figure-4 LEFTY, BELOW, and FLIP Figure-5 RIGHTY, ABOVE, and NONFLIP Figure-6 RIGHTY, ABOVE, and FLIP Figure-7 RIGHTY, BELOW, and NONFLIP Figure-8 RIGHTY, BELOW, and FLIP Figure 6.
Chapter 22 Appendices CAUTION: When carrying out a command with CP control, if the robot figures at the start point differ from those saved in programming or teaching, be sure to check beforehand that no part of the robot will not interfere with the surrounding equipment or facilities.
[2] Boundaries of Robot Figures This section describes the boundary of each of the robot shoulder, elbow, wrist, and 6th-axis figures. When judging the boundaries of the robot shoulder, elbow, and wrist, the system uses intersection point Pw of the two rotary axes of the 5th and 6th axes, as illustrated in Figure 7. Figure 7. Location of Pw A boundary point in figures is called a singular point. Any path defined by commands with CP control (e.g.
Chapter 22 Appendices (1) LEFTY/RIGHTY (Shoulder figure) The rotary axis of the 1st axis is defined as the boundary between LEFTY and RIGHTY. When viewed from the normal line on the side of the arm link, if point Pw exists in the left-hand side of the rotary axis of the 1st axis, the figure is LEFTY; if point Pw exists in the right-hand side, it is RIGHTY. In Figure 8, the boundary is drawn with alternate long and short dash lines.
(2) ABOVE/BELOW (Elbow figure) The centerline of the arm link (connecting the shoulder with elbow) is defined as the boundary between ABOVE and BELOW. If point Pw exists in the + side of the centerline, the figure is ABOVE; if point Pw exists in the -side, it is BELOW. In Figures 9 and 10, the boundary is drawn with alternate long and short dash lines. Figure 9. Boundary between ABOVE and BELOW for LEFTY Figure 10.
Chapter 22 Appendices (3) FLIP/NONFLIP (Wrist figure) The rotary axis of the 4th axis is defined as the boundary between FLIP and NONFLIP. If the normal line on the flange surface tilts up the rotary axis of the 4th axis, the figure is FLIP; if it tilts down the rotary axis, it is NONFLIP. In Figures 11 and 12, the boundary is drawn with alternate long and short dash lines. Figure 11. Boundary between FLIP and NONFLIP for LEFTY Figure 12.
(4) SINGLE/DOUBLE (6th-axis figure) If the rotation angle (θ6) of the 6th axis is within the range of -180°<θ6≤180° around the Z axis in mechanical interface coordinates, the figure is SINGLE; if it is within the range of 180°<θ6≤360° or -360°<θ6≤-180°, the figure is DOUBLE. Boundaries exist at -180° and +180°. φ5H7 DOUBLE DOUBLE Boundary SINGLE Figure 13.
Chapter 22 Appendices 22.
22.4 Configuration List The table below lists the items displayed in the User Preferences window of the teach pendant (Access: [F2 Arm]—[F6 Aux.]—[F7 Config.]) or in the Config. tab of the Options window in WINCAPSII (Access: [Arm Manager]—[Tools Menu]—[Options]— [Configuration]). Factory default Powering-on default No.
Chapter 22 Appendices Factory default Powering-on default Control log sampling intervals 8 Last value at powering-off Sampling intervals of control log. Entry range: 8, 16, 24, or 32 ms If a value other than a multiple of 8 is set, the controller automatically modifies it to a multiple of 8. 24 Efficiency of gravity effect (For 6-axis robot) 0 Last value at powering-off 0: Gravity compensation feature disabled 1: Gravity compensation feature enabled Can be set with SetGravity or ResetGravity.
No. Items Factory default Powering-on default Value proper to each robot Last value at powering-off Gain reduction rate for one of J1 to J8 Takes effect when the "Changing accel mode," "Control method" and "High-inertia configuration" are set to 0. Do not change the initial value.
Chapter 22 Appendices No. Items Factory default Powering-on default Description Comments 81 Damper setting rate (RX) (For 6-axis robot) 10000 10000 Damping ratio around the X-axis under compliance control 82 Damper setting rate (RY) (For 6-axis robot) 10000 10000 Damping ratio around the Y-axis under compliance control Cannot be modified with the teach pendant. 83 Damper setting rate (RZ) (For 6-axis robot) 10000 10000 Damping ratio around the Z-axis under compliance control (Ver. 1.
Factory default Powering-on default No. Items 92 Force limit rate (+RX) (For 6-axis robot) 10000 10000 Force control rate around the +X axis under compliance control Can be set with SetFrcCoord. 93 Force limit rate (+RY) (For 6-axis robot) 10000 10000 Force control rate around the +Y axis under compliance control Cannot be modified with the teach pendant. 94 Force limit rate (+RZ) (For 6-axis robot) 10000 10000 Force control rate around the +Z axis under compliance control (Ver. 1.
Chapter 22 Appendices Factory default Powering-on default No. Items 110 Compliance/positional error allowance (RX) (For 6-axis robot) 300 111 Compliance/positional error allowance (RY) (For 6-axis robot) 300 300 Allowable deviation around the Y-axis under compliance control 112 Compliance/positional error allowance (RZ) (For 6-axis robot) 300 300 Allowable deviation around the Z-axis under compliance control (Ver. 1.
J4 brake lock setting (For VM-6083D/ VM-60B1D and VS-E series) 0 Setting of TCP speed pattern (Note 1) 0 198 Restoration of TOOL/WORK data (Note 2) 0 199 Arc interpolation approved value of easy teaching 196 197 0 If the J4 overrides its software motion limit when the brake is released: (Ver. 1.7 or later) 0: Will lock the J4 brake 1: Will not lock the J4 brake Last value at powering-off 0: Conventional speed control 1: Constant TCP speed (Tool end (Ver. 1.
Chapter 22 Appendices 22.5 Reserved Word List You cannot use these reserved words as variable names or label names.
S T U V W X Y Z 22-22 S SEC SELECT SENDKEY SET SETAREA SETVALVE SGN SHADDGROUP SHCIRCLE SHCLRGROUP SHCLRMODEL SHCOPYMODEL SHCORNER SHDEFCIRCLE SHDEFCORNER SHDEFMODEL SHDISPMODEL SHDROPGROUP SHGROUP SHLOADMODEL SHMODEL SHREFGROUP SHREFMODEL SHSAVEMODEL SIN SINGLE SPEED SPRINTF SQR SQRT ST_ASPACLD ST_ASPCHANGE ST_OFFSRVLOCK ST_ONSRVLOCK ST_RESETCOMPCONTROL ST_RESETCOMPERALW ST_RESETCOMPRATE ST_RESETCOMPJLIMIT ST_RESETCOMPVMODE ST_RESETCURLMT ST_RESETDAMPRATE ST_RESETERALW ST_RESETFRCASSIST ST_RESETFRCLI
Chapter 22 Appendices 22.
Conventional language command LABL n PAC COMMAND Remark *labeln. LABL n IPCLR n *labeln. CALL pltResetAll (n) INTRPT INTERRUPT ON REM REM|’ ON n ON n-m SET IO [n] SET IO [n TO m] OFF n OFF n-m RESET IO [n] RESET IO [n TO m] ONT n-m TIME=t SET IO [n TO m], t*10 VON n VON n-m SET IO [n] SET IO [n TO m] VOFF n VOFF n-m ON PLT1END RESET IO [n] RESET IO [n TO m] SET IO [n] Refer to the DIO assignment table. OFF PLT1END ON PLTEND RESET IO [n] SET IO [n] Refer to the DIO assignment table.
Chapter 22 Appendices n Operation Command Correspondence Table Conventional language command PAC COMMAND Remark + + Addition * * Subtraction Multiplication / % / MOD Division Remainder .
Functions to move the coordinate system Although the PAC language does not support coordinate system moving functions (TRANS command) of conventional language commands, you can move the coordinate system with the position operation. For details refer to Part 1 Chapter 1, subsection 1.9.7 “Position Operation”. For the coordinate system, there are methods to use Type P variables and Type T variables, and they can change the work coordinate references and the tool coordinate system references.
Chapter 22 Appendices (Note) The TRANS command is a coordinate system movement command which uses the tool coordinate system as the reference; however, the posture rotation method is different from the tool coordinate system movement command for Type P variable and a Type T variable as follows.
22.7 Version Correspondence Table Expression values used with the VER$ function and the corresponding modules are listed on the table below. For the VER$ function, refer to Part 2 Chapter 12, subsection “12.1.3 VER$ (Function)”.
Chapter 22 Appendices 22.8 Setting Parameter Table n Pac Manager - Program Parameter name Number of Type I variables Macro name Description PC_NO_INT The number of numbered long integer type variables. Number of Type F variables PC_NO_SNG The number of numbered single precision real type variables. Number of Type D variables PC_NO_DBL The number of numbered double precision real type variables. Number of Type V variables PC_NO_VEC The number of numbered vector type variables.
n Arm Manager - Path creation Parameter name Macro name Positive direction software motion limit (J1,deg*10^3) AM_JPRM_PLIM1 Description 1st axis positive direction software motion limit (×1000, unit: degree) Positive direction software motion limit (J2,deg*10^3) AM_JPRM_PLIM2 2nd axis positive direction software motion limit (×1000, unit: degree) Positive direction software motion limit (J3,deg*10^3) AM_JPRM_PLIM3 3rd axis positive direction software motion limit (×1000, unit: degree) Positive d
Chapter 22 Appendices n Vision Manager - General Setting Parameter name Macro name Description Camera 1 - shutter system CA_SHUT1 Camera 1 shutter system (0: field, 1: frame) Camera 1 - input lower limit level CA_LEVEL_L1 Camera 1 input lower limit level Camera 1 - input upper limit level CA_LEVEL_H1 Camera 1 input upper limit level Camera 1 - Camera availability CA_CONNECT1 Camera 1 availability to use (0: avaialble to use, 1: not connected, 2: option, 3: none) Camera 2 - shutter system CA_
Parameter name RS232C(2). Communication priority Macro name COM_RS2_ACCESS Description Communication priority setting of RS232C channel 2 of the controller (0: not available, 1: only reading, 2: read/write available) RS232C(2). Baud rate COM_RS2_SPEED Baud rate setting of RS232C channel 2 of the controller (unit: bps) RS232C(2). Parity (0: even, 1: non, 2: odd) COM_RS2_PARITY Parity setting of RS232C channel 2 of the controller (0: even, 1: non, 2: odd) RS232C(2).
Index
A Absolute Motion .......................................................3-1 Acceleration Setting ..................................................4-2 Angle Component .................................................15-37 Angle Conversion .................................................15-19 Approach vector assignment ...................................8-12 Arc Interpolation Control........................................3-13 Area(vision control) ..................................................
H N Hexadecimal Format ...............................................7-13 Histogram(vision control) .........................................5-4 Home Position Assignment Statement ....................8-12 Homogeneous Transformation Assignment Statement... ............................................................................8-12 Homogeneous transformation type assignment.......8-12 Name ........................................................................ 7-3 Numeric Value......................
R T Rectangle window.................................................21-17 Relation between level and edge...........................21-61 Relational Operator .................................................7-17 Repeat ........................................................... 8-14, 11-9 Reserved Word ..........................................................8-5 Reserved Word List...............................................22-21 Result Obtaining Commands ..................................
Vertical articulated V*-D/-E SERIES Horizontal articulated H*-D SERIES Cartesian coordinate XYC-4D SERIES Vision device µVision-21 SERIES PROGRAMMER’S MANUAL I PROGRAM DESIGN AND CAMMANDS (Ver. 1.