CTU vs CTD vs CTUD: Which PLC Counter Do You Need? @ACCautomation
CTU vs CTD vs CTUD: Which PLC Counter Do You Need?  @ACCautomation
Uploaded November 2026 | Updated November 2026, 21 hours ago
PLC counters CTU, CTD and CTUD on a conveyor buffer: counters count edges not time, and a count up count down pair has an ambiguous done bit.

⚡ QUICK ANSWER
A counter does not care how long its rung is true. It adds one on the rising edge, so a box can sit in front of a sensor for ten seconds and still count once, and the rung has to go false and true again before it counts another. Beyond that, the three types differ in ways that matter. A count up counter adds one per edge and does not stop at its preset, so the next edge takes it one above. A count down counter subtracts, never goes below zero, and sets its done bit at zero, which is why in ladder it has to be paired with a count up counter on the same address. That pair is the problem the video is really about, because its single done bit means full after counting up and empty after counting down. An up down counter does both jobs in one instruction and its done bit always means one thing: the count is at or above the preset. All of them are retentive, so a stop and a run leaves the count exactly where it was.

📖 FULL STEP-BY-STEP + DOWNLOADS (example program, Structured Text file)
accautomation.ca/plc-counters-ctu-ctd-ctud

ACC PLC Simulator: accautomation.ca/simulator
Example ladder logic file: accautomation.ca/simulator/acc-example-conveyor-counters.json
Structured Text file: accautomation.ca/simulator/acc-example-conveyor-counters.st

âąī¸ TIMESTAMPS
00:00 CTU vs CTD vs CTUD: Which PLC Counter Do You Need?
00:47 Where You Find Counters
01:10 A Counter Counts Edges
01:32 Count Up (CTU)
01:55 Reading the Counter Block
02:18 Count Down (CTD)
02:40 Count Up and Down (CTUD)
03:02 Counters Remember
03:27 Step One, Define the Task (PLC Program Development)
03:51 Step Two, Define the I/O
04:22 Step Three, the Sequence
04:47 Step Four, the Program
05:10 Hold at the Load Station
05:31 Two Counters, One Address
05:54 The Structured Text Version
06:17 Step Five, Testing the Count
06:45 Testing Buffer Full
07:20 Testing an Empty Buffer
07:44 Testing Stop and Reset
08:08 Testing with a Real PLC
08:31 Common Counter Mistakes
08:55 Three Counters, One Conveyor
09:16 Try It Yourself

📚 WHAT YOU'LL LEARN
✅ Count one part per arrival regardless of how slowly it passes the sensor, because a counter responds to the rising edge rather than to the rung staying true
✅ Build a buffer count two ways, as a count up and count down pair sharing one address and as a single up down counter, then compare what their done bits actually tell you
✅ Compare the accumulated count instead of trusting a pair's done bit, which flips meaning depending on which direction you last counted
✅ Gate the hold on position as well as the count, so a full buffer stops the conveyor at the load station rather than leaving a part halfway down the belt
✅ Clear a retentive count with a reset instruction, and recognise that a stop and a run will not do it

❓ FREQUENTLY ASKED
Q: Does a count up counter stop when it reaches its preset?
A: No. The done bit turns on at the preset but the counter keeps going, so the next edge leaves the accumulated value one above the preset. If you need it to stop there, the logic has to do that itself.

Q: Why would anyone use a count up and count down pair instead of an up down counter?
A: Because the pair is how an up down count was built before the up down instruction existed, and plenty of working programs still use it. The catch is the shared done bit, which reads as full after counting up and as empty after counting down.

Q: Do counters lose their value when the PLC stops?
A: No, counters are retentive. Stop and run the controller and the count is still there, which is correct behaviour because the parts on a real machine did not disappear. Only a reset instruction on the counter's address clears it.

Q: Will this work on a real PLC over Modbus?
A: It will, but watch the poll rate. The box passes each sensor in roughly a tenth of a second, so a slow poll can miss the edge entirely and lose counts.
👉 Full step-by-step, example program and Structured Text file: accautomation.ca/plc-counters-ctu-ctd-ctud

🔗 MORE RESOURCES
â–ļ Free ACC PLC Simulator, runs in your browser: accautomation.ca/simulator
â–ļ PLC timers explained, TON, TOF and RTO: accautomation.ca/plc-timers-explained-ton-tof-rto
â–ļ PLC Beginners Guide: accautomation.ca/programming/plc-beginners-guide
â–ļ Free eBooks: accautomation.ca (subscribe for download)

🛒 RECOMMENDED HARDWARE
â–ļ Shop: automationdirect.com
â–ļ Parts Guide: accautomation.ca/purchase-find-parts

đŸ’Ŧ Questions? Drop a comment below.

🔔 New tutorials every Monday — Subscribe and hit the bell!

#PLC #LadderLogic #IndustrialAutomation #PLCProgramming #ACCAutomation #PLCCounter #StructuredText #PLCTutorial #LearnPLC

Regards,
Garry
ACC Automation
accautomation.ca
CTU vs CTD vs CTUD: Which PLC Counter Do You Need?Whats Inside a PLC Relay Trainer?The Easiest Way to Learn PLC Logic Right Now đŸ› ī¸ #PLC #ShortsNO Contact in PLCs Essential Motor Control!Your drives are useless without this #industrial #maintenanceBefore You Code Your Conveyor, Do THIS First! #plcprogramming #automation #engineeringC-More CM5 Firmware Update Step by Step!The physical skills your PLC simulator cant teach #plc #automation #skillsIs this the end of PLC programming? #ai #engineering #automationBuilding Industrial Control Systems Virtually #automation #engineering #techAdd This Counter & Timer to Your PLC Now! #tutorial #plcprogramming #automationHow to Actually Use Your PLC Toggle Switches! #plc #automation #tutorial
ACC Automation: PLC & Industrial Control Learning |

CTU vs CTD vs CTUD: Which PLC Counter Do You Need?

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER