When the operator goes back to the option screen, nothing clears the coils the buttons wrote. Give the reset one owner: a panel screen-change event that clears the range when the screen opens, or a PLC compare that clears it when the panel's current screen number matches. Then return to the screen by every navigation path and watch the bits go to 0.
A selection set by a push-button on an HMI screen stays set when the operator comes back to that screen. On the bench used as the example here, the selection screen is screen 3 and the buttons write coils C0 through C7, and every one of those 8 bits is still holding its old value on return. The screen change writes nothing to the PLC, so the clear has to be built on purpose. Build it with one owner: either the panel clears the coil range from a screen-change event, or the PLC clears it when the panel's current screen number matches the selection screen. Then come back to the screen by every path an operator can take and watch the bits reach 0.
The names below are generic. Your panel software prints its own names for the event manager, the screen event and the screen-number tag; the mechanics are the same wherever those features exist.
Two ways to clear the range
Both methods clear the same bits. The difference is who decides when to clear.
| Method | Who decides | What it needs | When it fires |
|---|---|---|---|
| Screen-change event | The panel | An event manager with a screen event and a tag action | The moment the selection screen opens, if you set the trigger to open |
| Screen-number compare | The PLC | The panel writing its current screen number to a register | Every scan while the register equals the selection screen's number |
The event method is a panel-side setting with no PLC download. The compare method adds one or two rungs and runs on any panel that can write its current screen number to the PLC, which most can. Some compact panels leave out the event manager, so check your panel's feature list before you plan the repair around a screen event.
What you need
- The panel project software and its screen list, so you read the selection screen's number from the project. The worked example uses screen 3.
- The PLC addresses of the selection coils, and the answer to one question: are you clearing one bit or a range? The example uses C0 through C7, 8 coils; substitute your own addresses.
- A live data view of those coils in the PLC software, so you watch the bits and not the picture.
- For the compare method, a data register mapped for the panel's current screen number.
- A machine in a safe state for the first tests.
One safety note: run the first pass with the cycle stopped and motion disabled, because a clear that fires at the wrong moment can drop a permissive or interrupt a sequence.
Pick one owner for the reset
If a panel event and a PLC rung both write the same coils, you lose track of which write changed a bit or brought it back. Give the job to one of them, then search the PLC project for every other write to those addresses before you download anything. A second rung that sets the selection during the same scan brings the bits straight back.
Recommendation: use the panel's screen-change event when its software offers an event manager with a screen event and a tag action. It is one setting, it needs no PLC download, and it fires no matter which button or transition brought the operator back. Use the PLC compare when the panel has no event manager, or when the clear must wait on a process condition the PLC knows, such as cycle running or part present. Settle the reset condition with whoever owns the sequence first: if a downstream step still needs the selection after you leave the screen, clearing on return breaks it.
Method 1: clear the range from the screen-open event
- Confirm the software on your panel model has an event manager with a screen-change event type. Some compact panels leave it out; if yours has none, use method 2.
- Open the screen list and read the selection screen's number. The event matches on the number stored in the project, so read it instead of guessing.
- Create an event of the screen-change type, set the trigger to fire when that screen is opened, and leave the closed trigger alone unless you want the clear as the operator leaves. Open is the trigger that matches a clear on return.
- Set the event action to a tag write, pick the coil tag, and set the value it writes to the cleared state. If the action list takes single-bit tags only, add one action per coil: an action on C0 clears C0 and leaves C1 through C7 at whatever state they hold.
- Save, download to the panel, and run the checks in the last section.
The event system works in both directions. Forcing a screen open from a PLC bit is covered in Event triggered screen change on an HMI when a PLC alarm bit turns on.
Method 2: let the PLC compare the screen number
- Map the panel's current screen number into a PLC register. Panel projects keep it as a system tag; give the tag a PLC address and set its acquisition mode to cyclic so the value refreshes on every screen change. The mapping steps are in Run PLC logic only on the HMI current screen number tag.
- Verify the transfer before you write logic. Walk the panel's screens and watch the register in the PLC; it should follow every change. On the selection screen, write down the value you actually see. A compare against an assumed screen number clears at the wrong time or never clears.
- Write one compare rung: when the register equals the selection screen's number, clear the coil range. Use the block or range clear your PLC software offers. If it clears one coil per instruction, stack the instructions, one per coil: 8 instructions cover C0 through C7.
- Choose pulse or level. As written, the rung holds the range at 0 on every scan while the panel sits on that screen. On most PLCs a scan takes 1 to 10 ms, so the clear lands within 10 ms of the panel arriving. That is harmless unless other logic sets those coils only while the panel is there; in that case put a one-shot on the compare so the clear writes for one scan per return. A one-shot must reset to fire again, and a stuck one behaves like the screen-change tags in HMI screen won't change twice: reset the screen-change tag.
- Search the project for the coil addresses, confirm no other rung writes them, and download.
Example: six options, screen 3, coils C0 through C7
A test bench has one option screen, screen 3, and six option buttons. Option 1 writes C0, option 2 writes C1, and option 6 writes C5. The selection range is C0 through C7, 8 coils, with C6 and C7 reserved for two options still to be wired. This bench's panel software has no event manager, so the PLC owns the reset.
The panel writes its current screen number to a data register. Call it SCREEN_NO: a 16-bit unsigned integer, with the panel as its only writer. Walking the screens shows SCREEN_NO reads 3 on the option screen.
The reset is one rung: when SCREEN_NO equals 3, clear C0 through C7. Eight coils are eight bits, so the clear touches half of one 16-bit register and leaves every other coil alone.
To verify, set option 4, which turns C3 on, then return to screen 3 by each of the 4 paths the bench offers: the return button, the home button, an alarm jump and a PLC-driven screen change. The compare rung runs every scan, so on each return C3 and the other 7 coils read 0 within 10 ms of SCREEN_NO reaching 3, one scan at the 1 to 10 ms scan time typical of these benches. The event method would have needed 6 tag actions to cover the same range, one per wired button, so the rung is also the shorter maintenance job.
Test every path back to the screen
- Put the machine in a safe state.
- From the option screen, set one option and watch its coil read 1 in the PLC data view.
- Return to the option screen by each path an operator has. On a typical panel that is the return button, a navigation menu, an alarm that jumps screens and a PLC-driven screen change: 4 paths to walk.
- After each return, read the whole range in the data view. All 8 coils in the example must read 0.
- Move to a screen with nothing to do with selections, set nothing, and watch that no clear runs there.
- Run one normal cycle with a selection set before the return, to confirm nothing downstream needed the old value.
When the reset misbehaves, check in this order:
- The event never fires: the trigger is set to closed instead of opened, or the screen number in the event is one the operator never lands on.
- The compare is true and the coils stay on: another rung writes them. Search the project for the addresses and watch which write wins.
- Part of the range stays on: a single-bit action or single-coil instruction did the work. Add the missing coils or switch to a range clear.
- The register never changes: the screen-number tag has no PLC address or its acquisition mode is off. If the panel and PLC are not talking at all, fix the link first; the checks in Operator panel PLC link setup: test writes before motion sort out most of them.
Questions
Can the PLC miss a selection if the operator leaves the screen fast?
A push-button write happens once, at the moment of the press. If the panel and PLC sit on a network with an update and scan time between them, give the write room to land: keep the operator on the selection screen until the PLC has copied the option into its own bits, or acknowledge the option back to the panel. Then the clear on return cannot erase a value the PLC never read.
What clears the range at power-up?
Nothing in this setup runs at power-up. The screen-number register holds whatever it held last, often 0, and the panel opens its start-up screen once it finishes booting. Check two things before you rely on the reset: that 0 is not a screen number any compare matches, and that the coils start the run cleared, either by a first-pass clear in the PLC or by non-retentive settings you chose on purpose.
Can one setup clear different ranges on different screens?
Yes, but each screen needs its own condition. With the event method, attach a separate event to each screen's open trigger, each with its own tag list: screen 3 clears C0 through C7 and screen 5 clears C10 through C13. With the compare method, add one rung per screen, because a rung with a fixed value matches one screen number only.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.