To change the screen on a panel from the PLC, load the screen number as a K constant and store it with an OUT box into the register named in the panel's project properties. Write K11 for a BCD register and K0b for a binary one, then reset the register to an invalid number such as 999 after the panel follows the command, because the panel reacts to a change in the value.
You press the button on the panel, the input bit comes on in the PLC, and the screen stays where it was. The write that failed was an address-style load pair, and the fix is one rung: load the screen number as a K constant, then store it with an OUT box into the register the panel watches. Three things decide whether the panel follows: the register address named in the panel project, the screen ID as the project numbers its screens, and the constant format the register expects, BCD or binary. The rungs below use one ladder syntax throughout: LD loads a value into the accumulator, OUT stores the accumulator to a register, and V1200 is the example command register, one 16-bit word.
The fix: load the number, store it with the OUT box
For a command register V1200, one 16-bit word declared as BCD, and a destination screen numbered 11, the rung is the button's input bit, then LD K11, then OUT V1200. The K constant carries the screen ID itself, and the OUT box copies the accumulator into the register the panel polls. The register changes to 11 (BCD pattern 0x0011), the panel sees the new value and opens screen 11, normally within its next polling cycle of a few hundred milliseconds.
Condition the rung on the button bit through a one-shot so one press produces one store, executed on one scan. On a small program a scan runs a few milliseconds, so the store lands well under 50 ms after the press. A rung that writes on every scan overwrites the reset value your repeat logic depends on.
Why the LDA and LD pair fails
LDA O13 loads the address of output point O13 into the accumulator. The LD V1200 that follows loads the current contents of V1200. At no point in that pair does the accumulator hold the screen number you chose, so the store that comes next drops the wrong pattern into the register. On the panel side there is nothing new to see: the panel watches one register named in its project properties and reacts when that value changes. A write that lands on the wrong address, or carries a pattern the project cannot read as a screen number, leaves the watched register untouched or fills it with garbage.
The working pattern keeps the two jobs apart: the K constant is the value, the OUT box is the store.
Match the constant format to the register
Screen 11 fits one 16-bit register two ways: BCD pattern 0x0011 or binary pattern 0x000B. The register's declared format fixes which one the panel expects.
- BCD register:
LD K11. The K constant follows the register's BCD format, V1200 receives 0x0011, and the panel reads 11. - Binary register, often labelled decimal:
LD K0b. In this constant syntax the letters are hex digits, and 0x000B is decimal 11.
The two documented pairs confirm the syntax. Screen 13 is written K13 to a BCD register and K0d to a binary one, and 0x0D is decimal 13. The reset value 999 is written K999 in BCD and K3e7 in binary, and 0x3E7 = 3 × 256 + 14 × 16 + 7 = 999. Both pairs hide the same decimal value behind a hex-lettered constant, so the letters carry hex and K0b is screen 11 in binary.
A mismatch shows itself on the panel: a binary pattern read as BCD can park a hex letter in a digit position that only holds 0 to 9, and the panel displays a nonsense number. That failure mode is worked through in an HMI panel showing nonsense numbers from a PLC BCD analog register.
Symptoms and what each points to
| What you see | What it points to | Next check |
|---|---|---|
| Button bit comes on in the PLC, the panel stays put | The store landed on the wrong address or never held the screen number | Read the screen-change setting in the panel project and confirm the watched register is V1200 |
| V1200 changes, the panel shows garbage or the wrong screen | The constant format disagrees with the register | Use K11 for a BCD register, K0b for a binary one |
| The first command works, the same command later does nothing | The register still holds 11, so the panel sees no change | Reset V1200 to an invalid screen number, 999 in BCD, after each completed change |
| V1200 holds a screen number left over from a test at power-up | A stale command value | Initialize V1200 to 999 on the first scan so the first real command is a change |
Checks before you edit the rung
- Confirm the watched register. Open the panel project and read the address in its screen-change setting, in the project properties or in a PLC control object. Use that address consistently in the ladder.
- Confirm the screen ID. Set up a current-screen register, tap to the target screen by hand, and read the number in the PLC software's data view. That number is the constant to write; a button label is a poor source for it. The comparison logic built on that register is covered in run PLC logic only on the HMI current screen number tag.
- Confirm the format. Read the register's declared format, BCD or binary, before you pick K11 or K0b.
- One-shot the store. Take the rung through the button bit and an edge contact so a held button writes once, on one scan instead of every scan.
Example: writing screen 11 to a BCD register
Setup: the panel project watches V1200, one 16-bit register declared BCD, and the tap-through check confirmed screen 11 reads 11 in the current-screen register. The panel button is wired to a PLC input bit, and the panel polls its command register roughly every 100 ms, so allow about 1 second end to end for each step below.
- Command rung. Button bit through a one-shot,
LD K11,OUT V1200. On the press, one scan wide, the accumulator holds BCD 11 (0x0011), V1200 changes to 11, and the panel opens screen 11. - Reset rung. Current-screen register equal to 11,
LD K999,OUT V1200. Once the panel confirms it is on screen 11, the command register returns to 999, an ID outside this project's screen list, so the register is ready for the next command. - Repeat test. Move the panel to another screen by hand and press again. V1200 holds 999, the write makes it 11, and the panel moves. Skip the reset and the second press writes 11 over 11: no change in the register, no screen change.
For a binary-format register the same rungs carry K0b (0x000B = decimal 11) and K3e7 (0x3E7 = 999) into the same one 16-bit word. The reset matters most when local panel buttons and PLC commands are mixed, and PLC to panel screen switch register: retrigger the same screen works through that retrigger problem in detail.
Verify the write end to end
Press the button and watch V1200 in the PLC software's data view: it must change to 11 within about 1 second of the press. Watch the panel land on screen 11 and the current-screen register read 11. Watch the reset rung return V1200 to 999. Then move the panel somewhere by hand, press again, and confirm the command still works. That last press is the one most installs skip.
The decision
Recommendation: write the screen ID with a K constant and an OUT box into the exact register named in the panel's screen-change setting, format the constant to that register (BCD or binary), reset the register to an invalid screen number once the current-screen register confirms the change, and take the store through a one-shot on the button bit. Remove the address-style LDA and LD pair from that rung: the address and the old register contents never carry the destination screen.
A screen change is operator guidance. Machine stop and safety functions stay in the PLC and the safety hardware, independent of which screen is showing.
Questions
Do all panel editors drive screen changes from a PLC register?
Most do, and the setting lives in one of two places. Some editors reserve a single register named in the project properties; newer editors give you a PLC control or window-change object where you register the address and set the action to change the window. If an editor offers neither, the PLC has no way to command screens, and the panel's own buttons remain the only way to move between them.
Should the command register also hold the current screen number?
Keep them as two registers. The panel writes the active window number into a current-screen register, and only the PLC writes the command register. Reading both at once shows when the panel has followed the command, and the comparison gives the reset rung its trigger, so the command register is free before the next identical command arrives.
What happens if a binary constant lands in a register set to BCD?
The panel reads the raw 16-bit pattern as four BCD digits, and each digit position holds 0 to 9. Binary 11 arrives as 0x000B, so the low digit reads B, a pattern no BCD digit represents, and the panel shows a nonsense number or ignores the command. Rewriting the constant in the register's own format, K11 for a BCD register, clears it.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.