Embed a PLC variable in an HMI message string

7 min read · Published November 6, 2026

A multi-state indicator's Messages tab carries fixed text with a live PLC tag inside it, placed by the embed prompt at the bottom of the tab. Check the editor edition first, because a demo build can omit the feature; then insert the field, run the panel, and step the tag through two known values to confirm the number follows while the fixed text holds.

A number that changes inside a fixed message is a message-editor job, not a PLC string job. The multi-state indicator's Messages tab takes fixed text per state and accepts an embedded data variable, placed where the cursor sits by the embed prompt at the bottom of the tab. When the prompt is missing, the cause is usually the editor edition: a demo build can leave the feature out entirely, and the full editor from your panel vendor restores it without touching the project. This page gives the insert steps, the four symptoms with their checks, and one worked example with the numbers carried through to what the panel renders.

Can an HMI show a live PLC value inside fixed message text?

Yes: the multi-state indicator's Messages tab carries fixed message text with a PLC data variable embedded in it, placed by the insert prompt the editor shows at the bottom of that tab, so the panel composes the display and the PLC keeps handing over plain numbers.

That is the message style engineers expect from older operator-interface panels, and you do not need a formatted-string instruction in the controller to get it. The same composition carries any tag the field accepts; one walk-through applies it to an HMI timer counting from a PLC current value. Work in this order: confirm the object, insert the field, then test the render. Jumping straight to string-building ladder wastes the panel's own feature and leaves you maintaining display text inside the controller program.

Which object owns embedded message text?

The multi-state indicator owns it: the documented object shows one message per state, chosen by the bit number or the numeric value of a tag, and its messages may contain text plus embedded data variables, so a generic static text label is the wrong place to look.

Bit number selection ties one message to one bit of the tag; numeric value selection ties the message list to the whole value, so a tag stepping 0, 1, 2 walks down a three-message list. Write the list before you open the editor: state value, short message. Keep the fixed wording short enough to read from the operator's normal position, and leave room in the line for the live field. The state list also gives you the test map later: each value must light exactly its own message.

How do you insert the variable into the message?

Add the message on the indicator's Messages tab first, put the cursor where the number must land, and use the embed prompt at the bottom of that tab; the field then carries whatever tag you pick in the selection that follows.

  1. Open the project and select the multi-state indicator that owns the message. Confirm its state list: which tag value shows which message.
  2. Open the Messages tab and add the message for the state that must show the value. The embed choice appears once message text exists.
  3. Place the cursor in the fixed text exactly where the live number belongs.
  4. Use the prompt printed at the bottom of the tab, Press F7 to embed a data variable..., and pick the PLC tag in the selection that follows.
  5. Save the project and read the message back in the editor before it goes to the panel.

The prompt names the insert action and stops there. It does not name the supported data types, the field width or the decimal handling; set whatever format controls your editor offers for the field, then judge the result on a running panel, which the checks below cover.

Why is the embed option missing from your editor?

The usual cause is the editor edition: a demo build can leave object features such as the embed prompt out entirely, and the full licensed editor from the panel vendor restores the choice with no change to your project or your ladder.

Load the full editor from the vendor or its distributor, not from anywhere else, reopen the project and check the tab again. Two other causes mimic it: the selected object is a plain text label rather than a multi-state indicator, and the tab has no message yet, because the embed choice only appears with message text in edit. Rule out both before you conclude anything about the panel. Judge the feature on the full editor; the demo build tells you about the demo build.

What do the symptoms point to?

Match what the panel shows against four symptoms before you change a line of PLC code; two of the four are fixed in the editor, one in the download, and one in the state list, and none of them starts in the ladder.

