[Next] [Previous] [Up] [Top] [Contents] [Index] |
Chapter 7 Controllers
Toggle buttons are available in EDD/DM as of version 2.2. They are used to "toggle" a channel off or on, i.e., change its value to 0 or 1. When the operator first presses or toggles the button at run-time, the button is toggled to the "on" state. The button will then change appearance and look "toggled on", until the operator next presses it and it is toggled to the "off" state. The toggle button will only work when connected to enumerated fields.
The toggle button can specify strings to send to the channel. Recall that for most discrete channels such as binary records, each state value has a corresponding string. Toggle buttons can send two strings. The record support routine for that record will read the string sent to it and convert the value of the record to the corresponding state value. You can specify these state strings in the 'zero label' and 'one label' property. The 'one label' property is the string sent when the button is toggled on, and the 'zero label' property is the string that is sent when the button is toggled off. For multi-bit binary channels, the labels do not necessarily have to correspond to the 1 or 0 state; they can correspond to the 12th or 13th state, for instance.
When no label properties are specified, the toggle button simply sends a 1 when toggled on and a 0 when toggled off. The toggle button will also display the string corresponding to the enumerated state. So, for instance, if a multi-bit binary output specifies "enabled" in its ZRST (zero string) field and "disabled" in its ONST (one string) field and the label properties are left blank, at run-time, the button will say "disabled" when the device is toggled on and "enabled" when the button is toggled off, as in Figure 7-15.
The 'label type' property, the high and low display limit properties, and the 'precision' property, have no significance for toggle buttons and can be left blank. For more information on the position and size properties, see Chapter 4, Creating and Manipulating Objects. For more information on the color rule properties, see Chapter 3, Working With Templates And Color Rules. For more on the run-time use of toggle buttons, see Chapter 9, DM: Run-time Operation.
EDD/DM User's Manual, 2.4 - 27 MARCH 1997 [Next] [Previous] [Up] [Top] [Contents] [Index]
L O S A L A M O S N A T I O N A L
L A B O R A T O R Y