A 2-hour oven soak on a DL06 needs one accumulating timer (TMRA) plus 32-bit BCD math. A seconds-to-minutes-to-hours counter chain does not need repair, it needs to go. Below is the wrong-fix list first, then the rebuild in the order you commission it. Each section ends with a check that must pass before you move on.
Stop chaining counters for the 2-hour soak
The chained version (Rungs 8 to 11 of the first listing) is a maintenance trap. Do not tune the presets; replace it.
-
Self-resetting counter.
CNT CT3 K3is reset by its own done bit (STR CT3), so its contact is on for one scan. Rung 6 (STR CT1 AND CT3 RST C0) only ends the cycle ifCT1andCT3are both on in that same scan. -
Two preset registers. The minute counter presets from
V5000and the hour counter fromV5002. Putting only 2 in the hour preset leaves the minute preset undefined. That is the confusion in the original question. -
Countdown by subtraction. Rungs 12 and 13 subtract
CTA0andCTA1from presets, so the display is only correct if every counter reset and rollover happens in the right scan.
Replacement: one TMRA with a 2-hour preset, and everything else derived from its accumulator. TMRAreserves two consecutive words for an 8-digit preset and an 8-digit accumulator, so it can time up to 2,777 hours.
Check: before editing, note which counters (CT0, CT1, CT3) and timers (T0, T1, T2) the program uses. The rebuild keeps T0 and T1 for heater control and uses T2 for the batch. Delete the counter rungs and confirm the project still compiles.
Reserve TMRA T2 and load the 72,000 preset
That does not fit in one 4-digit BCD word (maximum 9999), so the preset lives in a word pair:V4004 (low) and V4005 (high). In BCD, 00072000 is V4004 = 2000 and V4005 = 0007.
// Preset load - use 32-bit instructions
STR SP1
LDD K72000
OUTD V4004
SP1is the always-on contact, so the pair is rewritten every scan and cannot be left corrupted.
STR SP1
LD V4008 // minutes entry, assumed free register, BCD
MUL K600
OUTD V4004
Confirm the exact operand forms of MUL, OUTD, and LDD in the DL06 instruction reference. TMRA T2 also consumes the word after TA2 for the upper half of its accumulator, so do not use timer T3 anywhere in the program.
Check: in a DirectSoft data view, show V4004 and V4005 as BCD. They must read 2000 and 0007. If they read 2000 and 0000, the constant load was 16-bit.
Gate the timer on oven temperature and the cycle bit
Keep the timer rung from the second listing. It is the right structure for a soak timer:
STR V2000 V3002 // oven temp vs setpoint compare contact
AND C0 // cycle running
STRN C0
OR T2 // reset input
TMRA T2 V4004
The enable line only passes while the oven is at setpoint and C0 is on. An accumulating timer holds its value when enable drops, so a temperature dip pauses the soak instead of restarting it. The reset input clears the accumulator when C0 is off or the timer has finished. Confirm the compare direction of the V2000/V3002 contact in the DirectSoft instruction help; the soak should run only when oven temperature has reached setpoint.
Check:C0. Force the oven temperature below setpoint and watch TA2 stop. Bring it back and watch it resume from the held value. If it restarts from zero, the reset input is wired to something other than C0 and T2.
Compute remaining time with 32-bit math
The second listing computes remaining time with LD V4004, SUB TA2, DIV K600. Those are 16-bit instructions on a 32-bit quantity. LD V4004 picks up only the low word, 2000 for the 2-hour preset. At idle the display shows 2000 / 600 = 3 (truncated), not 120 minutes. This is the "numbers all over the place" symptom: the arithmetic runs, but on the wrong width.
Two more faults in the same rung:
-
STR C0only updates the result while the cycle runs. After the cycle ends, or before it starts, the HMI shows a stale value. Change the contact toSP1so the display always tracks the timer and shows the full preset at idle. - The divisor is right for minutes (600 tenths of a second per minute) but the result must be kept as total minutes in a scratch register, not written straight to the hours or minutes tag.
STR SP1
LDD V4004
SUBD TA2
DIVD K600
OUT V4006 // total minutes remaining, 0-120 (assumed scratch)
Check the DIVD operand forms in the instruction reference. If it requires a V-memory pair instead of a constant, load 600 into a spare pair once and reference that.
Integer division floors. At the first tenth of a second the display drops to 119, and it reads 0 for the entire last minute. To round up instead, add ADDD K599 before the divide, which shows 0:01 through the final minute and 0:00 only at done.
Check: at idle, V4006 reads 120. Run the 2-minute test preset and confirm it reads 2, then 1, then 0.
Split remaining minutes into hours and minutes-within-hour
The second listing divides by K600 a second time to get hours. Bob's correction in the original exchange is right: once you have minutes, divide by 60 for hours (K60). But a second gap remains. Total minutes is not the minutes field of an H:MM display.V4000 would show 119, not 59. Compute the remainder explicitly:
STR SP1
LD V4006
DIV K60
OUT V4002 // hours left
LD V4002
MUL K60
OUT V4008 // hours x 60 (assumed scratch)
LD V4006
SUB V4008
OUT V4000 // minutes left within the hour
Reload from V4002 before the MUL rather than chaining off the DIV result. That way the upper accumulator word holds nothing you did not put there. Use a scratch register that is not already used elsewhere; V4008 here collides with the optional minutes-entry register in the preset section, so pick a different free word for one of them.
Total minutes left (V4006) |
Hours (V4002) |
Minutes (V4000) |
|---|---|---|
| 120 | 2 | 0 |
| 119 | 1 | 59 |
| 61 | 1 | 1 |
| 60 | 1 | 0 |
| 59 | 0 | 59 |
| 0 | 0 | 0 |
Check:use the table above as pass/fail.
Match BCD formats between V-memory and EZTouch tags
The DirectLOGIC CPU does timers, counters, and native math in BCD. A V-memory word is only a container; the HMI decides how to read it. If the tag or the display object is set to binary while the register holds BCD, the arithmetic looks inaccurate even when it is correct. Every minutes-remaining value would drift from the real one in odd increments, which matches the symptom of numbers that divide badly by 10, 100, or 60.
- In the EZTouch (EZ-T10C-F) or C-more (EA7-S6C) tag database, set the data type of
V4000andV4002to BCD. - Set the numeric display objects to the same format.
- For any operator entry object that writes a preset, set its format to BCD as well. An entry typed as binary writes a value the PLC will read as a different BCD number.
Check: type 120 into the entry object and read the register in DirectSoft. It must show 0120 in BCD view. Then compare each displayed value on the panel with the same register in the data view; any mismatch is a format mismatch.
Latch the done bit above the timer rung
The second listing ends the cycle with STR T2 RST C0 (Rung 6, before the timer). That works because the reset input on the timer is STRN C0 OR T2. When T2 comes on, the timer clears its own accumulator and drops T2 in the same pass. The bit is a one-scan pulse. Any rung that reads T2 below the TMRA rung can miss it.
Y1 is documented as CYCLE IS DONE but no rung drives it. Latch it above the timer rung:
// above the TMRA T2 rung
STR X30
SET C0 // start
STR T2
RST C0 // batch complete
SET Y1 // latch done
STR X31
RST C0 // reset cycle from HMI
STR X30
OR X31
RST Y1 // clear done on new start or reset
X31 (RESET CYCLE) is documented but not used in either listing, so nothing in the shown logic aborts a running cycle. The rung above adds it. If you need X30 and the done latch to interact differently, remember that the last rung to write a bit in the scan wins.
Check: run the 2-minute test to completion. Y1 stays on after the timer clears, C0 drops, TA2 returns to 0, and pressing start clears Y1. Then start another run and hit X31 mid-cycle to confirm C0 drops and the accumulator clears.
Check the heater rungs after the timer change
Rungs 2 to 4 and 7 implement time-proportioning on Y0 and stay as they are.
-
V3005is scaled byDIVR R4.0949998, which turns a 0 to 4095 range into 0 to 1000, converted back to BCD inV1400. -
TMRF T1 V1400becomes the on-time inside each 1 s cycle.
Two items to verify while you are in the file:
- Rung 7 (
Y0) does not referenceC0,T2, orY1. The heater does not turn off when the batch completes. If the process needs heaters off at done, add a cycle-active or preheat-enable contact to that rung. -
X2is documented as ELEMENT TEMPERATURE TO HIGH, but no rung reads it. TheV2002 K5000compare in Rung 7 is the only element temperature condition. Confirm its direction (on above or below 5000) against the compare-contact help, and do not treat X2 as a software interlock until a rung uses it. Keep the high-limit protection hardwired.
Check: with the batch idle, watch Y0. Then confirm whether it should be on or off at done and match that to the process requirement before releasing the change.
Port the countdown to a DL05 with a UDC counter
Rung 3 uses BTOR, DIVR, and RTOB. The DL05 does not support the binary-to-real and real-to-binary instructions, so that rung will not port. Scale with integer math instead (multiply first, then divide). The batch timer itself does not need real math, so the TMRA approach above carries over if the DL05 instruction set has the 32-bit LDD, SUBD, and DIVD forms you need; confirm in the DL05 reference.
The alternative is a seconds-based up/down counter (UDC) driven by a 1 s pulse (SP4). The wrong fixes to skip:
- Hand-built seconds/minutes borrow ladders. A set/reset borrow scheme was tried in which one coil was on constantly and never produced a decrement. Do not build one.
- Timer-minus-entry subtraction in mixed formats. This produced inconsistent numbers until every tag was set to BCD.
Convert the counter to display fields with DIV: minutes from LD CTA0 and DIV K60, hours from DIV K3600. A 2-hour load of 7200 s fits.
Check:
Run the end-to-end verification
Do this with a 2-minute preset (K1200) first, then the real 72,000 preset only after the short run passes.
| Step | Action | Pass condition |
|---|---|---|
| 1 | Idle, C0 off |
V4004/V4005 read 2000/0007 (real preset); display 2:00; TA2 = 0 |
| 2 | Start cycle (X30), oven below setpoint |
C0 on, TA2 not counting, display frozen at full time |
| 3 | Oven reaches setpoint |
TA2 counts at 10 per second; display steps down |
| 4 | Drop oven temperature below setpoint mid-run |
TA2 holds; on recovery it resumes, not restarts |
| 5 | Watch the hour rollover (use K71400 or K36000 preset) | Minutes field goes 1:00 to 0:59, never shows 60 or more |
| 6 | Timer completes |
Y1 latches; C0 drops; TA2 = 0; display returns to full preset |
| 7 | Start again, then X31 reset mid-cycle |
C0 drops, TA2 clears, Y1 clears |
| 8 | Panel vs data view, all four registers | Values match; BCD format on every tag and display object |
| 9 | Heater output during idle and at done | Y0 behavior matches the process requirement (see heater section) |
Run the full 2-hour batch once with a stopwatch beside the panel. The soak time is the time from when the oven first holds setpoint, so the wall-clock time from start will be longer than 2:00 by the preheat.
FAQ
How do I set a 2-hour preset on a DL06 TMRA timer?
LDD K72000 then OUTD V4004. In BCD view the low word reads 2000 and the high word 0007.
How do I show hours and minutes remaining on an EZTouch panel?
Derive total minutes remaining from (preset - TA2) / 600 using 32-bit instructions, then hours = minutes / 60 and display minutes = total minutes - hours x 60. Set both panel tags and display objects to BCD to match the V-memory.
How do I preload a DL05 or DL06 counter for a countdown?
Write the accumulator directly with LD V1400 then OUTD CTA0 instead of pulsing the counter up to the target. OUTD also writes zero to the next word, so keep that word free.
When should I stop editing and call AutomationDirect support?
Stop when DirectSoft rejects a 32-bit instruction or operand form you expect to be valid, or when the arithmetic is still wrong after all tags and display objects are BCD and the 2-minute test fails step 5 or 6. Have the project file, CPU model, firmware level, and the exact instruction the compiler rejects ready, then contact AutomationDirect technical support. Do not bypass heater interlocks to get a test to pass.