Toggle Switch Drawing Method

Available in all applications

Used by:   Selector Switch

 

The Toggle Switch drawing method, one of the native drawing methods for Selector Switch tags, is a control method used to output one of two possible values. The values will be those configured for the first two of the three positions of the selector switch, 0 to 1.

 

A variety of switch images are available in the Selector Switches bitmaps group. A few of the available choices are shown here (for every On image there are matching images for the Off state and the Invalid state, drawn in the same style).

The color and bitmap choices work the same way as an Image Change Drawing Method.  In addition to the images from the Selector Switches bitmap group, you can use any image that has a color indicator region defined within it (pump and motor images commonly include these indicator regions).  This will allow you to use an equipment image as a toggle button in your application.  You could also choose to not use any bitmap, and simply place the rectangular drawing area over a region of Orange 241 to create a custom control toggle.

 

To indicate to the operator that the image is a button, a hotbox is drawn around it.  A hotbox is commonly understood to define an area that can be clicked upon as a control action.

 

In the event that the position feedback from the selector switch indicates that the actual position is not the same as the requested position, the border of the image will blink using the mismatch color. You should select a color that stands out clearly on your page background, but red is not advised since it is commonly understood to mean that an alarm has been triggered.

 

The switch works by toggling between states 0 and 1 whenever the operator clicks on the button.  Should the tag be in an invalid state (which will not be unusual when a selector switch is first created) then it is not clear whether the first click should move the switch to the state 0 or the state 1 position.  For this reason, a dialog will prompt the operator for an initial position, using the terms you provide in the Selection Dialog area.

 

Selecting the Confirmation Dialog option will force the operator to confirm each click on the button by selecting OK or Cancel from a dialog.

(Click title to expand text)

Tag

The Tag field displays the name and description of the tag that is currently associated with this drawing method.  You can use this to select a different tag or parameter to use as the data source for this drawing method.

The Tag field is only present when editing a completed drawing method object

Use State 0 Bitmap For All States

Check this box if you wish to use the image selected for State 0 for all states of the tag.

This option is often used when the selected image's indicator area (the small rectangle at its base) is to change color according to the state of the tag.

State x Color

Opens the Select Color Dialog, from which you can choose a color to be displayed when the tag’s value is in the corresponding state.

State x Bitmap

Opens the Select Bitmap dialog, from which you can choose an image to be displayed when the tag’s value is in the corresponding state.

Bitmap Not Req'd

The Bitmap Not Req'd checkboxes corresponding to each of the possible tag states, are used to indicate that an image is not required to represent the associated state. For example, if you are using this drawing method to overlay an area of Orange 241 with a  color, you could select this option to ensure that the image change does not add its own bitmap to the page.

Invalid Color

Provides the same function as State x Color for the case when the tag’s value is Invalid.

Invalid Bitmap

Provides the same function as State x Bitmap for the case when the tag’s value is Invalid.

Hotbox Color

When the operator moves the mouse pointer over the Toggle Switch image, a hotbox will appear to help indicate that this is a control that can be clicked.  Use this option to select the hotbox color.

Mismatch Color

If the associated Selection Switch tag detects that the actual position of the switch is not the same as the position that the operator requested, a box of the mismatch color will blink around the switch image to indicate a problem.  The color selected for this should provide a good contrast from the page background, and should also be a color that the operator will associate with a problem condition.

Selection Dialog (State 0 Text and State 1 Text)

If the selector switch starts from an invalid or unknown position, it must determine which state the operator intends, the first time that it is clicked.  The Selection Dialog will be displayed with the text you enter for State 0 and State 1 to prompt the operator upon first click.

Confirmation Dialog

Select this option if you want the operator to have to confirm each control action from this object.