IMDTouchKnowledge BaseShop main store

Troubleshooting

Why an HMI Numeric Entry Writes Zero to a Counter Preset

PLCs and controllers Published 6 min read

Short answer

A numeric entry that shows the value for a split second and then reads zero is writing to the register, but the register is not retaining it. Check entry acceptance, limits, and BCD format first, then check whether an installed option module claims the preset word. In the reported case a stepper module in slot 2 cleared V2000, and removing it restored the entry.

On this page
  1. What the Zero Readback Tells You
  2. Confirm the Entry Is Accepted
  3. Check Entry Limits and Word Size
  4. Confirm the Data Format
  5. Worked Example: Verifying the BCD Write with a Test Entry of 25 at V2000
  6. Check What Else Claims the Preset Word
  7. Move the Preset Word as a Controlled Diagnostic
  8. The Decision for Each Case
  9. Questions asked

A numeric entry that flashes your number for a split second and then reads zero is writing; the register is simply not holding the value. Work the checks in order — entry acceptance, entry limits, data format, then whatever else in the rack claims that word. In the reported case, a stepper motor module in slot 2 was clearing the preset word V2000: with the module installed no entry survived, and removing it restored the preset entry. The counter logic and the panel object were correct the whole time.

What the Zero Readback Tells You #

Classify the fault by timing before touching anything:

  • The value never appears in the field after you accept it — the entry is not being committed; fix the acceptance action at the panel.
  • The value stays in the field but the counter ignores it — the counter is reading a different word than the panel writes; the two addresses do not match.
  • The value appears for a split second, then reads zero — the write is landing and something else is clearing or holding that word. That is a controller-side fault, and no panel setting will cure it.

The reported setup: X0 as the count input, X1 as the reset, counter CT0 taking its preset from V2000. The panel's numeric entry targeted V2000 as BCD int 16, and a numeric display read V1000, also BCD int 16, for the current count. The display worked; the entry did not. Two different words, two different writers — a good read at V1000 proves nothing about a write holding at V2000.

Confirm the Entry Is Accepted #

Digits flashing while you type is editing, not committing. Rule the acceptance path out at the panel itself:

  • Touch the entry object and let the on-screen keypad come up.
  • Type a small test value and accept it with the configured action — Enter in this project.
  • Repeat with the external keypad if one is fitted; both paths were reported failing here.
  • Check whether the project also commits on touching outside the object or on Escape, and judge the field only after the keypad closes.

Decision: if the value stays in the field after a clean accept, the entry path works and you move on. For the neighboring fault where a setpoint looks entered but never reached the controller at all, read why an HMI edit box shows a value that was never set.

Check Entry Limits and Word Size #

Entry objects carry a configured minimum and maximum. Two facts settle this check quickly:

  • A limit rejection blocks at the configured threshold. Enter 10; if 10 also returns zero, limits are not the fault — no sensible limit rejects a preset of 10.
  • A 16-bit BCD word tops out at 9999, because each of its four digit groups holds only 0 through 9. A preset above 9999 does not fit the format at all; it needs a wider format on both the counter and the panel tag.

The reported symptom was every number returning zero, small ones included, which rules limits out on its face.

Confirm the Data Format #

The panel tag format must match how the counter instruction reads its preset word. Here both sides were BCD int 16, so format was not the cause — but a mismatch produces wrong numbers, and you want to recognize one on sight. Format and scaling mismatches between panel and controller show up as wrong values rather than zeros; how to scale a PLC integer into an HMI display value covers that family of faults. Verify the format once, at the register, with the test below.

Worked Example: Verifying the BCD Write with a Test Entry of 25 at V2000 #

Inputs: the panel entry configured as BCD int 16 (from the reported project), the preset word V2000 watched in the programming software's data view, and a test entry of 25 — an illustrative value chosen because its BCD and binary encodings differ.

Rule in words: BCD stores each decimal digit in its own 4-bit group; binary encodes the whole value.

The arithmetic:

  • 25 in BCD: 2 → 0010 and 5 → 0101, packed as 0000 0000 0010 0101, which is 0x0025. Read as an unsigned binary integer, 0x0025 = (2 × 16) + 5 = 37.
  • 25 in binary: 16 + 8 + 1 = 25, written 0000 0000 0001 1001, which is 0x0019. Read back as BCD, 0x0019 displays as 19.
  • The ceiling: four groups of 0 through 9 top out at 9999.

Result: accept 25 at the entry and read V2000 in the data view.

Decision: 0x0025 with the counter honoring 25 proves the whole format path — a readback of zero after that means another writer is clearing the word, so go to the module check. 0x0019 means the panel wrote binary into a word the counter reads as BCD; change the tag format, not the wiring. Any preset above 9999 cannot ride in this word.

Check What Else Claims the Preset Word #

This is the check that found the reported fault. Option modules in the controller's expansion slots can claim V-memory words for their own data, and which words they claim depends on the modules installed and the hardware configuration in the project. The reported trainer carried a stepper motor module in slot 2: with it installed, V2000 would not hold any entered value, and removing it restored the preset entry. That is a reported result from that machine, and it pins the cause to the module's claim on the word — not the panel, not the counter.

  • Record every module and its slot position.
  • Compare the installed hardware against the configured hardware in the project.
  • Open the memory-map documentation for that exact configuration and list the words the option modules use.
  • Include everything in the review, not only analog modules — the stepper interface was the one that mattered here.

Pull or reseat a module only with the controller powered down, and only when the machine is authorized to run without it.

Decision: if the documented allocation for your module set includes or overlaps V2000, that is your zero. Resolve it in the configuration, or move the preset.

Move the Preset Word as a Controlled Diagnostic #

One controlled move settles it when the documentation is thin. V4100 was suggested as a candidate in the reported discussion and never tested, so treat it as a word to verify, not a known-good address.

  • Choose a word the memory-map documentation shows as free with your modules installed.
  • Point the counter's preset reference and the panel entry tag at the same word. Moving one side alone builds a mismatch: the panel writes one word while the counter reads another.
  • Count addresses in the documentation's base. On this controller family, V-memory is numbered in octal — the word after V2007 is V2010, not V2008.
  • Download, enter a small in-range value, and watch the word in the data view.

Decision: if the new word holds the value, the original word was claimed — keep the documented free word, or fix the module allocation and move back. If the new word clears too, stop cycling addresses and return to the allocation review.

The Decision for Each Case #

  • Entry never commits — fix the acceptance action at the panel; the controller was never involved.
  • Entry commits, but the word reads 37 when you typed 25 — format mismatch; set both sides to the same format.
  • Preset above 9999 — out of range for a 16-bit BCD word; widen the format on both sides.
  • Entry commits, format proven, word still reads zero — another user claims the word. In the reported case it was the stepper motor module in slot 2; resolve the allocation or move the preset.
  • The machine needs the module — the module stays. Removing it proved the fault; it is not the repair.

Questions asked

Why does the number flash in the entry box and then go back to zero?

The flash is the panel showing the value it just wrote; the zero is the register's actual content a moment later. Something between the write and the next read is clearing or holding that word at zero. An entry that was never accepted never shows in the field at all, so the flash actually proves the panel side of the path is working.

What is the largest preset a 16-bit BCD entry can hold?

9999. BCD gives each decimal digit its own 4-bit group, and a 16-bit word has four groups, each holding 0 through 9, so 1001 1001 1001 1001 is the ceiling. If the preset needs to run higher, the counter and the panel tag both have to move to a wider format, such as a 32-bit BCD pair or plain binary, changed together.

Why does the current-count display work while the preset entry fails?

They are two different words with two different writers. The counter instruction itself maintains the current count at V1000, so that display only has to read. The preset word V2000 has to accept a write from the panel and keep it, and in the reported case another user of that word was clearing it. A healthy read at one address says nothing about whether a write holds at another.

Can I fix this by moving the preset to V4100?

Only after the controller's memory-map documentation shows that word free with your module set installed. V4100 was suggested as a candidate in the reported discussion but never tested, so it is a word to verify, not a known-good address. Point the counter preset and the panel tag at the same word, download, and confirm the value holds in the data view before calling it fixed.

Is removing the option module a permanent fix?

No. Removal is a diagnostic that proves which hardware claims the word; it restored the entry on the reported trainer. If the machine needs that module, the repair is to keep the module installed and either resolve the documented memory allocation or move the preset to a word the documentation shows as free. Production hardware stays in the rack.

Keep reading

  • Troubleshooting

    How to Keep HMI-Entered Timer Presets in PLC Memory

    The presets return to zero because the V-memory word they are written to falls outside the PLC's configured retentive range. Open the retentive ranges setup in the programming software, extend the V register range to cover the preset addresses, download the change to the PLC, and save the project.

    PLCs and controllers

  • How-to

    How to Back Up a PLC Program the Right Way

    A PLC program is backed up by uploading: reading the program out of the controller to a computer with the controller's own programming software over a supported connection. An HMI's USB port handles the panel's project, not the PLC's executable, so it is not a backup path. Prove the backup by reopening the saved file before you rely on it.

    PLCs and controllers

  • Troubleshooting

    Why an HMI toggle switch cannot write a physical PLC input

    An HMI toggle cannot hold a physical input such as X1 on: the FX3U refreshes the X image from the field wiring at the start of every scan and wipes the write within one scan. Point the toggle at an unused internal bit such as M100, and OR that bit with the real X0 contact into the output coil so the HMI commands through logic instead of fighting the input refresh.

    HMI and touchscreens