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