Example: Use a maintained push button
In this example, the maintained push button controls the type of label to print for the bag filler machine. The machine can print labels with metric or imperial weights.
If the operator controls the type of label to print
- Create a maintained push button with the caption "Metric selected" for State 0 and "Imperial selected" for State 1.The application monitors the tag you assign to the Value connection to control the label print mode.If the operator presses the button to change the mode, the value of the Value connection changes, and the machine switches modes.
If a supervisory system controls the type of label to print
If the label print mode can also be set by a supervisory system, the operator must be able to view the application’s local display to see which mode the machine is currently using.
- In this case, set the "Next state based on" option to Value. This causes the application to read the Value connection and update the button’s state before changing to the next state.
- Assign the same tag to the Value connection and the Indicator connection. This ensures that the maintained push button always displays the current printing mode.
Provide Feedback