omron — Example

V+ Remote Library Documentation ; Read the variable and ensure it is the same value CALL rm.read.num($object, $variable, 1, value, status) IF (status TYPE "Unable To Read the Value: ", status PAUSE END IF (value 10) THEN TYPE "The update did not succeed" PAUSE END .END rm.read.nums($object, $variables[], wait.time, values[], status) Abstract Read a list of numeric property variables associated with an object on the PC. The variable referenced must all be numeric types. 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" $variables[] The names of the variables to access wait.time The amount of time to wait for the execution to complete Output Parameters Parameter Description values[] The values of the variables status Status of the operation: 0 = success, Example .PROGRAM ex1.rm.vars.ns() AUTO $object, $objects[1], $variables[1] AUTO REAL values[1], status ; Read multiple values from multiple properties of the same object $object = "/Numeric Variable" $variables[0] = "Current Value" $variables[1] = "IsBoolean" CALL rm.read.nums($object, $variables[], 1, values[], status) IF (status TYPE "Unable To Read Value:

", status PAUSE END TYPE $variables[0], " = ", values[0] TYPE $variables[1], " = ", values[1] ACE Reference Guide, 18317-000 Rev A Page 829