At the digital-input terminal, voltage and input current must remain inside the module rating; excess electrical load is a hardware problem, while the button-selection symptom is a timing and state-ownership problem. Map both touch commands and changes of system on auto to the same paired assignments: select Button-1 by setting A and resetting B, and select Button-2 by setting B and resetting A. Bind each button’s displayed selection to those signals rather than to an independent touch-only state. Choose explicitly whether the maintained DI has continuous priority or acts only when it changes state.
Input State and Symptom Limits
The number that matters is the count of active selections. With two mutually exclusive choices, the valid steady-state count is exactly one: either A is true and B is false, or B is true and A is false. A count of zero produces no selection; a count of two produces conflicting selections.
Separate the electrical input from the interpreted state. The field signal first passes through the DI sensing circuit, where applied voltage drives current and creates thermal load. The controller or HMI then reads a logical value through an input image, tag, or communication update. This is heat at the hardware boundary and logic after the input image.
| Quantity or state | Required limit or result | Where to read it |
|---|---|---|
| DI voltage and current | Within the input module’s specified on-state, off-state, and maximum ratings | Input module label, wiring diagram, and datasheet |
system on auto = true |
A = true; B = false |
Online tag monitor and button feedback |
system on auto = false |
A = false; B = true |
Online tag monitor and button feedback |
| Active selection count | Exactly one after each completed command | Watch A and B together |
| Input-to-display delay | Stable and compatible with the application | DI status, controller state, communications diagnostics, and HMI refresh settings |
If the physical input indicator changes but system on auto does not, inspect input mapping and communications. If the tag changes and A/B do not, inspect the control logic. If the signals change correctly but the screen does not, inspect button feedback bindings and display refresh.
Competing Writers and Scan Timing
A touch button and a DI-driven routine are two writers targeting the same state. The final value depends on execution order whenever they issue different commands during the same scan or communication interval. A maintained DI routine that writes every scan will overwrite a manual touch command almost immediately, even though the button works correctly when tested without DI control.
HMI refresh, controller scan, communications polling, and input filtering occur on separate schedules. A brief intermediate state can therefore appear if one signal is updated before the other. Treat selection as one transaction: every command writes both signals as a pair. Setting only the requested signal and relying on another routine to clear the opposite signal creates windows in which both can be true.
The visual button state is another possible writer if the object maintains an internal latch. Use the object as a command source and display the confirmed value of A or B. This makes the screen show the controlled state instead of remembering only the last touch.
Control-Strategy Selection
Use level control when the DI must always dictate the selection. While system on auto is true, continuously command A true and B false; while it is false, command the opposite pair. Manual operation may still generate commands, but those commands cannot persist against the maintained DI state.
IF system on auto = TRUE:
SET A
RESET B
ELSE:
RESET A
SET B
Use transition control when the DI must behave like an operator action. A false-to-true transition performs the Button-1 action once, and a true-to-false transition performs the Button-2 action once. A later manual selection then remains active until the DI changes again. This interpretation best preserves meaningful manual control while still reproducing both button actions from the input.
On false-to-true transition of system on auto:
SET A
RESET B
On true-to-false transition of system on auto:
RESET A
SET B
If operations require a manual override, define its priority as a separate operating rule rather than allowing execution order to decide. The screen should indicate which source currently owns the selection so that an operator can distinguish a rejected command from a failed button.
Shared-Action Configuration Procedure
- Confirm the DI status changes reliably at the input module. Compare the measured field voltage with the module’s documented thresholds and ratings if the indication chatters or never changes.
- Confirm
system on autofollows the physical DI at the location where the selection logic executes. Check tag mapping and the communication path if the two states differ. - Create one logical action for selecting
Button-1: setAand resetB. Configure the manualButton-1touch and the DI true event or level to invoke that same action. - Create the complementary action for selecting
Button-2: setBand resetA. Configure the manualButton-2touch and the DI false event or level to invoke it. - Bind the selected appearance of
Button-1toAand the selected appearance ofButton-2toB. Remove any independent display latch that can disagree with these signals. - Select level control or transition control and document the priority. Place the paired assignments in one execution location so another routine cannot reverse only half of the transaction.
- Initialize the pair to one valid state at startup. If the runtime starts while the DI is already true, transition-only logic also needs an initialization rule because no rising transition may occur after startup.
Transition and Override Verification
Monitor the physical DI, system on auto, A, and B on one time-aligned view where possible. Start with the DI false and verify A is false, B is true, and only Button-2 appears selected. Change the DI to true and verify the complete opposite state. Repeat the transition several times while watching for zero-selection or double-selection intervals.
Press both buttons manually with the DI in each state. Under level control, verify that the DI-authoritative state returns after the next logic update. Under transition control, verify that the manual state persists until the next DI transition. Cycle power or restart the runtime with the DI in both positions and confirm that initialization produces the intended pair.
Finally, disconnect or interrupt the HMI communication path during a controlled test. The controller state should remain deterministic, and the display should report loss of current feedback rather than presenting a stale selection as confirmed.
Recurring Implementation Pitfalls
The most common fault is implementing the DI as a continuous assignment while expecting manual commands to persist. That requirement is contradictory until a priority or edge-trigger rule is selected. Another common fault is tying color or selection animation to an internal button bit instead of the controlled signals.
Separate SET and RESET operations in different routines also create order-dependent behavior. Search every task, screen event, macro, and controller routine that writes A or B. Multiple writers can make a correct local configuration appear intermittent.
Input chatter can produce repeated transitions in an edge-driven design. Diagnose it at the physical input and input image before changing screen logic. Read the input module’s filtering configuration and measure the field signal; select filtering from the actual noise and required response rather than entering an assumed timing value.
FAQ
Can I make the digital input act exactly like pressing Button-1?
Yes. Route the DI true event and the Button-1 touch event to the same paired operation: set A and reset B. Use a DI transition rather than a continuous level if later manual selections must persist.
Does a maintained digital input allow a lasting manual override?
No, not when level logic writes the DI-selected state on every execution cycle. Use transition control or define a separate manual-priority rule if the operator command must remain active.
Can I keep both manual and DI control if the buttons still conflict?
Yes, provided one routine owns the paired A/B update and the display reads those confirmed signals. Stop testing and escalate through the product manufacturer’s official support channel if the runtime cannot expose the DI tag, cannot invoke a shared action outside a touch event, or changes the pair without an identifiable writer. Supply the screen project, hardware model, software version, tag trace, and startup behavior.