Show two text states on an HMI from one PLC bit

7 min read · Published November 10, 2026

Enter both strings as lookup text entries on the panel, message 1 for OK and message 2 for FAULT, and have the PLC write 1 or 2 to one agreed register from the input bit. Two short rungs replace ASCII transfers, and the STATUS line switches text in place.

A status line that must read OK in one machine state and FAULT in the other takes one object and two rungs. Store both strings on the panel as lookup text entries, then have the PLC write the matching message number to one agreed data register straight from the input bit. In the working setup this page uses as its example, that register is V2050 and the input is X0. The words live in the panel project and never cross the link; the only traffic is a number. The sections below cover the panel side, the logic side, a worked example, and the checks that separate a logic problem from a tag problem.

How does one input bit drive two different texts?

Store both strings in the panel and let the PLC write a message number: value 1 selects OK and value 2 selects FAULT, so one input bit drives the whole line through two short rungs.

The split keeps each side doing what it is good at. The panel owns the words, the logic owns the state, and the only thing crossing between them is a number. The object reads its tag register and draws the entry whose message number matches the value it finds. Panel software packages name the object differently (lookup text, dynamic text, a text list), but this tag-and-entry mechanism is the one the multi-state indicator documentation describes, where the bit and message configuration decides how many messages the object carries. Two entries keep the mapping trivial, and the same object takes more entries later with no new screen objects.

What do you need before you start?

You need the panel project open on a PC, one spare line on a screen, a data register both sides agree on, and the physical input bit identified and reachable for a test, such as input X0.

Gather these before touching either tool:

  • The panel software and download access to the panel, so a project transfer is possible once the object is placed.
  • One spare line on the status screen, reserved next to the static STATUS label.
  • One data register for the message number. The example uses V2050. Whichever register you pick, the object's tag and the PLC rungs must name the same one, and no other rung should write it.
  • The physical input, identified at the terminal. On the compact PLC used in the worked example, X addresses are inputs and Y addresses are outputs, so the tag belongs on X0; a tag on Y0 follows an output, and the line stops tracking the machine condition.
  • A test path: actuate the real switch, the door or limit switch, with the machine at rest and under the plant's lockout and test rules.

How do you store both messages on the panel?

Add a lookup text object where the status line runs, enter the two strings under message numbers 1 and 2, and point the object's tag at the register the logic writes, V2050 in the working setup.

The placement steps:

  1. Place the lookup text object on the status line, immediately after the static STATUS label.
  2. Enter message 1 with the text OK and message 2 with the text FAULT. The numbering must match what the logic writes, entry for entry.
  3. Assign the object's tag to V2050.
  4. Size the field for the longer word. FAULT is 5 characters, so set the field wide enough that FAULT occupies the same footprint OK leaves behind.
  5. Download the project to the panel with the software's normal transfer.

The strings now live in the panel configuration. The PLC never holds them, and the link never carries them.

How does the PLC pick which message shows?

Drive the register with two rungs on the input bit: X0 ON loads constant 1 and outputs it to V2050, and the inverted condition loads constant 2 and outputs it to V2050, so every input state has a write path.

The working project's mnemonics:

X0 ON    LDD K1
         OUT V2050      healthy state, message 1

X0 OFF   LDD K2
         OUT V2050      fault state, message 2

The second rung sits behind the inverted X0 contact, the NOT condition. LDD is the load-constant instruction and OUT is the register write in this family. Substitute your PLC's equivalents if the names differ; the pattern is what matters. Run both rungs unconditionally on every scan. That refreshes the number from the first scan after power-up and after every state change, with no event-triggered writes to miss. Reserve V2050 for this object, because any second rung that writes it will put a message on screen that the input state does not justify.

The write itself is the same move as writing a screen number from a PLC to the panel register, only pointed at a text object instead of a screen selector.

Example: a guard door switch drives the line end to end

The example is a guard door switch on X0 driving one status line. Door closed writes message number 1 to V2050 and the line reads STATUS OK. Door open writes message number 2 and the same line reads STATUS FAULT, with the field sized for the longer word, FAULT at 5 characters against OK at 2.

Machine event X0 Rung that fires V2050 Status line
Door closed, machine healthy ON LDD K1, OUT V2050 1 STATUS OK
Door opened OFF inverted rung: LDD K2, OUT V2050 2 STATUS FAULT

