omron — Example

V+ Remote Library Documentation ; Read multiple values from multiple objects $objects[0] = "/Numeric Variable" $variables[0] = "Current Value" $objects[1] = "/Numeric Variable 2" $variables[1] = "Current Value" CALL rm.read.anums($objects[], $variables[], 1, values[], status) IF (status TYPE "Unable To Read Value: ", status PAUSE END TYPE $objects[0], ".", $variables[0], " = ", values[0] TYPE $objects[0], ".", $variables[1], " = ", values[1] .END rm.read.num($object, $variable, wait.time, value, status) Abstract Read a numeric property variable associated with an object on the PC. The variable referenced must be a numeric type.

Input Parameters Parameter Description $object The name of the remote object to access. This must include the full path name of the object to access. e.g. "/directory/Robot 1" $variable The name of the variable to access wait.time The amount of time to wait for the execution to complete Output Parameters Parameter Description value The value of the variables status Status of the operation:

0 = success, Example .PROGRAM ex1.rm.vars.n() AUTO $object, $variable AUTO REAL value, status ; Write a value of 10 to the numeric variable in the workspace $object = "/Numeric Variable" $variable = "CurrentValue" value = 10 CALL rm.write.num($object, $variable, 1, value, status) IF (status TYPE "Unable To Write Value: ", status PAUSE END ACE Reference Guide, 18317-000 Rev A Page 828