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.str($object, $variable, wait.time, $value, status) Abstract Read a string property variable associated with an object on the PC. The variable referenced must be a string 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 variable status Status of the operation:

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