DETACH program instruction DETACH program instruction Syntax DETACH ( logical_unit ) Function Release a specified device from the control of the application program. Usage Considerations Detaching the robot causes a BREAK in continuous-path motion. DETACH automatically forces an FCLOSE if a disk file or graphics window is open on the specified device. The robot is automatically attached to task 0 when the EXECUTE monitor command or program instruction is processed to initiate that task and the DRY.RUN system switch is disabled. All the other logical units are automatically detached when program execution begins.
(Other events that cause automatic detachment are listed below.) Parameter logical_unit Optional real value, variable, or expression (interpreted as an integer) that identifies the device to be detached. (See the ATTACH instruction for a description of logical unit numbers.) The parentheses can be omitted if the logical unit number is omitted (causing the robot to be detached). Details This instruction releases the specified device from control by the application program. (No error is generated if the device was not attached.) Control of the specified device can be returned to the program with the ATTACH instruction.
When logical_unit is 0 (or is omitted), the program releases control of the robot. While the robot is detached, robot power can be turned off and on, the pendant can be used to move the robot, and a different robot can be selected (if more than one robot is connected to the system controller). A delay of one system cycle (16 ms) occurs when a robot is detached. This is useful for applications that require you to define where the robot should be located for certain operations. For such tasks a teaching program can DETACH the robot and then output directions to you on the system terminal or the pendant. You can then use the pendant to move the robot to the desired locations.
The system terminal or the pendant can be used for accepting input from you (the latter can be read by using the PENDANT function). eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 169