How to link two tags to a Wonderware on/off switch: Troubleshooting and setup advice

Question:

Looking for guidance on linking two tags to a Wonderware on/off switch? The current setup isn't working as expected. I need the on/off bypass switch to activate two separate PLC tags. I've set this up as an action script, but it might be the wrong type. In the script, I have specified that on a Left Click/Key/Touch Down action, both tags should be set to a "true" state: Tag#1 = 1 and Tag#2 = 1. When the bypass switch is turned off, both tags should be set to a "false" state: Tag#1 = 0 and Tag#2 = 0. Any assistance with the script and action for the on/off switch would be greatly appreciated. Thank you.

Top Replies

Do the two tags belong to separate Programmable Logic Controllers (PLCs)?

If you are having trouble getting it to function properly, try initiating the trigger in the Programmable Logic Controller (PLC). This can help resolve any issues and make sure everything is running smoothly.

I inquired about the proximity of the two tags within the same Programmable Logic Controller (PLC) because in that case, only one tag is necessary. Although I am not well-versed in Wonderware, I believe that creating a script triggered by the switch position would entail setting Tag#1 and Tag#2 to TRUE. In a separate script, Tag#1 and Tag#2 would need to be set to FALSE to achieve desired functionality.

The two tags are situated in separate programmable logic controllers (PLCs). When the on/off switch is toggled, both tags must be set to true, and switched back to false when in the off position. Thank you for your assistance.

Try using an Action Script with a "mouse up" event instead of a "Touch Down" action. This tends to work better with Wonderware switches since it waits for the button release to execute the event. Also, verify that there is no security override on those tags, as this could prevent changes from taking effect. Another common issue is misunderstanding between binary(0/1) and boolean(False/True) values, so ensure that your PLC variables accept the binary format you're using.

It looks like you’re on the right track with action scripts. It's possible that the issue might be from the PLC end. Do ensure that your PLC program is set to accept and process the changes as they come in from Wonderware. Mostly, Tag#2 might not be properly setup in the PLC. Another thing to check is, make sure the security settings in Wonderware are not preventing this action from taking place. Lastly, you can try setting the script to activate on "Touch Up" instead of "Touch Down." This ensures that the signal is sent when the user finishes pressing the button, which can sometimes solve issues like these.

It seems like your action script is almost on the right track, but be sure to check if you've structured it correctly. Wonderware might not execute both commands simultaneously which could be why you're having issues. You could consider creating an intermediary tag that would dictate the behavior of your two main tags. So when you flip your bypass switch, it changes the state of this intermediary tag, which in turn, would then change the state of Tag#1 and Tag#2. It adds an extra step but it might just give you the synchronicity you're looking for. Also, don't forget to include error handling in your script for undesired or unexpected input states.

Hey there! Your plan sounds correct to me on the surface, but the devil is in the details. Are you certain the tags you're using are each configured correctly on the PLC side? If you're not getting expected behavior, you may wish to run tests on individual tags to verify proper response. One sticking point might be the off states - while it might make sense logically to set them to '0', you'll want to ensure your PLC and Wonderware are actually recognizing '0' as a 'false' state. Some systems, for example, might not differentiate between '0' and 'OFF'. If these checks don't solve your issue, you might need to look into the tag updates, or possibly explore using a separate script for each tag. Good luck!

More Replies β†’

Streamline Your Asset Management
See How Oxmaint Works!!

βœ…   Work Order Management

βœ…   Asset Tracking

βœ…   Preventive Maintenance

βœ…   Inspection Report

We have received your information. We will share Schedule Demo details on your Mail Id.

To add a comment, please sign in or register if you haven't already..   

Frequently Asked Questions (FAQ)

FAQ: 1. How can I link two tags to a Wonderware on/off switch?

Answer: - To link two tags to a Wonderware on/off switch, you can set up an action script specifying the desired states for each tag when the switch is activated or deactivated. Ensure that the script is correctly configured to update both Tag1 and Tag2 accordingly.

FAQ: 2. Why is the current setup not working as expected for linking two tags to a Wonderware on/off switch?

Answer: - The current setup may not be working as expected due to a potential issue in the type of action script being used. Verify that the script is correctly programmed to activate both tags to a "true" state when the switch is on and set them to a "false" state when the switch is off.

FAQ: 3. What should I consider when setting up an action script for an on/off switch in Wonderware?

Answer: - When setting up an action script for an on/off switch in Wonderware, ensure that the script is triggered by the correct action (e.g., Left Click/Key/Touch Down) and that the instructions within the script accurately update the desired states of both PLC tags based on the switch's status.

FAQ: 4. How can I troubleshoot issues with linking tags to a Wonderware on/off switch?

Answer: - To troubleshoot issues with linking tags to a Wonderware on/off switch, review the action script for any errors or inconsistencies in setting the states of Tag1 and Tag2. Double-check the switch

Ready to Simplify Maintenance?

Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.

Request Demo  β†’