Effortlessly Toggle Two Bits with One Button in Wonderware PLC Without Scripting

Question:

What is the most effective method to toggle two bits using a single button in Wonderware PLC without requiring any scripting? Your guidance would be greatly appreciated!

Top Replies

Integrating the ONS (One-Shot) function into the Programmable Logic Controller (PLC) allows for precise control over toggle functions within the PLC system.

The only effective solution is to utilize scripting. Let’s consider that you’re working with SharePoint (as mentioned in earlier discussions). The most straightforward approach would be to create a data change script. You can include a toggle function within the script, where the last step assigns the value of the second tag to match the first tag. However, it’s essential to address a common oversight: what is the purpose of toggling between two tags?

Ones_Zeros inquired: What is the most effective method to toggle two bits in a PLC using a single button in Wonderware? Ideally, I'd like to accomplish this without any scripting. Thanks! To elaborate, you can assign Bit1 to a toggle pushbutton and simply implement one line of code in the PLC to ensure that Bit2 mirrors the state of Bit1.

ActionScript for Button Configuration: Set Bit 1 to 1 and Bit 2 to 2.

According to NetNathan's suggestion: When creating an action script for the button's release, consider the following code: ```actionscript Bit1 = NOT Bit1; Bit2 = NOT Bit2; ``` This code can be applied to either the button press or button release event. For enhanced functionality, feel free to click to learn more!

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.

You must be a registered user to add a comment. If you've already registered,
sign in. Otherwise, register and sign in.

Frequently Asked Questions (FAQ)

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  →