Save HMI numeric entries to an indexed PLC table

8 min read · Published November 8, 2026

Store each HMI numeric entry in the next PLC V-memory word by writing through a pointer: load the pointer word V2200 with the table start O3000 once on the first scan with SP0, then copy the entry word V2100 through the pointer with OUT P2200, increment with INCB, and reset the event bit C3. The panel's notification and handshake bits, C5 and C6, must be assigned or the trigger never fires.

A numeric entry that lands in the same word every time is fine for a setpoint and useless for a log. When the numbers have to pile up, the destination address has to move. The PLC instruction set moves it with a pointer: one word that holds the address of the next free slot in the table. Load that word once on the first scan with the table start. Copy each accepted entry through it, add 1 word, and clear the event bit so one press stores one number. This page sets up the whole arrangement: the 3 addresses to reserve, the first-scan initialization, the store rung, the panel's notification and handshake bits, and the data-view checks that show the table filling 1 word per entry.

How do you save each numeric entry to the next V-memory word?

You write the entry through a pointer. Load the pointer word V2200 with the table start O3000 once on the first scan, then on every accepted entry run LD V2100, OUT P2200 and INCB V2200, and reset the event bit C3.

A pointer is an ordinary data word that holds an address instead of a measurement. OUT P2200 sends the value in the accumulator to whichever word the pointer addresses, so when INCB adds 1 word to V2200 the destination moves from V3000 to V3001 and the next press stores there. One press, one word, in order, for as many entries as the table has room for.

Why does every entry overwrite the same word?

A fixed destination never moves. OUT V3100 writes V3100 on the first press and writes V3100 again on every press after it, so 10 accepted entries leave one word holding the last number and 9 numbers gone.

Changing the trigger, or pressing Enter again, cannot move a destination that is written into the instruction. The address has to live in a word the logic can change, and an offset or a pointer gives it that home.

Destination style What the logic holds Where the next entry lands
Fixed: OUT V3100 nothing extra V3100, every time
Offset: OUTX V3000 value in V2000, offset in V2001 the word at V3000 plus the offset; INCB V2001 after each store
Pointer: OUT P2200 value in V2100, pointer in V2200 the word the pointer addresses; INCB V2200 after each store

For a single setpoint the fixed move is all you need, and moving an HMI numeric entry into PLC memory on Enter covers that one-word case. The rest of this page builds the pointer version, which is the one that fills a table.

What do you need before you write the logic?

Three bit assignments and 3 addresses: the entry object's notification bit C5, handshake bit C6 and accept button C3 set in the panel project, and in the PLC an entry word V2100, a pointer word V2200, and a table that starts at V3000. Decide the table length before the line runs. A 100-word table takes 100 entries before you have to reset the pointer.

  • In the panel project, the numeric entry object needs its notification bit and handshake bit assigned. The arrangement used here puts Enter notification on C5, handshake on C6, and a momentary accept button on C3.
  • In the PLC, V2100 is the word the panel writes the entered number into, V2200 holds the pointer, and the table starts at V3000 with as many reserved words as you decide to give it.
  • Keep the entry word and the pointer word in different addresses. If the pointer lives in the entry word, the first number entered replaces the address, and the next store lands wherever that number happens to point.
  • Open data view in the programming software so you can watch V2100, V2200 and the table words while you test.

How do you point the pointer at the table start?

Initialize it once, on the first scan, with SP0. STR SP0, LDA O3000 and OUT V2200 load the octal address O3000, the start of the table, into the pointer word V2200 before any entry can fire.

SP0 is the special relay that is on only for the first scan after power-up, so the initialization runs exactly 1 time. LDA loads the address in octal form, which is what the O in O3000 marks. An initialization rung left on every scan would snap the pointer back to V3000 before each store, so the rung must sit behind SP0.

STR SP0
LDA O3000
OUT V2200
END

To start the table over and write over it from the top, run the same LDA O3000 and OUT V2200 again from a panel reset button or an internal condition. Keep that reset rung separate from the store rung so an ordinary entry never re-initializes the pointer.

Which rung stores the entry and advances to the next word?

One rung does the whole store. Triggered by the accept bit C3, it copies the entry word V2100 through the pointer with OUT P2200, increments the pointer with INCB V2200, and resets C3 so the same press cannot store twice.

  1. Assign the bits in the entry object: notification on C5, handshake on C6, and the momentary accept button on C3.
  2. Enter the first-scan initialization rung from the previous section.
  3. Add the handshake rung:
STR C5
SET C6
END
  1. Add the store rung:
STR C3
LD V2100
OUT P2200
INCB V2200
RST C3
RST C6
END
  1. Save the program to the PLC and open data view on V2100, V2200 and V3000 on.
  2. Enter a test value and press accept. V3000 takes the value and the pointer advances 1 word from O3000. Enter a second value: it lands in V3001 with the pointer 1 word further on.

Order inside the store rung matters. The value goes out through the pointer first, then INCB advances the pointer, then the bits reset. Resetting C3 inside the same rung is what makes one press store exactly 1 word.

