KB-34475: Opening or closing a screen according to a tag’s value.

Question:

How can I execute a script to open a screen whenever a Boolean tag’s value is 1 (one), and close it when it is 0 (zero)?

Solution:

To do so, follow these procedures:

  • In the Boolean Tag, add an Alarm in High with value = 1
  • In the Scripts window, create the following script in the OnAlarm event to open the screen: Screen.Show()
  • Create a script in the OnAlarmReturn event to close the screen: Screen.Hide()

Thus, whenever the tag’s value is equal to 1 (one), the screen opens; whenecer it is equal to 0 (zero), it is closed.

Print Friendly, PDF & Email

Este artigo foi útil? Was this helpful?

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

Leave a Reply

Your email address will not be published.Required fields are marked *