omron — SELECT program instruction

SELECT program instruction As an example, if robot #2 is selected by a SELECT instruction, all motion instructions executed by the current task are directed to that robot (until another SELECT instruction is issued). Also, all robot-related functions (such as HERE) return information about robot #2. NOTE: As a convenience, when task #0 is executed, robot #1 is automatically selected and attached when program execution begins. In order for any task to change its selected robot, no robot can be attached by the task. More than one task can have a particular robot selected, but only one task can have a robot attached.

If a robot is already attached to a different task, an ATTACH waits or generates an error (depending on the mode parameter for the ATTACH instruction). SELECT VISION In a system with multiple vision systems, this instruction selects the vision system with which the current task is to communicate. (The SELECT monitor command specifies which vision system the eV+ monitor is to access.) This program instruction specifies which vision system receives vision instructions (for example, ENABLE VISION) and also which system returns vision-related information (for example, from the VSTATUS function).

The vision system currently selected by the monitor is automatically selected when a program begins execution. SELECT FORCE In a system with multiple force sensors, this monitor command or program instruction selects the force sensor with which the current task is to communicate. The SELECT monitor command specifies which force sensor the eV+ monitor is to access. The program instruction specifies which force sensor receives force instructions (for example, FORCE.READ) and returns force sensor-related information (for example, for the LATCH function). Each time a program task begins execution, force sensor #1 is automatically selected.

Example SELECT ROBOT Example Program The following program selects robot #3 and moves it. This program is normally not executed by task #0, since that task is attached to robot #1 by default. .PROGRAM test() SELECT ROBOT = 3 ;Select robot 3 ATTACH (0,1) ;Get control of robot 3 without waiting IF IOSTAT(0) 0 THEN TYPE /B, "Error attaching robot: ", $ERROR(IOSTAT(0)) PAUSE END MOVE x ;Move robot 3 to location "x" MOVE y ;Move robot 3 to location "y" eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 457