Follow one transition end to end. The door swings open, X0 drops out, and the inverted rung loads constant 2 into V2050. On the next read the object fetches the value 2, matches entry 2, and draws the 5-character FAULT in the field beside the static STATUS label, replacing the 2-character OK. Close the door and the first rung writes 1, so the same field swaps back to OK. Across the whole cycle the words never move: the field redraws from text stored on the panel, selected by a single number the logic wrote. With both rungs unconditional, the register refreshes every scan, so the number on the link is never more than one scan cycle old, typically a few milliseconds to tens of milliseconds on a compact PLC.

Why not move the text itself from the PLC?

Copying ASCII costs arithmetic for no benefit here. FAULT with its leading space is 5 characters plus 1 space, which is 6 bytes, and 2 bytes per word makes 3 words, the constant the copy rung would load.

That route runs load-constant for the word count, load-address for the source, then a block move into the register the panel reads. It only pays off when the PLC owns the strings: a batch number it assembles, a part name it pulls from a recipe, text that changes per order. For two fixed labels, all that setup produces what the lookup object already does with one number per state. Keep panel-side storage for fixed messages, and keep PLC-side strings for text the logic genuinely computes.

When is an indicator light the better object?

With two states that will never grow, an indicator object with custom ON and OFF text on the same bit is the shorter build: one object, one tag, no selector rungs, showing OK on and FAULT off.

The indicator takes the input bit as its tag and draws the ON text or the OFF text you type, so the whole job sits in the object. Choose it when the two-state list is final and the text stands alone on the screen. Choose the lookup text object when the list may grow, when the message must sit inside a longer status line you plan to extend, or when several conditions should eventually drive one field. The multi-state indicator version documents a ceiling of 255 messages, set by its bit and message configuration together with the tag data type. For the object-by-object tradeoff, multi-state text or lookup text for HMI messages works through the decision, and three alarm states on one indicator shows how an indicator scales past two labeled states.

How do you check it worked?

Watch the register and the line together: with X0 off, V2050 should read 2 and the line should show STATUS FAULT; toggle the input on and V2050 should read 1 and the line STATUS OK.

  1. With the machine at rest and X0 off, read V2050 from the logic side. It should hold 2, and the panel should show STATUS FAULT.
  2. Actuate the real switch. V2050 should change to 1 and the line to STATUS OK.
  3. Toggle in both directions while watching the register and the line together. A wrong register value points at the input address or the rung conditions; a correct register with the wrong text points at the object's tag or the entry numbering.
  4. Check the line with FAULT showing: the field sits where OK sat, beside the static label, with nothing clipped.

If the number arrives late or not at all over a serial link, the causes sit on the poll side, and dropped PLC-triggered messages on a serial HMI panel lists them with the checks that tell them apart.

Recommendation: Use the lookup text object driven by a PLC-written message number whenever the words are fixed at design time and the list may grow: one reserved register, one object tag, and two unconditional rungs on the input bit cover the whole line. Choose the ON/OFF indicator when the two states are final and the text stands alone. Choose PLC-resident ASCII strings only when the logic itself assembles the words.

Questions

What shows on the panel if the PLC stops writing the register?

The object keeps showing the entry for the last value it read, so a stopped logic side leaves the previous word on screen with no hint it is stale. The two rungs in this setup run on every scan and refresh the number each pass. If your platform writes on change only, add a periodic rewrite or pair the message number with a heartbeat bit the logic toggles, so operators can tell a live line from a frozen one.

Can each message carry its own color or a beep?

On panels whose text objects carry per-entry attributes, yes. The panel help documented for this object family gives message number 2 a red text color and three beeps, assigned on the message entry itself with no extra logic rungs. Open the object's message list and look for a color field and a beep count per entry. If your software shows those fields, fill them state by state and the panel handles the rest.

How do I extend the line to three or more states?

Add the next entry to the same lookup list, then add one rung that writes the new number when its condition is true. Keep every condition mutually exclusive so exactly one rung drives the register on any scan, and widen the text field if the new word is longer than the old ones. The register is not the constraint: a 16-bit data register holds values from 0 to 65535, so the object's message list is the real ceiling.

Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.

Keep reading

Build your signAsk for a quote