Put each output's weekday, on time and off time in PLC registers, and let the operator panel write plain numbers into those registers. The PLC compares the values against its real-time clock every scan and drives the output, so operators edit eight schedules without touching the panel program.
Eight outputs, each with its own weekday, on time and off time, and values an operator can change during a shift: the dependable way to build that is to keep the schedule in the PLC. Reserve a table of registers, one row per output, and let the operator panel write plain numbers into it. The ladder compares every row with the controller's real-time clock on each scan and drives the output coil from the result. The panel never owns the schedule; it owns the numbers. What follows is the table layout, the comparison rungs, the operator screen, and the tests that confirm each transition.
Where should the day and time comparison live: the panel or the PLC?
Keep the comparison in the PLC ladder: the panel writes six numbers per output into controller registers, and the ladder compares those registers with the controller's real-time clock on every scan, so an edited schedule takes effect with no download to the panel.
Panel software also offers fixed timed events, and those suit dates nobody changes. An operator-edited row is a different job: an event definition lives in the panel project, so a reschedule is a project edit, and a panel-internal tag the controller never reads leaves the ladder running on stale values. There is also one conflict to avoid. If timed events and ladder rungs both write the same physical output, the two writers fight and the output appears to ignore its schedule. Give each scheduled output one owner, the ladder, and make every panel field write a register the ladder reads. If the split of duties is new to you, whether an HMI panel can replace a PLC controller in a small machine maps where each device's job ends.
Recommendation: Keep the schedule table and the comparison in the PLC for any output an operator may reschedule, and reserve panel-side timed events for fixed dates that never change. Give the ladder sole ownership of each scheduled coil, and let every panel field write a PLC register the ladder reads.
What do you need before you start?
Three things to have ready: the clock words the controller documentation names, a 48-word schedule table, and a panel screen with numeric input objects bound to those registers.
- The clock words. Compact controllers keep the real-time clock as data words: one for the day of the week, one for the hour, one for the minute, with addresses named in the manual. Read them in monitor mode and watch the minute word tick before debugging anything else, because a schedule reads a wrong or frozen clock as real time. Set the clock once; some controllers take the time from a programming-software command in the form
time hh-mm-ss, others from a write through the panel. - The schedule table. A row per output: 48 words for eight outputs, held in the retentive register range the documentation marks as surviving a power cycle.
- The panel screen. Any operator panel that writes registers to the controller can do the job; the object is a numeric input addressed to a schedule word, with its minimum and maximum set.
How do you lay out the schedule table in the controller registers?
Give each output one row holding enable, weekday, on hour, on minute, off hour and off minute, and map row 1 to output 1, row 2 to output 2, through row 8.
| Word | Meaning | Range |
|---|---|---|
| Enable | row active | 0 or 1 |
| Weekday | day the window starts | 1 to 7 |
| On hour | window opens | 0 to 23 |
| On minute | window opens | 0 to 59 |
| Off hour | window closes | 0 to 23 |
| Off minute | window closes | 0 to 59 |
This article numbers the weekday 1 = Sunday through 7 = Saturday; if your controller numbers Monday first, only the day constants change and the minute arithmetic stays the same. The panel enforces the ranges above on every entry, which keeps a stray 25 out of an hour field.
How does the ladder compare the clock with the schedule?
Convert clock and schedule to minutes of the day, then compare: a row with its on time before its off time runs one comparison, and a row that crosses midnight needs the day test split across the start day and the next day.
- Once per scan, compute
NOW = CLOCK_H * 60 + CLOCK_M. TheCLOCK_names are placeholders for the three clock words your manual names. - Per row, compute
START = ON_H * 60 + ON_MandEND = OFF_H * 60 + OFF_M. - Same-day rung, for START less than END: the coil is on while Enable = 1, the clock's day word equals Weekday, NOW >= START, and NOW < END.
- Overnight rung, for START greater than END: the coil is on while Enable = 1 and (day word equals Weekday and NOW >= START) or (day word equals Weekday + 1 and NOW < END). After midnight the day word has already moved on while the window still belongs to the start day, which is why the second branch tests the next day. Weekday + 1 rolls from 7 back to 1 for a Saturday night window.
- START equal to END drives nothing: a zero-length window leaves the output off.
Most ladder toolkits supply the pieces this needs: equal, greater-or-equal and less-than compares, plus multiply and add for the minutes-of-day math. Keep every existing permissive and safety interlock in series with the schedule coil; the window decides when the machine may run, and the interlocks decide whether it may.
What does a worked example look like for one output?
A dust collector that runs Wednesday 06:30 to 14:30 stores start 390 and end 870 minutes of day, with weekday 4 in the 1 = Sunday convention, and it switches on at 06:30 and off at 14:30.
The arithmetic: START = 6 × 60 + 30 = 390; END = 14 × 60 + 30 = 870; Wednesday = day 4 (Sunday 1, Monday 2, Tuesday 3, Wednesday 4).
| Clock reading | NOW | Rung test | Coil |
|---|---|---|---|
| Wed 06:30 | 390 | day 4 matches, 390 >= 390 and 390 < 870 | on |
| Wed 07:15 | 435 | 435 >= 390 and 435 < 870 | on |
| Wed 14:29 | 869 | 869 < 870 still true | on |
| Wed 14:30 | 870 | 870 < 870 is false | off |
The off edge lands exactly at the stored minute because NOW < END stops being true the moment NOW reaches END.
An overnight row uses the two-branch rung. A parts cooler scheduled Friday 22:00 to Saturday 05:00 stores START = 22 × 60 = 1320, END = 5 × 60 = 300, Weekday = 6. The rung tests (day 6 and NOW >= 1320) or (day 7 and NOW < 300). Friday 23:30 gives NOW = 23 × 60 + 30 = 1415, so the first branch holds and the coil is on. Saturday 04:30 gives NOW = 270, so the second branch holds and it stays on. Saturday 05:01 gives NOW = 301, both branches fail, and the coil drops.
How do you build the operator screen on the HMI panel?
Build one numeric input object per field, address it to the row's register, and set its limits: weekday 1 to 7, hours 0 to 23, minutes 0 to 59, enable 0 to 1, so an entry past the limit is rejected at the panel.
Eight rows of six fields is 48 entry objects on one screen, one row per output with the output number beside each row. Put a numeric display on each field, addressed to the same register, so the operator sees the stored value and the value being typed. A write lands in the register the moment the operator confirms the entry, and the rung picks it up on the next scan, with no download and no transfer logic. This is the same division of labor as letting an HMI change a PLC timer preset instead of a constant: the panel owns the number, the ladder owns the logic.
How do you test the schedule and check it worked?
Test one output first with an on time two minutes ahead of the clock, then check the off edge, the wrong weekday and the overnight branch before loading the real schedule into all eight rows.
- Back up the running controller and panel projects before editing either one.
- In monitor mode, watch the clock words advance and confirm the day word matches the calendar.
- Enter a test row: Enable 1, the current weekday, on time two minutes ahead of the clock, off time two minutes after that.
- Watch the coil turn on at the stored minute and off two minutes later.
- Change the row's weekday to another day and watch the coil drop immediately.
- Enter an overnight row such as on 23:58, off 00:02. To see the after-midnight branch without standing there past midnight, set the controller clock to 23:57 with its documented time command and let it roll; a clock change moves every other time-based function with it, so do it when nothing else depends on the time.
- Edit one row and confirm the other seven outputs hold their state.
- Clear the test values, enter the production schedules, and stay for one real transition before leaving the schedule in charge.
It worked when the coil follows the row: on at the stored minute, off at the stored minute, dead on any other weekday, and no row touching its neighbours.
What changes when daylight saving time starts?
The clock jumps an hour, and every schedule compared against it moves with the clock: a 06:30 row still fires at 06:30 controller time, which drifts an hour from the plant's wall clocks for part of the year.
Fix the clock, and leave the rows alone: correct the controller clock at the two switches a year, and every schedule value stays valid. Setting a PLC clock from the operator panel for daylight saving time shows the panel-side write that handles it. Editing 48 rows twice a year is the alternative, and it invites the typo the field limits exist to catch.
Questions
What happens to the schedules when the PLC loses power?
Schedule words live in the controller's data registers, so retention depends on which range you pick. A range that clears at power-up comes back as zeros, and a rung looking for enable 1 and weekday 1 through 7 finds no match, so every output sits off until the values are re-entered. Pick a retentive range for the 48-word table. After a power cut, confirm the clock kept time too, because a controller that restarts its clock at a default runs every row at the wrong hour.
Why does a row fire on the wrong weekday?
Weekday numbering is a convention, and controllers and panel labels do not have to agree. If the screen's note says 1 is Sunday while the operator thinks 1 is Monday, every window fires one day off. Print the convention next to the weekday field on the panel screen, keep the ladder's roll-over test consistent with it, and check one row against a calendar before trusting the rest.
How do you give one output two windows in the same day?
Give the output two schedule rows and two rungs, both driving the same coil through an OR. A machine that runs 06:00 to 11:00 and 13:00 to 17:00 holds start 360 and end 660 in one row, start 780 and end 1020 in the other, and the coil turns on when either comparison is true. Two windows on all eight outputs doubles the table to 96 words.
How precisely does the output switch at the scheduled minute?
To the minute. The rung re-evaluates every scan, so the coil changes within one scan time after the clock's minute word rolls, and scan times on a small controller are typically a few milliseconds. The table has no seconds field, so second-level timing is out of reach; anything that needs a faster edge belongs on a timer instruction, not on the clock.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.