09-21-2018 07:39 AM
Hi,
I want to give every five seconds a new variable. How can I change the variable(which I have written in global Variablen) every 5 second with help of action modul?
Could anyone help me to solve this problem?
Thank You very much.
Vahid
10-10-2018 08:54 AM - edited 10-10-2018 09:06 AM
In the Action module choose <DASYLab> as receiver.
Action is "Variable + Wert". ("Variable + Value" for the English speaking folk. 🙂 )
Parameter 1 is the number(!) of the variable, e.g. "2".
Parameter 2 is the value to add to the variable.
Be cautious when entering something into the textfield for Parameter 1. The number of the variable is expected, the NUMBER! So, if you right-click the textfield to select a variable from the list, something like ${VAR_2} is entered into the textfield.
That is NOT want you want!
This will make DASYLab look for the value that is is currently the content of VAR_2, e.g. 123.00. Then, the action will increase the value, that is in variable no. 123, by the value given by Parameter 2.
If a variable was given a name, e.g. variable no. 2 is called CURR_WEIGHT, and you right-click the textfield to select from the list, ${CURR_WEIGHT} is entered into the textfield.
Example:
If you want to add value 4.4 to variable 2, named CURR_WEIGHT, with that action, you have to remove the $, {, and } characters!
A)
Current content of variable 2 is 123.00.
Action: Variable + Wert (Value)
Parameter 1: CURR_WEIGHT or just 2
Parameter 2: 4.4
--> will add 4.4 to the value of variable 2 --> 127.4
B)
Current content of variable 2 is 123.00.
Action: Variable + Wert (Value)
Parameter 1: ${CURR_WEIGHT} or ${VAR_2}
Parameter 2: 4.4
--> will add 4.4 to the value of variable 123!!