KB-32901: Firing OnValueChanged event.

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.

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

Classificação média - Average rating 0 / 5. Count: 0

,

Deixe seu Comentário

Seu endereço de e-mail não será publicado. Campos marcados com asterisco são obrigatórios *