The impact of duplicating inputs on an HMI for PLC code

Question:

Greetings everyone! While I am aware that having duplicate destructive bits in PLC code is not recommended, I am curious about the implications of writing to the same tag using two buttons on an HMI. Currently, I have three servo screens where users can input a desired position and either press a button to move to it or press a button to return home. The tags used are HMIPB.GoHome or HMIin.MoveTo, triggering a servo move after certain logic is applied. I simply duplicated the inputs/buttons, but now I am apprehensive about potential issues that may arise in the future.

Top Replies

In my experience, I have never encountered any issues with HMIs regarding button functions. Typically, a button only activates when there is a change in state. Pressing the button signals the PLC to change the assigned bit to 1, while releasing it sets it back to 0. The other buttons do not have any impact until they are pressed or released. Similarly, numeric inputs write their value once you press enter, without affecting the PLC when left untouched. In essence, linking multiple buttons to the same tag is akin to connecting buttons in parallel to a single physical input. If any button is pressed, the input activates, but the PLC cannot distinguish which button triggered the input. It is important to note that the displayed state of the buttons on the HMI may vary depending on the setup, showing either the individual button states or the overall input status (e.g., all buttons appearing as 'pushed' when one is pressed). *assuming momentary pushbutton.

Ah, I see now how the concept of wiring in parallel can be easily understood. Thank you for your response. This analogy provides a clear explanation.

Your apprehension is understandable, but in a concrete sense, having two buttons write to the same tag shouldn't pose a major problem— as long as they aren't pressed simultaneously. The PLC will process one before the other and apply the necessary logic that's attached to each button respectively. However, you'll want to consider the user experience here. The potential for confusion may arise if users unintentionally press both buttons in quick succession, because the PLC will execute both commands in the order they were received, potentially leading to unpredicted movements/remedial action. I'd recommend using lockouts/disabling the other button active upon button pressing, just to avoid such confusion from the users' point of view.

Hi there! I understand your concerns because one thumb rule in PLC programming is indeed to avoid multiple sources writing to the same tag, which could lead to erratic behavior. But from what you describe, it seems like you have a 'Go Home' and 'Move To' button tagged separately. If that’s the case, and since they’re triggering different logics, I don't see a problem, provided they’re not operated simultaneously. Nevertheless, it’s always good to pay attention to how your SCADA with PLC logic could interact under all possible scenarios. Perhaps testing your application extensively and adding some interlock logic for safety purposes could help avoid undesired outcomes.

Hey there! It sounds like you’re navigating some tricky waters with your PLC code. Duplicating inputs can lead to unexpected behavior, especially if both buttons try to write to the same tag simultaneously. This could create conflicts in your logic, potentially causing the servo to behave erratically or even result in unintended movements. It might be worth considering implementing a state management system that tracks which button was last pressed and disables the other until the command is complete. That way, you can maintain smoother operation and avoid any confusion in the user interface. Just my two cents!

It sounds like you're in a bit of a tricky spot with the button duplications! Having both buttons write to the same tag can definitely lead to potential conflicts or unexpected behavior, especially if both buttons could be triggered simultaneously. It might be wise to implement some safety checks or use a state-based approach to ensure that when one button is activated, the other is effectively disabled until the action completes. This could help streamline operations and prevent any unwanted commands from overlapping. Also, consider logging the button presses for troubleshooting down the line; it could save you a lot of headaches!

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)

FAQ: 1. Is it advisable to have duplicate inputs/buttons on an HMI for writing to the same tag in PLC code?

Answer: Answer: While it is generally not recommended to have duplicate destructive bits in PLC code, duplicating inputs/buttons on an HMI to write to the same tag can lead to potential issues and should be approached with caution.

FAQ: 2. What are the implications of using two buttons on an HMI to control the same tag for servo positioning in PLC code?

Answer: Answer: Using two buttons on an HMI to control the same tag for servo positioning can introduce complexities in logic and may result in unintended behaviors such as conflicting commands or erratic movements of the servo.

FAQ: 3. How can duplicating inputs/buttons on an HMI affect the reliability and future maintenance of the PLC code?

Answer: Answer: Duplicating inputs/buttons on an HMI for writing to the same tag in PLC code can make the code harder to troubleshoot, maintain, and modify in the future. It may also increase the risk of introducing errors or inconsistencies in the control system.

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  â†’