Example: Use a momentary push button

In this example, the momentary push button controls the state of a valve. The valve can be open, closed, or partially open.
The first example creates a momentary push button for a valve that is normally open. That is, the valve is open when the button is not pressed and closed when the button is pressed.
The second example creates a momentary push button for a valve that is normally closed. That is, the valve is closed when the button is not pressed and open when the button is pressed.
The third example creates a momentary push button for a valve that is normally closed and opens on 50% when the button is pressed.
To set up a push button for a valve that is normally open:
  1. Create a momentary push button and select the "Normally open" button action.
  2. Add the caption "Open" for State 0 and "Closed" for State 1.
  3. Assign a tag to the Value control.
    When the operator presses the button, the application sets the button to State 1 and the caption changes to Closed. The data source registers the change to the tag assigned to the Value connection and closes the valve.
    When the operator releases the button or the hold time has elapsed, whichever is later, the application sets the button to State 0 and the caption changes to Open. The data source registers the change to the tag assigned to the Value connection and opens the valve.
To set up a push button for a valve that is normally closed:
  1. Create a momentary push button and select the "Normally closed" button action.
  2. Add the caption "Closed" for State 0 and "Open" for State 1.
    When the operator presses the button, the application sets the button to State 1 and the caption changes to Open. The data source registers the change to the tag assigned to the Value connection and opens the valve.
    When the operator releases the button or the hold time has elapsed, whichever is later, the application sets the button to State 0 and the caption changes to Closed. The data source registers the change to the tag assigned to the Value connection and closes the valve.
To set up a push button for a valve that is normally closed and open 50% when the button is pressed:
  1. Create a momentary push button and select the Value button action.
  2. Change the value for State 0 to 100 and the value for State 1 to 50.
  3. Add the caption "Closed" for State 0 and "Open 50%" for State 1.
    When the operator presses the button, the application sets the button to State 1 and the caption changes to Open 50%. The data source registers the change to the tag assigned to the Value connection and opens the valve 50%.
    When the operator releases the button or the hold time has elapsed, whichever is later, the application sets the button to State 0 and the caption changes to Closed. The data source registers the change to the tag assigned to the Value connection and closes the valve.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal