Email us

Este artículo está en inglés. Ver el sitio en español

Cet article est en anglais. Voir le site en français

Dieser Artikel ist auf Englisch. Website auf Deutsch ansehen

Este artigo está em inglês. Ver o site em português

HMI button visibility from a PLC counter completion bit

Bind the button's visibility condition to the counter's done bit, not to the accumulated-value word. With a preset of 100, the done bit turns on when the count reaches 100 and clears at reset, so the button appears once per batch. The crazy number is the count word read in the wrong format: 100 stored as BCD reads 256 as binary.

NEMA4 Enclosure engineering team · Published November 8, 2026 · 6 min read

Short answer: bind the button's visibility condition to the counter's done bit, the discrete status bit that sets when the accumulated count reaches the preset. With a preset of 100 parts, that bit sets on the cycle that brings the count to 100 and clears when a reset runs. The button therefore appears once per batch and hides on reset. The accumulated-value word V1001 is a number, not a flag: a visibility condition bound to it follows bits of the count instead of completion. And the crazy number you saw is a format mismatch, not a bad address, because 100 stored in BCD is 0x0100 and 0x0100 reads 256 as plain binary. Point the visibility setting at the counter's discrete status element and set it visible when the bit is ON. Then download the project to the panel and run one batch through all 100 cycles.

What each symptom points to

Match what the screen does to a cause before you edit anything. Each of these has one fix, and only the last one lives in the PLC:

  • The button stays hidden even at a count of 100. The condition is bound to a word tag. A word used where the software expects a bit gets mapped by the driver, and the two common mappings are lowest bit or nonzero means ON. The lowest-bit reading leaves you hidden at exactly 100, because 100 in binary is 1100100 and bit 0 is 0.
  • The button shows up from cycle 1 and stays visible. That is the other mapping, nonzero means ON, so any count of 1 or more satisfies it.
  • A crazy number sits where a count belongs, 256 instead of 100. The count word is BCD on one device and binary on the other.
  • The button shows at 100 but is gone before the operator reacts. A reset rung fires right after the hundredth count, the done bit clears, and the screen follows it at the next update.
  • The done bit stays off in the PLC monitor. The counter logic is the fault: a preset the machine never reaches, or a reset that holds the counter at zero every scan.

Causes in order of likelihood

Work down this list; the first cause covers most misbehaving prompts:

  1. Wrong visibility source. The condition reads the accumulated-value word, V1001 in V-memory addressing, where the counter's discrete status element belongs. The word carries the count; the element carries completion. One word in place of one bit explains a button that appears at wrong counts or stays hidden at the right one.
  2. A number-format mismatch. The word displays correctly in the PLC and reads as nonsense on the panel: BCD against binary, or signed against unsigned. Count 100 as BCD is 0x0100, and 0x0100 read as binary is 256.
  3. Inverted polarity. The visibility option pairs the discrete tag with an ON or OFF choice, and the wrong choice hides the button exactly when the bit sets.
  4. Counter logic upstream of the HMI. A preset typed in the wrong format stretches the wait: BCD 100 entered into a preset the counter reads as binary is a wait for 256 cycles. A reset that dominates the rung holds the count at zero.

Check the counter before touching the HMI

Open the PLC in run mode with the live monitor up and watch two things: the accumulated value and the done bit. You want the count to climb one per machine cycle, reach 100 on the hundredth cycle, and DN set on that scan. DN is the done bit, true whenever the accumulated value is equal to or greater than the preset, so 100 against a preset of 100 reads true. Let the machine run on: the count passes 101, 102 and 103, and DN stays set, because a counter keeps accumulating past its preset until a reset instruction executes. Then fire the reset the way the logic does and watch ACC return to 0 with DN clearing. If DN stays off through all of that, fix the count pulse, the preset or the reset rung first; the HMI can only show a state the PLC produces.

The fix: bind visibility to the done bit

In the HMI project, open the button's visibility setting. It pairs a discrete tag with an ON or OFF state, so give it a discrete tag. In V-memory style addressing, reference the counter itself as a bit: CT1. In tag-based software, pick the counter's done member from the counter tag, usually named DN or Done. Set the visible state to ON, then download the project to the panel; a project that is only saved changes nothing on the screen.

The panel polls that bit on its own screen cycle, so expect the button within one update of the DN transition rather than on the exact PLC scan. Every visibility tag adds a point to the panel's comms scan. On a link that already carries several devices, the HMI connection limits article gives you the arithmetic on what fits. The same bound-condition pattern is how SCADA screens handle it, and configuring bound button-visibility logic walks through the equivalent setup. Do not hunt through neighboring addresses for the flag: V1002 and V1003 hold whatever data lives there, and neither is a completion bit.

Worked example: a 100-part batch

Take CT1 with a preset of 100, one count per machine cycle and a 6 s cycle time, and follow the arithmetic:

  • Time to the prompt: 100 cycles × 6 s = 600 s, so the button appears 10 min into the batch.
  • On cycle 100, ACC moves from 99 to 100 and DN sets, because DN is true when ACC is at or above the preset, and 100 is at or above 100.
  • The machine runs on to counts 101, 102 and 103; DN stays set and the button stays visible.
  • Reset executes: ACC returns to 0, DN clears, and the button hides at the next screen update.
  • The 256 you may still see on a count display comes from the format: the PLC writes 100 in BCD as 0x0100, and the panel reads those 16 bits as binary, 1 × 256 = 256.

The cycle time is the only input to replace: at 3 s the prompt arrives after 5 min (100 × 3 s = 300 s), at 12 s after 20 min (1200 s).

Test it, then keep it fixed

Run one full batch with the project downloaded and check four states: hidden at counts 1 through 99, visible at count 100 within one screen update, still visible at 101 and beyond, and hidden again after the reset. Keep ACC and DN side by side on a commissioning screen so the next engineer watches the bit move with the count.

Visibility alone records nothing. If the process needs proof that an operator checked the parts, make the button press write an acknowledge bit to the PLC. Let the PLC reset the counter only when that acknowledge arrives; the logic stays the single master of the prompt, and you test the handshake by watching the acknowledge bit set. Hold the machine in a safe state while you download project changes, the same way you would for any logic edit.

One touch note while you test: if presses register from a hand near the button instead of on it, that is a capacitive-sensing quirk of screens on metal housings. The false button triggers article explains the mechanism and the cure.

When the prompt needs hardware instead

A screen button is only as good as the screen it lives on. Gloves, hose-down and direct sun all argue for hardware: a sealed pushbutton actuated through the housing wall keeps the prompt physical, and the sealed pushbutton article covers how a mechanism works through a sealed wall without losing the rating.

If the display is the weak point, a stainless HMI housing cut for one panel PC is the clean upgrade. A 10.1 in housing suits a 10.1 in panel PC, and a 15.6 in housing suits a 15.6 in panel PC. Both are 304 stainless with a gasketed rear cover, and the front seal is an IP65-type seal with the display installed, a manufacturer rating and not UL listed. Both are cut to your drawing and delivered in 10 business days from drawing approval. The HMI enclosures category covers display sizes from 7 in to 23.8 in, and the cutouts, glands and HMI windows guide has the cutout detail if you add a physical button beside the screen.

Catalog dimensions to compare

Compare these catalog dimensions with your component layout. Open each enclosure for its rating, material and usable space, then check those specifications against your application.

EnclosureMaterialOutside H x W x D / displayRating
10.1" HMI enclosure304 stainless8.72 x 12.66 x 3.48 inIP65-type front seal with the display installed, manufacturer rated; not UL listed
15.6" HMI enclosure304 stainless11.69 x 17.64 x 4.13 inIP65-type front seal with the display installed, manufacturer rated; not UL listed
7" HMI enclosure304 stainless7.43 x 9.96 x 3.7 inIP65-type front seal with the display installed, manufacturer rated; not UL listed

Questions

Does the done bit stay on if the machine keeps cycling past 100?

Yes. A counter keeps accumulating past its preset, so the count runs 101, 102, 103 and the done bit stays set until a reset instruction runs. Your button therefore stays visible through the overrun, which is usually what you want from a prompt like this. If a batch could run away unattended, add logic that raises an alarm or stops the machine at a ceiling you choose, for example 110 counts.

Can I use a compare on the accumulated value instead of the done bit?

Yes, when your HMI software accepts a compare expression in the visibility condition: accumulated value at or above 100 for completion. The compare costs a second tag read, needs matching number formats and adds one more poll to the update, so use it when you need a band rather than a threshold, visible while the count sits between 100 and 150 for instance. For plain completion, the done bit has fewer ways to fail.

The done bit sets in the PLC monitor but the button still stays hidden. What is left?

Three things, in this order. First, polarity: the visibility setting pairs the tag with an ON or OFF choice, and visible-when-OFF is the classic inversion, so toggle it. Second, the tag mapping: confirm the driver resolves the counter's status element and not another address. Third, the panel itself: a project that is saved but not downloaded changes nothing on screen. The polarity toggle is the two-minute fix and the most common of the three.

Will the button disappear if the counter resets mid-batch?

It will, one screen update after the done bit clears, and the HMI cannot hold a prompt the PLC has dropped. If the operator must still see the prompt after a reset, have the button press write an acknowledge bit to the PLC and let the logic decide when the prompt clears. That handshake keeps one master, and you test it by watching the acknowledge bit set before the reset fires.

Checklist before you order

Specify it once, built to your drawing

  • Environment and NEMA type: Type 1, Type 3R, Type 4, Type 4X, Type 6P, Type 12, Type 13 (manufacturer ratings, not UL listed)
  • Material: 304 stainless steel, 316L stainless steel, Powder-coated carbon steel, Aluminum, Polycarbonate, Fiberglass (FRP)
  • Size: inside or outside height, width and depth, with the depth your deepest component needs
  • Cutouts, glands and windows, dimensioned from one datum on each face
  • Mounting and access: wall, pole or stand, hinge side, mounting panel
  • Quantity: from one piece

Delivered in 10 business days, anywhere in the world. Counted from your order; for custom work, from your approval of the drawing.

Configure an HMI housing in 3DRequest a custom quote

NEMA 4X enclosures: sizes for this job

Keep reading

More on hmi and operator enclosures

All articles

Buying guides

The guides behind this answer

All guides