Store the 21 master recipes in PLC memory and keep a separate block of active setpoints. Compare the PLC clock hour to the change hour, fire a one-shot, advance the index, wrap it from 20 back to 0, and copy the 10 setpoints of the indexed recipe into the active block. Let the operator edit and save only through access-controlled panel objects.
A recipe set that switches on its own once a day needs three things kept apart: the master recipes, the values the machine is running on, and the schedule that moves between them. Keep the 21 masters and the schedule in the PLC, and keep one block of active setpoints as the only values the control logic reads. Let the operator edit that block through access-controlled panel objects. Whichever panel sits on the cabinet door, the clock comparison and the copy routine live in the PLC, so the change happens with no operator present and no particular screen displayed.
Keep the master recipes in the PLC
The panel can store recipes, but this job belongs in the controller. One backup of the PLC program then carries the logic, the table and the schedule together. A schedule that lives in the PLC keeps running when the HMI panel is offline. The copy routine that moves values between the table and the running setpoints is the same one used for storing HMI recipe tables in PLC memory and loading the values. This article adds the clock-driven advance and the rules that keep the operator inside a bounded edit path.
What you need
- A PLC with a real-time clock. The hour register is what the logic compares, and it reads 0 through 23 from midnight to midnight.
- Table space: 21 slots × 10 setpoints, 210 data words.
- A running block of 10 words holding the active setpoints.
- One index register with a valid range of 0 through 20, and one one-shot bit.
- An operator panel with numeric entry and user access levels.
- A change hour: 06:00 local in the example, the start of first shift.
- A window with the machine in a safe state for the first test.
Steps to set up the daily change
-
Set the clock. Enter date and time, check the hour against a trusted clock, and set the controller's daylight saving handling; setting a PLC clock from the operator panel for daylight saving time covers that job. The comparison follows whatever the clock says, so a wrong clock moves the changeover by the same amount.
-
Reserve the table. On a DL06, V-memory addresses count in octal. Start the table at V10000. With one word per setpoint, slot 1 spans V10000 through V10011 and slot 2 spans V10012 through V10023.
-
Reserve the active block. Put the running setpoints at V3000 through V3011, clear of the table and of the program's other data. The ladder reads its setpoints from these 10 words only, never straight from the table.
-
Add the index. Hold the recipe selection in one register with a valid range of 0 through 20, and reject anything outside that range before a copy instruction runs. The range check keeps a mistyped operator entry from addressing memory outside the table.
-
Build the schedule. Compare the clock hour to the change value and fire a one-shot on the false-to-true transition. An hour match holds for the whole hour, so a plain contact would advance the index on every scan for that hour; the one-shot fires once. Compare-and-fire is the standard time-of-day schedule structure, and implementing time-based schedule control on a small controller with a bit array shows the same shape on another platform.
-
Advance, wrap and copy. In the one-shot rung, add 1 to the index, reset it to 0 when it passes 20, then copy the selected slot's 10 words into V3000 through V3011.
-
Build the operator path as two operations. Load validates the index and copies the chosen master into the active block. Save validates the number shown on the panel and copies the active block back into that same master, so a save can never land in a slot other than the one on screen. Clear each request bit when its copy finishes, so a button held down cannot retrigger it. An edit left unsaved lives only until the next advance, when the copy overwrites the active block. Where the controller library offers a recipe instruction with load and save functions, those calls can replace the two copy runs; the clock advance and the range checks stay the same.
-
Gate the panel objects. Give the operator the recipe number, the 10 active setpoints and the load and save controls. Put them behind the panel's user access levels so nothing else on the panel is reachable; screen access control for a protected operator view covers that setup.
Panels can carry schedules themselves, and scheduling PLC outputs by day and time from an HMI panel covers that pattern, which works well for outputs. A recipe advance is different. On some panels, a recipe action triggered by a PLC tag fires only while the screen holding it is displayed, so an unattended 06:00 tag would sit ignored until an operator opened that screen. If a project must use the panel path, hold the recipe screen up with the panel's event scheduler or a screen number written from the PLC, and verify that behavior in the panel's documentation first.
Worked example: 21 recipes of 10 setpoints advancing at 06:00
The inputs, and where each comes from:
- 21 daily slots with 10 setpoints each, one data word per setpoint: the requirement this job specifies.
- Table start V10000, a high data area clear of working data; running block V3000 through V3011: the allocation carried through the example.
- Octal address counting: how a DL06 numbers V-memory.
- Change hour 06:00: the hour first shift starts; the hour register reads 0 through 23.
The rule in words: a slot of 10 consecutive words advances the address by 12 in octal, because V10000 through V10007 hold 8 words and V10010 and V10011 add 2 more. Slot n starts (n - 1) × 10 words after V10000, converted from a decimal word offset to octal.
The arithmetic:
- Slot 1: V10000 through V10011 (8 + 2 = 10 words). Slot 2: V10012 through V10023.
- Slot 21 starts 20 × 10 = 200 words after V10000. 200 decimal = 310 octal (3 × 64 + 1 × 8 + 0), so slot 21 spans V10310 through V10321. The table totals 21 × 10 = 210 words.
- On the morning the cycle restarts: index 20 is running, the hour register reaches 6, the comparison turns true and the one-shot fires once. The index goes 20 + 1 = 21, the wrap test resets it to 0, and the copy moves V10000 through V10011 into V3000 through V3011. The machine runs slot 1 until the next 06:00.
- Mid-cycle check: index 4 selects slot 5, putting the copy start at 4 × 10 = 40 words of offset, 50 in octal (5 × 8), so the copy reads V10050 through V10061.
The result: the full 21-day cycle takes 210 data words, from V10000 through V10321. The running values sit in the 10 words at V3000 through V3011, and one index register plus one one-shot bit run the schedule.
The decision: commit the advance to the PLC here. The copy is a fixed 10-word move, the schedule is one comparison and one edge, and the 06:00 change needs no screen displayed and no operator present. Move the advance to a panel recipe action only where that panel's documentation shows the action firing while a different screen is displayed.
How to check it worked
- With the machine in a safe state, set the change hour a few minutes ahead and watch the index advance exactly once when the minute arrives. Leave the logic running past that hour and check for a second advance; there should be none.
- Open the data view in the programming software and check the table boundaries, the active block and the index before enabling the copy logic.
- Load slot 3, then slot 9, and compare all 10 active words against each source slot after each copy.
- Edit one active setpoint, save it, load a different slot, then load the first slot again and find the edit in place; check that the neighboring slot still holds its original values.
- Force the index to 20, let one advance run, and verify it lands on 0 and pulls slot 1.
- After any power-down, check the clock hour against a trusted clock before the next change hour.
An hour match fires only while the scan is running, so a controller powered down across 06:00 misses that day's advance. If a missed day matters to the process, store the date of the last advance and run one advance per missed day at power-up. Otherwise the machine re-runs the last recipe until the next match.
Recommendation: run the daily recipe change from the PLC. Keep the masters as fixed-length slots in a high data area, keep the active setpoints in their own block, advance the index once per matched hour through a one-shot, and wrap the top index back to 0. Give the operator load, edit and save controls on the active block, gated by the panel's access levels, with save writing only to the slot number shown on screen. Use a panel-triggered recipe action for the daily change only where the panel's documentation shows it firing from a screen that is not displayed.
Nothing in this setup touches the notice side of a cell. If the machine also needs a standalone status or andon screen beside the operator panel, that display has its own job; the shop-floor signage category lists the screens we build for it.
Questions
What happens to the daily recipe change when daylight saving time starts or ends?
The change fires when the clock's hour register equals the compare value, so it follows the PLC clock. When daylight saving time starts, a 06:00 compare fires at 07:00 local for one day unless the controller's clock is adjusted; when it ends, the changeover lands an hour early. Set the daylight saving handling in the clock step and the changeover stays at 06:00 for the shift.
Can the same logic change recipes twice a day?
Yes. Compare the hour to 6 and to 18, OR the two results into one one-shot, and let every match run the same advance, wrap and copy. Twenty-one slots at two changes per day repeat the full cycle every 10.5 days. Nothing else moves: the copy still carries 10 words per advance and the wrap still resets 20 back to 0.
How large can the recipe table get before this approach changes?
The schedule logic is independent of table size; only the copy length and the wrap value follow the recipe. Memory is the real limit: each slot holds one word per setpoint, so 21 slots of 40 setpoints need 840 words of data memory. Compare the table span against the controller's user data area before you fix the start address, and keep the running block clear of the table.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.