omron — DEVICE real-valued function

DEVICE real-valued function DEVICE real-valued function Syntax DEVICE (type, unit, error, p1, p2,... ) Function Return a real value from a specified device. The value may be data or status information, depending upon the device and the parameters. Usage Considerations The syntax contains optional parameters that may be useful only for specific device types and information requests. 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 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, which indicates if this function succeeded or failed. If this parameter is omitted, any device error stops program execution. If error is specified, the program must check it to detect errors.

p1, p2, ... Optional real values that are sent to the device as part of the request. The number of values specified and the meanings of the values depend upon the particular device type. eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 173