Set HMI function button LED state from the PLC

6 min read · Published November 10, 2026

Yes, the PLC can drive a function button's status light. Place a Function object on the screen, open its LED tab, set the light to control by the PLC, assign a word tag, and write the decimal value for the bit position the tab shows. The steps, the bit weights, a worked example, and the bench check are below.

Yes, the PLC can switch those lights. The control lives in the HMI project, in the Function object's LED tab, and the PLC only has to write one word: a 16-bit word, so 65536 possible values and only the ones built from the printed bit positions matter. Place a Function object on the screen that shows the button, set its LED tab to control by the PLC, assign a word tag, and write the decimal value for the bit position the tab prints. Press detection, screen changes and screen colors are separate settings, and none of them moves the light. The steps below, the bit weights, a worked example and the bench check cover the whole job.

What you need

  • The panel's project, open in its configuration software.
  • One spare word address in the PLC. The LEDs configured in one Function object's LED tab share that word.
  • The bit position of each light you plan to drive. The LED tab prints it; you read it, and never guess it.
  • Access to the ladder logic, so a rung can write the word.

The press side and the light side are two different jobs. A press puts a bit in front of the PLC to read, while the light is a bit the PLC writes back into the panel, so the two live on separate tags. The write side follows the same pattern as make an HMI button turn on a PLC output through a command bit: one side owns its bit, the other side reads it.

Set the LED tab for PLC control

  1. Open the screen that will show the button and place a Function object on it. The light follows the PLC only on a screen that carries its object, so this is the first thing to check when a light ignores the PLC.
  2. Open the object's properties and select the LED tab.
  3. Select the function button whose light the PLC should drive, then set it to control by the PLC.
  4. Assign the LED control word in the same tab. Any free word address works; the example below uses V1400.
  5. Write down the bit position the tab shows for that light. The tab lists a position for every LED it manages, and those printed positions are the mapping your ladder has to match.
  6. Repeat for each further light on the screen. Each instance of the Function object keeps its own settings, so configure the instance that sits on the screen you actually run; a second copy somewhere else does not inherit them.

If a light should run only while its own screen is up, gate the write on the screen number. Run PLC logic only on the HMI current screen number tag shows how to key a rung to the active screen.

The decimal value for each bit

The LED control word is a 16-bit word numbered from bit 0, and each position carries one decimal value: 2 raised to the bit number. The tab prints the position; the table gives the value to write when that light is the only one lit in its word.

Bit the tab shows Value to write
bit 0 1
bit 1 2
bit 2 4
bit 3 8
bit 4 16
bit 5 32
bit 6 64
bit 7 128

Bits 8 through 15 keep doubling, up to 32768 at bit 15. To light several LEDs that share one word, write the sum of their values. To switch one of them off, write the sum again with its value taken out. One wrong bit moves every light that shares the word, so build each value from the printed positions and nothing else.

Example: light the Start-ready LED from bit 3

The inputs, and where each one comes from:

  • Bit position 3: the example's LED tab shows the Start-ready light on bit 3. Read the real number from your own tab; it governs.
  • Word address V1400: the example's free word address, standing in for whatever your project assigns.
  • Commanded state: light on.
  • Word width: 16 bits, numbered from bit 0, with bit 0 worth 1.

The rule in words: the value that lights one LED is 2 raised to the power of its bit position, written into the LED control word.

The arithmetic: 2 × 2 × 2 = 8, so the rung writes decimal 8 into V1400. A second light sits on bit 5 in the same word: 2 × 2 × 2 × 2 × 2 = 32, and lighting both together takes 8 + 32 = 40. Dropping the bit 3 light while the bit 5 light stays on takes 40 - 8 = 32.

The result: V1400 at 8 lights the Start-ready LED alone; V1400 at 40 lights it and the bit 5 light together; V1400 at 32 leaves only the bit 5 light on. The rung holds the word every scan, and a typical PLC scans its logic in 1 to 100 ms, so the light follows within one scan of the rung turning on.

The decision: the light is on whenever bit 3 of the word is 1 and off whenever bit 3 is 0. Build every word as the sum of the values of exactly the LEDs you want lit, and test one light at a time before you combine them.

Check it worked

  1. Put the panel on the screen that carries the configured Function object, and test one light at a time.
  2. Close the rung in the PLC and watch the word tag. It should read the decimal value from the table, 8 in the example.
  3. Watch the physical light follow, then confirm every other light on that object still holds the state you commanded.
  4. Stop and recheck if a light you never commanded changes. The value written does not match the printed bit positions; correct it before the panel goes back on the machine.
  5. If the tag changes and the light does not, recheck four things in order: the object instance on the active screen, the control-by-PLC selection, the word tag in the tab, and the bit position against the value you wrote.
  6. If the tag does not change, the HMI settings are not at fault; the problem is in the ladder write or the path between PLC and panel.

Keep the mapping in the project

Record the word address and each bit position next to the rung that drives it, in the PLC comments and the HMI project notes. A manual force is how you test the mapping on the bench; the production solution is the rung, so take the force back out once the light behaves. If the logic and the tab ever disagree, correct the logic to match the tab.

Recommendation: Drive all the lights of one screen's Function object from one shared LED word: set every LED in that tab to control by the PLC, record the bit position each one prints, and write one summed decimal value from the ladder, one rung per light. Give a light its own word only when two screens must show different states for the same button, because each instance of the object carries its own settings.

If the cell also needs a status board the whole crew can read from across the floor, that is a bigger screen than a button light. Our shop-floor displays are built for that job.

Questions

What value do I write for LED bits 8 through 15?

The same doubling continues above the first eight bits. Bit 8 carries 256, bit 9 carries 512, bit 10 carries 1024, bit 11 carries 2048, bit 12 carries 4096, bit 13 carries 8192, bit 14 carries 16384, and bit 15 carries 32768. A light the tab shows on bit 12 therefore takes decimal 4096 written to the word; add the values of any other lights you want lit in that same word.

Can one PLC rung drive the same light on two screens?

Yes, as long as each screen carries its own Function object instance with the same word tag and the same bit position in its LED tab. Instances do not share settings among themselves, so set each tab to control by the PLC, point it at the same word, and confirm the printed bit positions match before you rely on the second screen.

Should the PLC hold the LED word or write it once?

Hold it. Give each light its own rung that seals itself in, so the word carries the commanded state scan after scan. A one-shot write is fine for a bench test, but in the running program the next logic edit can drop it, and then nothing in the program corrects the light afterward.

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