Store HMI recipe tables in PLC memory and load the values

9 min read · Published November 9, 2026

Keep the master copy of each setup in PLC data registers: 99 records of 5 values occupy 495 consecutive registers. The panel writes only the selected record number and a load command, and ladder logic copies the five values to the working setpoints. Use the panel's own recipe database instead when operators must edit recipes at the panel.

A machine with many products needs many setups. Retyping five setpoints at the panel for every changeover is where mistakes come from. The question is whether the panel can hold a table of setups, one per product, and send the chosen row to the PLC. It can. The version that survives commissioning keeps the master table in PLC data registers: 99 records of 5 values occupy 495 consecutive registers, the panel writes only a record number and a load command, and ladder logic copies the selected record to the working setpoints. This article walks through that build: the memory map, the name storage, the panel objects, the ladder rung, the checks, and the point at which the panel's own recipe database is the better tool.

Can an HMI hold a table of 99 setups with 5 values each?

Yes, and the cleanest version keeps the table in the PLC: 99 records of 5 values each occupy 495 consecutive data registers, the panel writes only the selected record number, and one rung of ladder logic copies the chosen record to the working setpoints.

Two designs do the job. A panel recipe database stores the records in the panel and a load action writes them to PLC addresses; that is the right tool when operators build and edit recipes at the panel. The other design stores each setup as a row of PLC data registers and lets ladder logic do the transfer; that is the right tool when the PLC should own the master values and the panel should only pick a row. The rest of this article builds the second design, because it keeps the recipe data inside the logic that consumes it and leaves nothing in the panel to lose or version.

What do you need before you build the table?

You need a working panel-to-PLC link, a free block of data registers at least 495 registers long, five defined fields per setup, and panel objects that can write one number and one command word into the PLC.

  • A tested link. Write one test value from the panel into a PLC register and read it back before any recipe logic exists; testing writes before anything moves is the whole subject of the operator panel PLC link setup article.
  • A CPU that can copy a block and reach a computed address, through indirect addressing or a copy-with-offset instruction. One documented build used the FIND table search together with the OUTX and LDX block moves; your CPU's manual names its own equivalents and operand rules.
  • A free register block: 495 registers for the table plus a handful for control, in an area nothing else writes.
  • The five fields on paper with units and safe ranges, for example fill weight in grams, seal temperature in °C, and three conveyor speeds.
  • Panel objects that write registers: a numeric selection object for the record number, a numeric entry object per field, a text entry object for the name, and a load pushbutton.

Where do the 495 recipe registers go in PLC memory?

Give the table its own fixed block with a stride of five registers per record: record N starts at the base plus (N − 1) × 5, so a base of V2000 puts record 1 at V2000 and record 99 at V2490, ending at V2494.

Keep the control words next to the table so the map is one thing to document:

Registers Holds
V1990 Selected record number, 1 to 99, entered from the panel
V1991 Load command: 1 = copy requested, cleared to 0 by the PLC
V1900 to V1904 Working copy of the five values the machine runs on
V2000 to V2494 Master table: 99 records × 5 registers

The stride does the addressing for you: record 1 occupies V2000 to V2004, record 2 occupies V2005 to V2009, and every start address is the base plus (N − 1) × 5. The register numbers above are an example layout; keep the same shape on any CPU and substitute your own free block. Reserve the whole span and keep other rungs out of it, because a stray write into the middle of the table changes a recipe with nothing on screen to show it.

How do you store the recipe name in PLC registers?

Reserve two characters per register and size the name block for the longest name in the library: a text object on the panel writes the name into consecutive registers, and the documented example below stores SUGAR in three, V1410 to V1412.

In that documented layout, each 16-bit register carries two ASCII characters, with the first character of each pair in the low byte:

Register Value in hex view Characters held
V1410 5553 S, U (the view reads the pair reversed, as US)
V1411 4147 G, A (the view reads AG)
V1412 2052 R, then a trailing space

Six characters fill three registers, so a name block sized for 20 characters takes 10 registers. Two details trip people up here. A tag nickname such as WALNUT QTY is a label for the programmer; the PLC reads values out of registers, out of V3000 in that documented example, so the quantity still had to arrive by an entry object or by logic. And the byte order inside the register is the detail to verify against your CPU before writing any comparison; one documented build converted a name into a single identifier word at V1500 with a byte extract, and the byte-swap setting was the part that had to be set to match the layout. To go deeper on the identifier side, see passing a recipe name from an HMI to a PLC variable.

How does the panel select a record and ask the PLC to load it?

The panel writes two words and nothing else: a numeric selection object puts the record number 1 to 99 into V1990, and a load pushbutton sets command register V1991 to 1 until the PLC clears it.

The operator also builds the table from the panel, one numeric entry object per field aimed at the correct table register; writing each HMI numeric entry to the next word of a PLC table is the same addressing habit. The name goes in through a text entry object aimed at the name block.