Recommendation: store through a pointer whenever entries have to accumulate one per press. Initialize V2200 with LDA O3000 behind SP0, keep the entry word and the pointer word in separate addresses, reset the event bit inside the store rung, and pick the OUTX offset form only when the logic has to compute a destination from a position number.

What do the notification and handshake bits do?

The notification bit tells the PLC that the operator pressed Enter, and the handshake bit tells the panel that the PLC took the number. The arrangement used here assigns notification to C5 and handshake to C6, sets C6 when C5 comes on, and resets C6 in the store rung.

The bits do nothing until they are assigned. If the entry object's control settings leave notification and handshake empty, C5 never comes on, the store rung never fires, and no ladder edit will fix it. Check the entry object's control settings in the panel software before debugging the ladder.

The momentary accept button is a separate event. The panel sets C3 and the PLC must reset it in the rung that consumes the value, or clear every event bit each scan before END with STR SP1 and an RST for each event bit, C3 and any others such as C7 or C17.

That set-and-clear exchange is the same handshake an HMI uses when it signals an alarm acknowledgment back to the PLC.

Example: six entries through the pointer

Six entries fill V3000 through V3005, one word each. The pointer starts holding O3000, every accepted entry writes through it, and INCB then moves the pointer 1 word, so entry 1 lands in V3000 and entry 6 lands in V3005.

Say the operator keys in a part count and presses accept 6 times. Entry 1 is 120: C3 fires, OUT P2200 writes 120 into V3000, INCB moves the pointer to O3001, and RST C3 clears the event. Entry 2 is 45 and lands in V3001. The run continues like this:

Entry Entered value Written to Pointer holds after INCB
1 120 V3000 O3001
2 45 V3001 O3002
3 7 V3002 O3003
4 250 V3003 O3004
5 63 V3004 O3005
6 188 V3005 O3006

The count checks out. The pointer holds the table start plus the number of accepted entries: 3000 plus 6 gives 3006, so a seventh entry would write V3006. To write over the table from its top, re-run LDA O3000 and OUT V2200. The next accepted entry then overwrites V3000 while entries 2 through 6 keep their values until the pointer reaches them again.

How do you check the table fills one word per entry?

Watch 4 things in data view while the line is in a safe state: the entry word V2100, the pointer V2200, the event bits, and the table words from V3000 on. Each accepted entry should change exactly 1 table word and advance the pointer by 1 word.

Check the panel-to-PLC path first: enter a value and watch V2100 change, because the store rung can only copy what arrived. Then check the initialization. Before the first entry, V2200 should hold O3000. Then take entries one at a time.

What you see What it points to Next check
Value reaches V2100, but every accept rewrites V3100 a fixed destination in the store rung replace OUT V3100 with OUT P2200 and add INCB V2200
Pointer holds 0 or leftover data before the first entry the SP0 initialization never ran check that the LDA O3000 rung is saved to the PLC and sits behind SP0
Nothing happens when Enter is pressed the notification bit was never assigned in the entry object open the entry object's control settings and assign C5 and C6
Pointer advances twice for one press the event bit is still true on the next scan count how long the bit stays on: how many scans an HMI momentary button bit stays on
A value lands outside the table the pointer shares a word with live data, or the entry word doubles as the pointer check which word the pointer took and remap the addresses

A bit that stays true across scans fires the store rung again, and the reset belongs in the rung that consumed the event; PLC flag triggers an HMI event once: check the reset path walks that pattern. A pointer aimed at the wrong word can overwrite data the process depends on, so a value outside the table takes the entry function out of service until the mapping is fixed.

When the checks pass, each press stores exactly 1 word, the pointer sits 1 word ahead of the last entry, and the reset rung brings the next tableful back to V3000.

Questions

What happens if the pointer is never initialized?

The pointer word holds whatever the last program left in it, often 0, and OUT P2200 then writes to that address, which can be anywhere in V-memory, including words the process is using. Initialize with STR SP0, LDA O3000, OUT V2200 so the pointer is set before the first entry can fire. If the PLC has been running without the initialization rung, write O3000 into V2200 once from data view, or cycle power so SP0 runs.

How many entries fit before the pointer has to be reset?

As many words as you reserve. The example table starts at V3000 and no end is implied: six entries fill V3000 through V3005, a seventh writes V3006, and the pointer keeps advancing until you reinitialize it or it reaches the end of user memory. Decide the length before the line runs, stop accepting entries at the last reserved word, and show the pointer value on the panel so the operator can see which slot the next number takes.

Does the panel project need to know where the table is?

No. The panel writes the entered number into its entry word, V2100 in this arrangement, and raises the notification and accept bits. All of the addressing happens in the PLC, so you can move the table or change its start address by editing LDA O3000 and the reset rung, and the panel project stays as it is.

Can the same pointer read entries back out of the table?

Yes. The same indirection works in reverse: LD P2200 loads the word the pointer currently addresses, the mirror of the LD P3000 read used when testing a one-word move. To walk the table for a display without disturbing the write position, load a second pointer word from the table start with the same LDA and OUT pair and step that one instead.

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