How the maintained push button works at runtime

This button works like a hard-wired switch. When the operator first presses the button, it changes from State 0 to State 1 and sends the State 1 value to the data source. When the operator presses and
releases
the button a second time, it changes from State 1 back to State 0 and sends the State 0 value to the data source.
The maintained push button’s behavior at runtime also depends on how you set up the
Next state based on
option and connections.
Changing states
  • The application uses the
    Next state based on
    option (specified in the General tab of the Maintained Push Button Properties dialog box) to determine how to change the button’s state.
  • If
    Next state based on
    is set to Value connection, and the connection’s value does not match either state’s value, the button is set to State 0 and the application writes the State 0 value to the data source.
Using connections
  • If you assign just the Value connection and not the Indicator connection, the button’s state is displayed as soon as the button is pressed. The feedback for this control is local and immediate. It does not necessarily reflect the value of the Value connection in the data source.
  • If you assign the same tag to the Value and Indicator connections, at runtime the displayed button state is based on the Indicator connection. If network traffic is heavy, the display response might be delayed.
  • If the Indicator connection value is a floating point value, the application rounds the value to the nearest integer to determine the state to display.
Starting applications
  • When an application starts up at runtime, including starting after a reboot, the application reads the Value connection and sets the button to this state, regardless of the
    Next state based on
    setting.
Opening graphic displays
  • When you open a display at runtime, the application reads the button’s Value connection. If the Indicator connection is not assigned, the displayed state is based on this value.
  • When you open a display at runtime, the application reads the value of the Indicator connection and updates the display based on the value.
    If the value does not match either state's value, the error state is displayed. When the operator presses the button, it changes to State 0.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal