Load counter presets from an HMI into a counter module

7 min read · Published November 7, 2026

Yes. The operator panel writes the preset into an assigned V-memory address, and ladder logic then runs the module's Edit & Reload Preset Table Entry command to copy it into the preset table the counter actually uses. A startup load covers fixed presets; the edit command covers operator changes.

An operator panel can set the presets of a counter module configured for quadrature input counting, and the job has two stages. The panel writes the value into a V-memory address in the PLC. Ladder logic then carries it the last step into the module's preset table, which is the copy the module actually counts against. Miss that second stage and the panel shows a new number while the machine keeps switching at the old threshold. This page separates the two stores, lists the ladder steps, works a quadrature example with SET, RESET and RESET COUNT entries at 1500, 3000 and 4000 counts, and closes with the checks and the startup decision.

Can an HMI change a counter module preset through V-memory?

Yes, in two stages: the HMI writes the preset into an assigned V-memory address, and ladder logic then runs the module's Edit & Reload Preset Table Entry command to copy that value into the active preset table.

The panel's reach ends at the PLC's data registers. The instruction that changes an entry in the loaded preset table is a ladder instruction, not a screen object, because the table belongs to the module. The module loads that table either automatically at startup or manually when ladder logic tells it to, and from then on its outputs follow the loaded copy.

If you have already made timer presets operator-adjustable, the structure is identical: the panel writes the register and the ladder applies it. That timer case is worked through in letting an HMI change a PLC timer preset instead of a constant.

Why does the counter keep switching at the old threshold after the HMI write?

Because a counter module counts against its own configured preset table, a new number sitting in V-memory has no effect on it until ladder logic copies that number into the table with the edit-and-reload command.

Two stores hold a preset here. V-memory belongs to the PLC: the panel writes it, the programming software displays it, ladder logic reads it. The preset table belongs to the module: the module loads it at startup or when ladder logic loads it, and the module's outputs fire from that loaded copy.

The split gives you a fast diagnosis. Watch the V address in the programming software while the operator types on the panel. If the register follows the entry, the panel side is correct and the missing piece is the ladder edit. If the register stays put, correct the panel's write address or data format before touching the module side.

Two quick fixes miss. Retyping the value changes the register a second time, which the module still never sees. Editing the entry in the module configuration changes the configured table only, and the module picks that up when the table is next loaded, so during operation the edit command stays the documented route.

What do you need before you start?

Five items, no more: one V-memory address per adjustable preset, the module's configuration sheet, the edit instruction in your PLC, a limited numeric entry object on the panel, and the CTRIO manual's operand list for the command.

  • One V location per adjustable preset value, written down next to the table entry it feeds. Leave fixed entries out of the panel's reach.
  • The module configuration, showing each entry's function and its current value. A configured table might hold a SET, a RESET and a RESET COUNT entry; the numbers in the worked example below are illustrations, and yours come from your own configuration.
  • The edit instruction in your PLC's instruction set. The documentation names the command Edit & Reload Preset Table Entry. Instruction spellings across the documentation include CTTBLEDT (CTRIO Edit Preset Table Entry), EDT in the module's discrete table list, and CTRIO_EDIT for H2-CTRIO ladder logic. On a CTRIO2, the manual recommends the Edit Preset Table Entry and Reload route when the table will be loaded straight to RAM, because it saves code and runs more quickly.
  • A numeric entry object on the panel pointed at that V location, with a display format and entry limits.
  • The CTRIO manual's entry for the command, which prints the entry identifier, the value width and the completion status the command expects.

How do you apply an operator preset to the table, step by step?

The path is five steps: hand the value over in V-memory, clamp it, trigger the command on a rising edge, run the module's edit command for the matching entry, and hold the machine until the completion indicator sets.

  1. Assign the handoff. Give each adjustable preset its own V-memory location and record which table entry it feeds. One preset, one address.
  2. Limit the entry twice. Set minimum and maximum on the panel object, then clamp the value again in ladder logic so a mistyped number can never reach the module. In the worked example below, the panel object's limits are 0 counts minimum and 4800 counts maximum, so the operator cannot type a value below the smallest configured transition or above the running count range. The clamp pattern is in clamping HMI numeric entry limits in PLC ladder logic.
  3. Trigger on an edge. Add an Apply pushbutton and detect its rising edge, so the command runs once per accepted change instead of on every scan. Without the edge, a pushbutton held for 2 seconds would fire the command once per PLC scan, hundreds of times.
  4. Run the edit. On that edge, ladder logic reads the V location and issues the edit command with that entry's identifier and the value taken from V-memory.
  5. Gate the next change. Let a second edit start only after the completion indicator sets, and interlock the machine on the same bit so it never acts on a half-applied change.

What does a worked example look like with SET, RESET and RESET COUNT presets?

A rotary feed with a 600 line encoder counted at 4x quadrature produces 600 x 4 = 2400 counts per revolution, so a configured table of SET at 1500, RESET at 3000 and RESET COUNT at 4000 counts places its transitions at 225, 450 and 600 degrees.

Treat the table values as an illustration; your configuration defines the real ones. The count in this scenario is totalizing, so it runs past one revolution.

Table entry Preset (counts) Position (degrees)
SET 1500 225
RESET 3000 450
RESET COUNT 4000 600

The degrees come straight from the count scale: 600 encoder lines times 4 counts per line gives 2400 counts per revolution, and each position is counts / 2400 x 360. Check the middle row: 3000 / 2400 = 1.25 revolutions, and 1.25 x 360 = 450 degrees.

The product changes and the SET transition has to move to 270 degrees. In counts that is 1800 / 2400 = 0.75 revolutions, and 0.75 x 360 = 270 degrees. The operator types 1800 into the SET entry object, presses Apply, and the ladder edge issues Edit & Reload Preset Table Entry for the SET entry with 1800. The next cycle should show the output firing 45 degrees later than before.

Operators who think in inches or millimetres instead of counts should have the ladder convert the entry before the command runs; the convert inch presets into encoder counts page works one conversion through.

Run the first test of a changed threshold with the machine in a safe state and hands clear of the mechanism: a wrong threshold fires an output or clears the count at an unexpected point in the cycle.

How do you check the module accepted the new preset?

Check the chain in order: the register must match the panel, the command's completion indicator must set, and one controlled cycle must show the output firing at the new 1800 count mark, with each reading isolating a different store.

  • Register. As described above, the register and panel must agree on the typed value. If they disagree, correct the panel's write address or data format, because the module side was never the problem.
  • Command. Press Apply once and confirm the completion indicator sets. A register that changes with no completion means the command never ran, ran on the wrong entry, or is still busy.
  • Machine. Run one controlled cycle and watch the SET output fire at 1800 counts, the 270 degree mark. Put the known-good 1500 back if the transition lands somewhere it should not.

If all three agree, write the address-to-entry mapping into the project notes so the next engineer can retrace the path without reading your ladder from scratch.

When should the table load at startup instead of at runtime?

Load the configured table at startup when the presets are fixed for the product, and run the edit command only for the entries operators change, because a startup load applied once will never pick up later panel edits.

Situation Route
Presets fixed per product Configured table loaded at startup, no ladder edit
One or two operator-adjustable entries Apply pushbutton per entry, rising edge trigger, edit command on that entry
Several entries changed per shift Same command per entry, each gated on completion before the next

Recommendation: Keep every fixed entry in the configured table and let the module load it at startup. Give the operator one Apply pushbutton per adjustable entry, trigger Edit & Reload Preset Table Entry on its rising edge, and gate a second edit on the completion bit, so a preset change stays one edge, one command and one confirmation.

If the line also needs a notice board or andon display beside the counter, our shop-floor screens and andon boards are built for that side of the floor.

Questions

Does an edited preset survive a power cycle?

The edit command changes the preset table currently loaded in the module. At the next power-up the module loads the configured table again, so the operator's value is gone. If presets must still be in force after a restart, have the ladder logic run the edit command once at startup, reading each value from the same V-memory address the panel writes.

What if operators need to change two presets at once?

Run them one at a time. The edit instruction changes a single entry per execution, so give each adjustable entry its own Apply pushbutton and block the next command until the previous one sets completion. Both edits then land in a known order, and the mapping in your project notes stays one address, one entry, one button.

Do SET, RESET and RESET COUNT entries use the same edit command?

Yes. Every entry in the loaded table is edited through the same command; what changes between entries is the entry identifier the ladder passes and the effect the module applies at that threshold. Test each function separately under controlled conditions before production resumes, because a SET, a RESET and a RESET COUNT behave differently at the threshold.

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