This page provides a detailed overview about User Variables.
Contents
User Variables
The User Variables Panel is used to create, edit, and delete user generated variables.
Benefit
Variables can be used for several purposes, one of the more common is counters and flags to control the flow of logic in a task. Use the Set To node to set variables, and use the Do If and Wait Until nodes to make decisions based on the value of the variables.
Inside the Panel
At the creation of a task the User Variables Panel will be empty.
Once a variable has been added it will show in the Panel along with its current value or state. It is possible to set the value of the variable from the User Variable Panel by clicking on Set Value and setting the desired value.
Adding a User Variable
Click +Variable to create the first user defined variable.
- Name - User defined name
- Data Type - Integer, Float, Boolean, String, Length, Mass, Time, Linear Force, Torque, Translational Speed, Rotational Speed
- Data Source - Source of the default value. Reference Another Item will take the value of the other signal or variable selected. The two must be of the same data type. Parameter passes values in/out of the task.
- Default Value - If "Value" was selected as the Data Source, this is the initial value for the variable unless otherwise assigned.
- Parameter Direction - If "Parameter" was selected as the Data Source, select if the variable would send data out or pass data into the task.
- Referenced Item - If "Reference Another Item" was selected as the Data Source, select the variable or signal to be used as the default value.
Once all fields are specified, save can be selected. The saved User Variable will appear along with its current value. Immediately after creation this value will be the Default Value that the user set when adding the variable. A User Variable can be edited by clicking on the variable name.
Any subsequent variables can be added by clicking on the + at the top right corner of the panel and following the same instructions as above.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article