HMI object visibility with two conditions: use one PLC tag

5 min read · Published November 8, 2026

The object visibility setting accepts one condition, so build the AND in the PLC: two contacts in series writing one permissive coil, that coil as the visibility tag, and the same contact gating the command output. A filled rectangle over the button hides the pixels while the touch still lands on the button, so it is no fix at all.

The object visibility setting on an HMI accepts a single condition, so the AND belongs in the PLC, where combining conditions is the ordinary work. Add one rung with your two contacts in series writing a permissive coil, point the visibility setting at that coil, and put the same contact in series with the command output. A filled rectangle drawn over the button solves nothing: it hides the pixels and the touch still lands on the button underneath. Below are the reason the cover shape fails, the symptoms this produces, the rung and the setting that fix it, and the truth table to test. If your gate is a single PLC bit already, Gating HMI button visibility on a PLC timer done bit covers that simpler case.

Why the cover shape leaves the button live

On these panels touch input is bound to objects. Each button owns a screen region, and a tap anywhere inside that region is delivered to the button object. A shape drawn on top is graphics only: the runtime skips drawing the lower object and keeps its object area, so the tap still reaches the button. The same behavior shows up in other object types; a hidden HMI object keeps its touch area documents the case where a lookup text goes blank while its object area stays live.

The rectangle therefore misleads the operator twice: the screen says the action is unavailable, and a touch in that spot still triggers it. Treat visibility as operator guidance, and let the PLC own the decision to run. A guard that must stop a machine belongs in the safety circuit with its own relay or safety controller; the visibility permissive sequences normal operation and never takes over a safety function.

Symptoms and what each points to

  • The button fires while covered. Touch is bound to the button object and the shape is graphics only. Delete the shape and gate the button with a permissive tag.
  • The button appears when it should stay hidden. The visibility setting is watching one condition of the two you need. Check which condition the current tag actually carries.
  • The button is hidden but the machine starts anyway. The command output has no permissive contact in its rung, so hiding the button changed nothing in the controller.
  • The button keeps its last look after a link drop. This behavior is documented: visibility animation evaluates a true/false condition and defines no state for a lost connection, so the object waits for fresh data. The PLC-side gate keeps the command path correct while the screen is stale.
  • The object never appears although the tag reads true. The driver may be polling a different address, or the visibility comparison expects a different data type. Start at the value the runtime actually receives.

Build the permissive rung in the PLC

Name the coil for what it permits. The tag names below are examples for a palletizer start button; use your project's tags and your project's language. Under IEC 61131-3, the standard that defines PLC programming languages, two normally open contacts in series are the AND:

X_Door_Closed      X_Air_Ready
------| |-------------| |---------( CyclePermissive )

X_Door_Closed and X_Air_Ready are BOOL condition signals, and CyclePermissive is the BOOL coil you create. The coil is written every scan, so the tag always carries the combined state.

Then spend the tag on the command, in series ahead of the output coil:

CyclePermissive    X_Start_Request
------| |-------------| |---------( Y_Start_Cycle )

X_Start_Request is the BOOL bit the HMI button writes, and Y_Start_Cycle is the BOOL output to the starter. Put the permissive contact ahead of any parallel branches in the command logic, because a rung's parallel branches combine before the output is written: a series contact ahead of the coil blocks every branch at once.

If the two conditions live in two different PLCs, compute the permissive in the controller that runs the command and bring the second bit over first; One HMI reading two PLCs: poll both or link them lays out both ways to do that.

Point the visibility setting at the new tag

In the HMI project, select the button and open its visibility property, the one-tag setting that caused this work. Assign CyclePermissive as the tag. If you later want the button to change color with machine state instead of only appearing and hiding, Show multiple color states on an HMI from one integer tag uses one tag in the same way.

The button now follows the machine within one PLC scan plus one poll cycle. For the example, set the poll for that tag to 250 ms; the worked example below turns that into a worst-case lag. Delete the filled rectangle, download both projects through your normal change control, and watch the new tag online.

Example: start button on a palletizer

Scenario: the palletizer shows a Start cycle button only when the door is closed and the air pressure switch is made. The permissive rung above combines X_Door_Closed and X_Air_Ready into CyclePermissive.

Two conditions give 2 x 2 = 4 combinations, and exactly 1 of the 4 shows the button:

X_Door_Closed X_Air_Ready CyclePermissive Button
false false false hidden
false true false hidden
true false false hidden
true true true visible

With the door open, CyclePermissive is false, the button stays hidden, and a Start request from the HMI still leaves Y_Start_Cycle off, because the permissive contact blocks the request in the command rung. With both conditions true, the button appears within one poll cycle plus one scan: at the example values of a 250 ms poll and a 10 ms scan, that is 250 ms + 10 ms = 260 ms worst case, about a quarter second of operator feedback.

Checks before you close the job

  • Force or make each condition in a safe state and watch CyclePermissive change online through all four rows of the table, including the row you expect least.
  • With either condition false, issue the Start request from the HMI in a safe state and confirm Y_Start_Cycle stays off. Satisfy both conditions and confirm the cycle starts as designed.
  • Pull the link to the panel in a safe state, note that the button holds its last look, restore the link, and confirm it catches up. The command path stays gated at the controller the whole time.
  • Confirm the rectangle is gone and no other object sits over the button.

The decision

Recommendation: combine the two conditions into one permissive coil in the PLC, assign that single tag as the object's visibility condition, and put the same contact in series with the command output before you call the screen done. Fall back to an HMI internal tag or object script only when the PLC program cannot be edited, and then for the display alone. If the line also needs a board for shift targets, quality numbers or notices, that is a separate screen doing a separate job; our shop-floor displays are built for it, and the machine's button stays on the HMI.

Questions

The visibility tag is true online but the object stays hidden. What is wrong?

Check the data type the visibility setting compares. Some HMI platforms read the visibility tag as an integer or word value with a display range instead of a plain bit, so a Boolean true never matches the comparison. Confirm the driver is polling the tag, look at the value exactly as the runtime receives it, and match the tag type to what the setting expects. If the online value toggles and the object still ignores it, re-download the project so the new tag mapping reaches the panel.

Can I compute the combined condition inside the HMI instead of the PLC?

Some platforms offer internal tags or an object script that can AND the two source tags for the display. That works for the picture only. The internal tag exists inside the runtime: it stops when the runtime stops, and the command output in the PLC never sees it. Use it when the PLC program is locked and the screen must look right, and keep the command gate in the controller one way or another.

How fast does the button follow the two conditions?

The combined coil is written every PLC scan, and the panel repaints the object on the next poll of that tag. At the example values, a 10 ms scan and a 250 ms poll, the worst lag from a switch change to a changed screen is about 260 ms. A slower poll stretches that lag one for one, so set the poll to match how quickly the operator needs the button to appear.

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