KB-33392: WhilePressed event in E3.

Question:

How can I set a button in E3 to display the same functionalities as when SCADA’s WhilePressed event is on? (The goal here is to be able to increase/decrease a tag’s value when the button is pressed).

Solution:

To do so, you must use E3’s SpinButton. This button displays two events, called SpinDown() and SpinUp(), which are fired when the button is pressed down or up, respectively.

With SpinDown() event, you can use the following script to spin down the value of a tag called Internal:

Application.GetObject(“Data.Internal”).Value = Application.GetObject(“Data.Internal “).Value – 1

With SpinUp() event, you can use the following script to spin up the value of a tag called Internal:

Application.GetObject(“Data.Internal “).Value = Application.GetObject(“Data.Internal “).Value + 1

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 *