What you see What it points to Next check
No embed prompt on the Messages tab Demo editor edition, or no message added yet, or a plain text object selected Load the full editor from the vendor; then confirm the object is a multi-state indicator and add a message first
Prompt present, tag inserted, number frozen on the panel The field carries a different tag, or the panel is running an older download Check the field's tag in the project, save, download again and step the tag
Fixed text shows but the wrong message for the state The state list does not match the tag's numeric values Compare each tag value (0, 1, 2 in the example) against the message list order
No message features in the full editor on the correct object Editor version or object support needs the vendor Stop changing the ladder; contact the panel vendor's support with the editor edition and the object

What does an example with three states and one live field look like?

A filler skid's status tag holds 0 for stopped, 1 for running and 2 for fault, so the indicator carries three messages, and the running message embeds one data field with the batch count tag, reading on the panel as Filler running, batch 1234.

The state list maps one value to one message: 0 shows Filler stopped, 1 shows Filler running, batch <batch_count>, 2 shows Filler fault, call maintenance. Three values, three messages, one line each.

The cursor sits after batch , the embed prompt drops the field there, and the field carries the batch_count tag. Now the arithmetic: the fixed part Filler running, batch is 22 characters and the field takes 4 digits, so the rendered line is 26 characters. When the count passes 9999 and the controller writes 12345, the line grows to 27 characters. Watch what your panel does with the longer line before you commit the layout; some panels scroll long active messages on a multi-state indicator, and the clipping behaviour of others is a one-minute test on the panel.

The render result: the ladder writes 1234 into batch_count and the panel shows Filler running, batch 1234. The controller writes an integer and never touches a string. When the value steps to 1235, the fixed characters stay and only the field changes.

How do you check the message on the running panel?

Step the embedded tag through two known values on a safe test condition and confirm the number on the panel follows while the fixed text holds and the other states still show their plain messages.

Drive the change through a safe test condition, and never force a tag that drives an output. If your runtime supports forcing, it is the documented way to walk a display value through its range without touching the process; the rules live in how forcing works in the PLC cycle. Check a second state as well, so the field landed in the message you meant. Then read the result: fixed text with a live number means the job is done; a number that never moves sends you back to the field's tag; the wrong message sends you to the state list.

When should the PLC build the string instead?

Build the string in the PLC only when the message editor cannot carry the field: some mid-size PLC models include a formatted-print instruction for string assembly, smaller models in the same family drop it, and hand-built string logic is cumbersome ladder to maintain.

Two cases justify it: the message editor cannot carry the tag you need, or the same composed text must feed something else in the controller, such as a log line. In both, keep the existing string logic until the panel proves the embedded message under a real state, then remove what you no longer need. If the text belongs on an alarm banner instead of an indicator message, the fixed wording follows the same operator-text rules covered in operator text in HMI alarms.

And if the same status text also belongs on a notice screen away from the machine, that is a separate display decision; our factory floor screens handle that side with offline playback or your own Android app.

Recommendation: Embed the variable in the multi-state indicator's message whenever the full editor shows the embed prompt, and accept it as the finished method only after a two-value step test on the running panel; build the string in the PLC only when the editor cannot carry the tag or the composed text must serve logic elsewhere. Check the editor edition before you write any string logic, because the demo-build case is the most common false dead end.

Questions

Can one message carry more than one embedded field?

Use the same insert prompt again at the next cursor position to add a second field, then confirm both tags in the project and render both in a test run. If your editor allows only one field per message, carry the second value in a numeric display object placed beside the message text instead; the result on the panel reads the same way to an operator.

Which data types and decimal formats does the embedded field support?

The insert prompt names the action, not the formats: the types your editor's variable picker lists for that field are the types it carries, and the format choices are whatever the project then offers for the field. Test the render with a value one digit longer than usual, for example a five-digit batch count where you normally expect four, so you see the field's width behaviour before the panel goes on the wall.

How fast does the embedded number update on the panel?

The insert prompt says nothing about update rate, and the honest answer depends on your panel's scan of the tag. Prove the rate you need on the running panel: step the tag once per second and watch the field during your test run. If the process needs faster changes on screen, check the panel's object scan specification before you commit the layout.

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