Hello everyone,
Thank you in advance for your time and insights on this topic. I am looking to control an integer tag on a PLC that represents different modes of program operation, with values ranging from 1 to 5. Specifically, a value of 2 indicates "Manual Mode."
I need to implement a toggle switch on the user interface that allows users to switch between "Auto" and "Manual." The desired behavior is as follows:
- When the tag is set to 2, the toggle switch should indicate "Manual."
- When the tag is set to 1, 3, 4, or 5, the toggle switch should indicate "Auto."
Additionally, I require this link to be bi-directional:
- If the toggle switch is set to "Auto" and you change it to "Manual," the tag should set to 2.
- Conversely, if the toggle switch is set to "Manual" and you change it to "Auto," the tag should set to 1.
I would appreciate any guidance on the best approach to establish this functionality.
Thank you!