omron — SETDEVICE program instruction

SETDEVICE program instruction SETDEVICE program instruction Syntax SETDEVICE (type, unit, error , command) p1, p2, ... Function Initialize a device or set device parameters. (The actual operation performed depends on the device referenced.) Usage Considerations The syntax contains optional parameters that apply only to specific device types and commands. Parameters type Real value, variable, or expression (interpreted as an integer) that indicates the type of device being referenced. The following types are currently available:

0 = Belt encoder 1 = (Not used) 2 = Force Processor Board (for Omron Adept use only) 3 = Robot device (i.e., servo, for Omron Adept use only) 4 = Vision 5 = 1394 bus (for Omron Adept use only) unit Real value, variable, or expression (interpreted as an integer) that indicates the device unit number. The value must be in the range 0 to (max -1), where max is the maximum number of devices of the specified type. The value should be 0 if there is only one device of the given type. error Optional real variable that receives a standard system error number that indicates if this instruction succeeded or failed. If this parameter is omitted, any device error stops program execution.

If an error variable is specified, the program must explicitly check it to detect errors. command Real value, variable, or expression that specifies which device command or parameters are being set by this instruction. Some commands are standard and recognized by all devices. Other commands apply only to particular device types. p1, p2, ... Optional real values, variables, or expressions, the values of which are sent to the device as data for a command. The number of parameters specified and their meanings depend upon the particular eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 467