SET node can set the states of I/O, and modify the type and value of variables. When passing through this node, all parameters in the node will be changed to the set result.
Set Variables #
In the application of variables, the SET Node can add and subtract variables, associate with the IF Node to select the path, or interrupt the infinite path of the project. As shown below, set an integer type of variable count=0. Each time it passes through the SET Node, the count value is incremented by 1.
Note: var_ represents local variables, g_ represents global variables.
Syntax Meaning #
a+=b <====> a=a+b
a−=b <====> a=a−b
a∗=b <====> a=a∗b
a/=b <====> a=a/b
a=b <====> Specifies the value of a is b
NOTE: Point, Base, TCP, VPoint, IO, Robot, and FTSensor in the flows are now parameterized, and users can write variables as parameters to the objects and read from the parameters for calculations or applications with their types, Name/IDs, and attributes. For more details, refer to the manual of Expression Editor and Listen Node.
Digital IO #
Status IO is used when the project is stopped or in error. The status of the IO is changed to the set value according to these conditions and can be accessed from the Project Function Menu. Click the icon “Set IO while Project Errors” or “Set IO while Project Stops” to access the setting page.
Analog IO #
The SET Node can also set the Analog IO such as enabling Analog IO while passing through the SET Node and giving the external device a specific voltage until a different node terminates the output voltage.