Two panel details decide whether operators trust the screen. Give selection an explicit load pushbutton, because a highlighted row is a selection and the transfer happens only when the command word moves. And if operators report touching one row while another loads, cut the visible list to about 5 lines and retest; that density resolved a documented selection problem on a longer list.

What does the ladder logic do when the operator presses load?

The rung waits for the command word, checks the record number is between 1 and 99, computes the record's start address, block-copies five registers into the working set, then clears the command.

Build and commission in this order:

  1. Reserve the map, put the addresses on the drawing, and enter record 1's five values from the panel; read V2000 to V2004 in data view and confirm each one.
  2. Write the load rung: on V1991 = 1, check 1 ≤ V1990 ≤ 99, compute the start address as base + (V1990 − 1) × 5, block-copy 5 registers into V1900 to V1904, then clear V1991 to 0.
  3. Write clamp rungs that hold each working value inside its safe range; clamping HMI numeric entry limits in PLC ladder logic shows the pattern.
  4. Test the first transfers with the machine outputs disabled, reading V1900 to V1904 after each load.
  5. Only then let the working set drive the live setpoints.

One safety note belongs here: the five values become machine behaviour, so the clamp rungs sit between the working copy and the outputs on every field, and the first load happens with nothing able to move.

What does a worked example look like with 99 setups of 5 values?

The example is a packaging line with 99 recipes, five values each: fill weight 50 to 500 g, seal temperature 100 to 200 °C, and three conveyor speeds, stored from V2000 with the name block at V1950.

The arithmetic, step by step:

  • Table size: 99 records × 5 registers = 495 registers, V2000 through V2494.
  • The operator names recipe 30, GLAZE 30, 8 characters: 8 ÷ 2 = 4 registers, V1950 to V1953.
  • The operator selects 30 and presses load. Start address: V2000 + (30 − 1) × 5 = V2000 + 145 = V2145.
  • The rung checks 1 ≤ 30 ≤ 99, copies V2145 to V2149 into V1900 to V1904, and clears V1991.
  • Data view now shows the five working registers holding recipe 30's values, and the changeover runs from them.

Change the selection to 99 and repeat: V2000 + (99 − 1) × 5 = V2000 + 490 = V2490, and the copy reads V2490 to V2494, the last row of the table. If both ends land correctly, the addressing is right for every record between them.

How do you check that the right record loaded?

Read the five destination registers in one data view and compare them with the table you entered, for record 1, record 99 and one middle record, because the name shown on the panel can match while the numbers behind it are wrong.

Set one data view watching V1990, V1991 and the five working registers so the selection, the command and the result sit together; watching several PLC values in one data view sets that up. Then run this sequence:

  • Enter a record with unmistakable values, for example 111, 222, 333, 444 and 555, load it, and confirm all five destinations.
  • Load record 1 and record 99 to prove both ends of the address arithmetic.
  • Switch from one loaded record straight to another and confirm every destination changes; a destination that keeps an old value means the copy missed a register.
  • Confirm V1991 returns to 0 after each load, so a held button does not repeat the transfer.

When all four pass on the real hardware, populate the remaining records.

When is the panel's recipe database the better route?

Use the panel's recipe database when operators must create and edit recipes at the panel and the panel should hold the master copy: the database stores the records, recipe objects list them, and a load action writes each field to its assigned PLC address.

The route is documented and capable: one documented implementation holds up to 99 recipe sheets, and some platforms let the PLC trigger the transfer as the active partner, or by turning on a control address. The trade is ownership: the master values live in the panel project, so backups, version control and a panel replacement all involve it. Size that route with the same arithmetic before committing; planning the row limit of an HMI recipe table covers the capacity side.

Recommendation: for a fixed library of up to 99 setups of 5 values, keep the master records in PLC data registers with a 5-register stride, let the panel write the record number and the load command, and block-copy behind a range check; switch to the panel's recipe database when operators must create and edit recipes at the panel. Keep selection on the operator panel either way; a line-wide board showing the running recipe is a different job, the one covered by shop-floor screens and andon-style boards.

Questions

How many registers does a 13-character recipe name need?

Seven. Two characters per register means 13 ÷ 2 = 6.5, rounded up to 7, with the last register padded with a space so the unused half can never read as a character. Size the name block once from the longest name in the library, then never let an entry exceed it.

What happens if the operator changes the record number but never presses load?

Nothing transfers. The rung keys on the load command word, so the working setpoints keep running the previous record until the button is pressed. If operators need to see the difference, show both the selected number and the loaded number in two panel fields.

Do the five values have to fit one register each?

No. A 16-bit register holds one integer, while a 32-bit value such as a floating-point temperature takes two consecutive registers. A record with one 32-bit field and four 16-bit fields needs a stride of 6 registers, and the address arithmetic becomes base + (N − 1) × 6. Keep one data type per field and recompute the stride.

How do the 99 recipes survive a power cut or a CPU swap?

Place the table in the CPU's retentive register range so the values come back at power-up, and keep a written or exported copy of all 495 values outside the controller. After a CPU replacement, reload the table from that copy and run the record 1 and record 99 checks again before production.

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