A selector switch can be used as the basis for an H-0-A control. In this example, the switch will write to the first two digital addresses of a Modicon driver. A digital status will be used to monitor and provide feedback for the switch actions.
To summarize the actions of the switch as simply as possible, what it will do is the following:
When in Hand mode, it will write a 1 to digital address A and a 0 to address B.
When in Auto mode, it will write a 1 to digital address B and a 0 to address A.
When in Off mode, it will write a 0 to both addresses A and B.
If you do not have an application where you can try this example, please refer to the instructions in Build a ModBus Virtual PLC. The following instructions will assume that you are using the virtual modbus driver from that example. If you have an application that includes a driver, simply substitute where appropriate.

In this example, the purpose of the digital status tag, DigiStatus1, is simply to show the effect of operating the selector switch, SelTest1. The techniques you learn from this example may be applied as needed.
1. Add a new digital status tag. Name it DigiStatus1.
2. In its I/O tab, set the site to your driver tag (e.g. FakeModbus).
3. Set the Bit 0 address to 1.
4. Set the Bit 1 address to 2.
5. Click OK to save the tag.
6. Draw it on the page as a Text Change method.
7. Set the state 0 text to be “Off”, the state 1 text to be “Hand” and the state 2 text to be “Auto”.
8. Add a new selector switch tag. Name it SelTest1.
9. In the I/O tab, select your driver.
10. For the source of the feedback, select the tag DigiStatus1.
11. Leave the switch position feedback blank.
The primary feedback verifies that, when the switch is in position X, the specified address contains the expected value.
The switch position feedback should be capable of outputting a 0, 1 or 2, corresponding to positions 0, 1 or 2. A change in the position feedback’s value will cause the selector switch’s drawing method to change to that position, but will not cause the selector switch tag to output the matching value. Changing the selector switch drawing method to a position other than that indicated by the feedback will cause the tag to output the matching value for that position, but the drawing method will blink, indicating that the requested position does not match the actual position as indicated by the feedback.
12. Ensure that the checkbox, Use Single Output Address is not checked.
Each position of the switch will write to a different address.
13. Set the Value When Off field to be 0.
This is an important step. It tells the selector switch to write a 0 to the addresses not currently selected. Advance to the Positions tab of the properties dialog.
14. Select Position 0 to configure.
Position 0 will correspond to “Hand” or “On”.
15. Set the expected value at position 0 to be a constant 1.
16. Set the output value for position 0 to also be a constant 1.
17. Set the address for position 0 to be 1.
This matches the Bit 0 address of the digital status tag.
18. Select Position 1 to configure.
Position 1 will correspond to the “Off” position of the switch.
19. Set the expected value at position 1 to be a constant 0.
20. Set the output value for position 1 to be 0, or “No Tag Selected”.
21. Set the address for position 1 to be blank.
You may wonder how “Off” will work when there is no address to output to. Recall that the target tag (the digital status tag) has two addresses – one for switch position “Hand” and one for switch position “Auto”. Recall also that in step 12, you set the Value When Off field to be 0. This value is written to all addresses other than the currently selected one. Thus, when the switch is in Hand position, 0 will be written to the Auto address. When the switch is in Auto, 0 is written to the Hand address. And, when the switch is in neither Hand or Auto position, 0 will be written to both.
22. Select Position 2 to configure.
Position 2 will correspond to “Auto”.
23. Set the expected value at position 2 to be a constant 2.
24. Set the output value for position 2 to be a constant 1.
25. Set the address for position 2 to be 2.
This matches the Bit 1 address of the digital status tag.
26. Click on OK to finish creating the tag.
27. Draw the new tag as a Selector Switch.
The system should work as shown in the images at the beginning of the example.