Question:
When is a Boolean tag’s OnValueChanged event fired? Can I run a script that fires it only when its value changes from 0 to 1, but not otherwise?
Solution:
OnValueChanged event fires whenever there is a change in value; that is, it fires whenever tag value oscillates either from 0 to 1 or from 1 to 0.
If you need to run a script firing it only when its value changes from 0 to 1, but not from 1 to 0, you will need to add an IF command to the script: IF tag == 1.