HMI panel shows blank string from a CompactLogix PLC: check byte swap

6 min read · Published November 10, 2026

When a dynamic text object bound to a CompactLogix string tag stays blank, check the tag's byte-swap option before rewriting any PLC logic. Set the tag's data type to ASCII String, select STRING as the memory type, enable byte swap, download, and retest with a short known string. A LEN check in the programming software separates a controller fault from a panel fault.

When a dynamic text object bound to a CompactLogix string tag stays blank, check the tag's byte-swap option in the panel's tag database first. The tag setup itself is simple: a Tag Data Type of ASCII String, STRING as the Memory Type under the PLC address, and a length of 82 characters. What blanks the screen is usually the byte order the panel driver uses to assemble the characters, and one checkbox fixes it. The LEN member of the string tag tells you in one reading whether the fault sits in the controller or in the panel, and this article walks that check through to the fix.

Symptoms and what each one points to

Match your screen to one of these before you change anything:

  • Object blank, trigger tag enabled, controller holds the text. The panel is assembling the bytes in the wrong order. Enable byte swap on the tag; that is the fix in the next section.
  • Object blank and the controller string is empty. If LEN reads 0, the write never happened. Repair the PLC side first.
  • Object blank after a tag import. An import can grab a stale or renamed entry and leave the tag pointing nowhere. Confirm the tag name and address before anything else.
  • Numbers or strange symbols where words should be. The panel is reading the bytes as integers. The Tag Data Type is not set to ASCII String, or the controller has no native string type at all.
  • Numeric objects are blank too. Then the string is not the problem. A numeric object that shows nothing has its own checklist, and the tag address leads it (HMI numeric display shows nothing).

Set the tag up before you touch the PLC

Create the tag in the panel's tag database with a Tag Data Type of ASCII String, and select STRING as the Memory Type under its PLC Address. Point the tag at the controller string tag by name, and size it at 82 characters, the capacity of the predefined Logix STRING type. The panel driver's help documentation for CompactLogix tags covers this string setup for tag-based controllers.

Leave the DATA member and any SINT array addressing alone; the STRING Memory Type reads the whole structure.

If the panel software offers an L5K Tag Import, run it to pull the controller tags in, then open the imported string entry and confirm the name, the type and the length. An import that pulls a stale entry leaves you with invalid address errors when tagging PLC memory, which look like a string problem but are not.

Enable byte swap on the string tag

Open the string tag in the panel's tag database, check the byte-swap box, download the panel project, and load the screen again. Make this change before you touch the PLC string layout, reorder any writes, or rebuild the object.

Byte swap changes the byte order the driver uses when it assembles the string from controller memory. With the order wrong, the bytes never come out as the characters the controller holds, and the object shows nothing even though the tag itself reads.

If the object is still blank after the download, stop toggling the box and work down the checks in the rest of the article in order.

What a Logix string tag holds

A Logix string tag is a structure with two members: LEN, a DINT, and DATA, an array of SINT bytes. A DINT is a 32-bit, 4-byte integer and a SINT is an 8-bit, 1-byte integer, so each character occupies 1 byte in DATA. The controller keeps LEN equal to the current character count, and the programming software's String Browser shows the characters up to the value of LEN. The Logix 5000 ASCII strings programming manual from the controller manufacturer documents this structure.

That gives you a one-number test of the controller side: open the String Browser, read LEN, and compare it with the text you expect to be there.

Controller families without a native string type store text as packed integer words. Rebuilding text from those words is its own job, covered in displaying ASCII from integer words.

Worked example: 12-character test string in an 82-character tag

Inputs. The test string is 'PUMP 1 READY', 12 characters including spaces, typed into the controller as a known test value. The panel tag is sized at 82 characters, the predefined Logix STRING capacity set in the tag database. Storage is 1 byte per character in DATA, with LEN holding the count as a DINT.

Rule. Bytes stored equals the character count. The panel tag must be at least as long as the string, and the object displays text only when the bytes arrive in the order the driver expects.

Arithmetic. 12 characters × 1 byte per character = 12 bytes in DATA, and the controller sets LEN = 12. The tag has 82 − 12 = 70 spare characters, so the test string fits with room for a longer production message later.

Result. The String Browser should list all 12 characters, 'PUMP 1 READY', with LEN = 12.

Decision. If the String Browser shows the 12 characters with LEN = 12 and the panel object is still blank, the controller side checks out: enable byte swap, download, and retest. If LEN reads 0, the string was never written or the panel tag points at the wrong controller tag; fix that first, because byte order cannot blank out a string that does not exist. If LEN shows 12 but fewer characters are visible, the write set the count without filling the bytes; correct the write.

Prove the path with a text-entry object

A text-entry object exercises the read and the write in one test, which a display-only object cannot do. Put a text-entry object on a setup screen, enter a short string from the panel, and watch the controller tag change in the String Browser. Then write a value from the controller side and watch the panel's tag monitor.

Keep the machine in a safe state while you write: a test string on a message board the line reads is still a message the operators see.

If the value moves in both directions but the dynamic text object stays blank, the fault is inside that object. Check its tag assignment first, then the display trigger and any visibility condition set on it.

The fix in order

  1. Read LEN for the string in the programming software's String Browser and confirm it matches the text you expect.
  2. In the panel's tag database, set the Tag Data Type to ASCII String, select STRING as the Memory Type, point the tag at the controller tag by name, and size it at 82 characters.
  3. Check the byte-swap box on the tag and download the panel project.
  4. Retest with a short known string, then with a production message inside the tag capacity.
  5. Record the final settings, including data type, memory type, length, byte-swap state and object trigger, in the project documentation so a later import or edit cannot quietly undo one of them.

Recommendation: when a dynamic text object on a CompactLogix STRING tag stays blank, prove the string exists by reading LEN in the String Browser, enable byte swap on the panel tag, download, and retest with a 12-character string inside the 82-character tag; go after the PLC string layout only when LEN itself is wrong.

Questions

Why is the panel's string tag 82 characters long?

The predefined Logix STRING type holds 82 characters: a DINT named LEN that stores the count plus an 82-element SINT array named DATA that stores the bytes. Sizing the panel tag to 82 characters means any predefined controller string fits without truncation. If your application writes longer custom string structures, size the panel tag to the real capacity of that structure.

Do you have to address the DATA member or use a SINT array?

No. Set the tag's data type to ASCII String and its PLC address Memory Type to STRING, and point the tag at the string tag by name. The driver reads the LEN and DATA members as one string. Address the DATA member directly, or move to a SINT array, only when your panel driver's documentation says it needs a member reference for your controller and string size.

Why does a shorter value sometimes leave old characters behind?

The String Browser shows characters up to the value of LEN, and a string tag can hold data past that count. A shorter overwrite that sets LEN correctly leaves the old bytes invisible. A write that leaves LEN too high lets the panel show trailing characters from the previous value, so keep LEN matched to the current text.

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