omron — ATTACH program instruction

ATTACH program instruction ATTACH program instruction Syntax ATTACH (lun, mode) $device Function Make a device available for use by the application program. Usage Considerations The robot is automatically attached when the EXECUTE monitor command or program instruction is processed for task 0 (except when the DRY.RUN system switch is enabled). All the other logical units are automatically detached when program execution begins. If the system terminal or the pendant was attached when a program stopped executing, it is automatically reattached if execution of the program is resumed with the PROCEED, RETRY, SSTEP, or XSTEP commands.

Parameters lun The logical unit number to associate with the attached device. The interpretation of this parameter depends on the value of the mode parameter, as follows: If bit 3 of the mode parameter is 0, this parameter is optional (defaulting to 0, to attach the robot); and it can be a real value, variable, or expression (interpreted as an integer) in the range 0 to 24 that specifies the logical unit to be attached. See the Details section for the default association of logical units with devices. If the logical unit specified is not 0, you can use the $device parameter to override the default device for the logical unit.

If bit 3 of the mode parameter is 1, this parameter is required and must be a real variable. In this case, the eV+ system attaches the device specified by the $device parameter and automatically assigns a logical unit number to this parameter. If all the logical units are in use, the parameter is set to -1 . eV+ assigns a value to the lun parameter even if the ATTACH request fails. mode Optional real value, variable, or expression (interpreted as a bit field) that defines how the ATTACH request is to be processed. The value specified is interpreted as a sequence of bit flags as detailed below. All the bits are assumed to be clear if no value is specified.

Bit 1 (mask value = 1) - (LSB) Queue (0) versus Fail (1) eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 67