Vai al contenuto

Global event execution behaviour

To execute a global event, the specified condition must change from a FALSE state to a TRUE state. If the condition remains in TRUE state, it will never be executed again.Example:conditiongqt_TimeSecond <> myCopyaction to execute (script)myCopy = gqt_TimeSecond;variab1 = variab1 + 1;Note: gqt_TimeSecond is connected to the system date/time and is updated automatically.The system checks the condition only when one of the contained variables (in this case: gqt_TimeSecond and myCopy) changes.When gqt_TimeSecond changes, if the condition is true, the associated event is executed once and the condition status is set to “TRUE”.When, at later time, gqt_TimeSecond changes again, the condition is verified again but, assumed that it is already in “TRUE” state, the associated script won’t be executed.In the described case, to execute a script every second, it’s necessary to declare 2 conditions, alternative one each other, (if one is FALSE the other one must be in TRUE state), then execute 2 identical scripts (the same script repeated in both conditions). In the example, the 2 alternative conditions would be:gqt_TimeSecond % 2 = 0andgqt_TimeSecond % 2 <> 0