A recipe button is a register transfer, so a save button is the same transfer reversed: duplicate each recall button, swap its source and destination, and point the pair at one recipe's own storage registers. Give every recipe a separate group so a later save cannot erase an earlier one.
An operator fills in the setpoints on the main screen and wants to keep them as Recipe 1, then set up Recipe 2 tomorrow from the same fields. The recipe button can do this, and the trick is to stop reading it as a recipe tool. It is a register transfer with a fixed source and a fixed destination. The buttons already in the project move stored values into the working registers. A duplicated set with those two fields reversed moves the operator's entries into storage. This article maps the registers, builds the save set, keeps three recipes apart so one save leaves the others intact, and tests the result before the line runs. Storing the recipes in the PLC's own data tables keeps them with the logic and away from the panel, the arrangement set out in choosing a PLC for recipe storage and one PID loop.
How do you save current screen entries into a recipe button?
Treat every recipe button as a register transfer with a fixed source and a fixed destination. Build the save direction by duplicating each recall button and swapping those two fields. A six-parameter recipe then needs six reversed pairs per recipe.
The default recipe button writes a list of preset numbers into PLC registers when pressed. That is the recall direction. The recipe button setup in the project editor offers a source mode shown as Source from Another Tag, and that mode replaces the preset list with a register location. With a register as the source, the button becomes a general transfer between two register groups, and the direction follows from which group is the source. Swap the two fields and the transfer reverses.
Two behaviors are worth knowing before you edit anything. A button whose source is still a preset constant writes that constant to its destination list on every press, so relabeling the button Save changes the screen text and nothing else. The same constant-source behavior is also a tool: a button with the constant 0 as its source writes 0 into its whole destination group with one press, the quickest way to clear a recipe from the panel.
A recipe button transfers on demand. Recording values over time is a different mechanism, covered in whether an HMI panel can store PLC data for later retrieval.
Which registers hold the operator's entries and the stored recipes?
Map two register groups per recipe before touching any button: the working registers that hold what the operator typed, six of them in the example, and one storage group of the same length per saved recipe, kept clear of the working set and of the other recipes.
Build the map in the editor. List every editable field on the main screen and the register or tag it writes to; those addresses are the working registers. Reserve one storage group per recipe with the same register count in the same order, so parameter 3 in the working set lines up with parameter 3 in every storage group.
Count registers, not parameters. A 16-bit integer takes one register, and a 32-bit floating-point value takes two consecutive registers with the word order agreed between the HMI and the PLC; the article on displaying a PLC float stored in two word registers on an HMI shows the nonsense a mismatch produces. Six integer parameters need six registers; one float among them pushes the group to seven.
Close the map with three checks: every destination register accepts writes, the storage groups stay clear of the working registers and of each other, and the groups sit in the PLC's retentive range so a power cycle leaves saved recipes in place. Add one register per group for the recipe number, the technique described in passing a recipe name from an HMI to a PLC variable, so the screen can show what each group holds.
How do you build the save button set step by step?
Duplicate each recall button, reverse the source and destination of every parameter pair in the copy, and put the copies on their own screen. A six-parameter recipe turns into one save button carrying six transfer rows, or six single-pair buttons.
You need the project file open in the editor, the PLC memory map with the retentive range marked, and a register monitor reachable online or through the PLC diagnostics. With the map on paper, the work is duplication and field swapping:
- Open each existing recall button and write down every source and destination pair in parameter order. This list is the master record for the recipe.
- Duplicate the recall button, or duplicate its transfer rows if one button holds several pairs.
- Swap source and destination in every copied pair, in the same order. A half-swapped list writes values into the wrong parameters.
- Set the copied button's source mode to the register and tag mode, shown as
Source from Another Tagin the recipe button setup, so it reads the working registers. - Point the save set at the storage group of the recipe it belongs to, and confirm that recipe's recall button uses the same group as its source.
- Move the save buttons to their own screen and label each one with the recipe number, so nobody on the run screen saves over a recipe by leaning on the panel.
- Download to the panel only after the test below passes, with the machine in a safe state until then.
How do you stop recipes overwriting each other?
Give each recipe its own storage group, three groups of six registers in the example. A save button writes over every register in its destination, so two recipes sharing one group means the most recent save erases the other recipe.
The transfer table for one recipe:
| Button | Source | Destination |
|---|---|---|
| Save recipe 1 | working registers | recipe 1 storage group |
| Recall recipe 1 | recipe 1 storage group | working registers |
| Clear recipe 1 | the constant 0 | recipe 1 storage group |
Recipes 2 and 3 repeat the three rows against their own groups. The clear row is optional; it retires a recipe by writing 0 across its group. Keep one save set and one recall set per recipe and give each pair of sets its own group, because a save writes over every register in its destination list. Two save buttons aimed at one group leave only the later save in place. Tie any on-screen recipe indicator to the group's number register, not to whichever button was pressed last.
Worked example: what does a three-recipe register map look like?
A three-recipe machine with six single-register parameters needs a map of 24 registers, 36 transfer pairs across the save and recall buttons, and three optional clear buttons writing the constant 0, six registers at a time.
Take a small packaging machine. The main screen carries six parameters, each a single 16-bit register: target speed, seal temperature in °C, bag length in mm, batch count, dwell time in tenths of a second, and reject limit.
The map comes out like this:
- Working registers: 6.
- Storage: 3 recipes × 6 registers = 18 registers, plus one number register per group, so the whole map is 24 registers.
- Buttons: 6 parameters × 3 recipes × 2 directions = 36 transfer pairs, plus 3 optional clear buttons writing the constant 0 over 6 registers each.
Saving the screen as Recipe 2 runs the save set's six pairs from the working registers into Recipe 2's group; recalling Recipe 2 runs the same six pairs in reverse. Test it with seal temperature 120 °C and dwell 45, which is 4.5 s: press save, type 150 and 60 into the working fields, press recall, and 120 and 45 must come back. The register positions in this example are illustrative numbering for the map; the real addresses come from the PLC's memory map.
How do you test the save and recall buttons safely?
Check each pair with values that stand out from production numbers, for example 123 and 456, and check three things: the save stores them in the right group, new entries replace them in the working registers, and the recall brings the stored pair back.
Run the test at a planned stop or on a copy of the project, because a mis-mapped pair writes into live PLC memory and can move a machine setpoint.
- Type values that stand out from production numbers into two or three working fields, for example 123 and 456.
- Open the register monitor so the working registers and all storage groups are visible at once.
- Press Save recipe 1: the working registers stay at 123 and 456, and group 1 now holds them.
- Type 200 and 300 into the same fields and press Recall recipe 1: the working registers return to 123 and 456.
- Press Save recipe 2 and confirm group 1 is untouched. This step catches two recipes aimed at one group.
- Press the clear button on a spare group and confirm only that group goes to 0.
If a save lands in the wrong registers, stop using the buttons, correct the pair list against the map, and repeat from step 1. A control with a destination list in doubt stays out of service until its full destination list has been traced and retested.
Recommendation: keep the existing buttons as the recall set, build the save set as a swapped duplicate on its own screen, give each recipe a storage group of its own, and check every pair with test values on a stopped machine; where the editor offers a documented save action on the recipe button, use it in place of the manual swap.
When is a recipe button the wrong tool?
Keep the swapped-button method for register transfers, and reach for the documented alternatives when they exist: a dedicated save action on the recipe button where the editor provides one, the manufacturer's recipe backup for file-based systems, and the constant 0 for clearing groups.
The method needs an editor that exposes a source and a destination for every parameter, and a source mode that accepts a register or tag. Confirm both before planning the job, because editor families differ. Some document a dedicated save action on the recipe button, shown as Save Tags to Recipe in one family's reference, and that action performs the reversal for you. Others keep recipes as named files on the panel with no tag-to-tag transfer, and for those the save path is the manufacturer's documented recipe or backup procedure. Where the editor offers neither a source field nor a save action, work from the documentation for the installed panel and software, or through the vendor's support channel. Whichever path the editor takes, the discipline is the same: pairs listed in parameter order, one storage group per recipe, and every value checked with test values before the line runs.
Questions
Do saved recipes survive a power cycle?
Only if the storage groups sit in the PLC's retentive range. Many PLC data tables keep part of their memory through a power loss and clear the rest at power-up, so a recipe group placed in cleared memory comes back empty after every restart. Read the retentive range from the PLC's memory documentation and place the storage groups inside it. Give the working registers the same treatment if the panel should boot with the values from the last shift.
How many registers does a decimal parameter need?
One 16-bit register holds a whole number in most PLC data tables, and a 32-bit floating-point value needs two consecutive registers, with the word order agreed between the HMI and the PLC. Size each group in registers, because parameters of different widths occupy different numbers of them, and keep the data type and word order identical in both directions so 12.5 saved as two words recalls as 12.5.
What does a storage group show before anything has been saved?
Whatever that memory powers up with: zeros if the group was cleared with the constant-0 button or starts at zero, and leftover values otherwise. Add one marker register per group to the map and one extra transfer pair to each save button, writing the constant 1 into the marker. Show the marker on screen so the operator can tell a stored recipe from an empty group.
Can one save button write to whichever recipe the operator chooses?
Not with fixed pairs, because the source and destination of a recipe button are set in the project, so each storage group needs its own save button. A run-time choice needs indexed addressing in the PLC: the button writes the working values to a fixed block, and PLC logic copies that block to the storage area named by an index register. That is PLC logic, not a recipe button setting.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.