Pro
8 min
CCST 05 — CTU Counter (Count-Up)
ccstladdercounterCTUbatch
Ready to build this?
Sign up free — no credit card required. This scenario requires the Pro plan.
Sign up to play this scenario →Already have an account? Log in
Briefing
Count 10 product detections via PART_SENSOR. When the count reaches 10, assert BATCH_DONE. Reset on RESET_PB.
Objectives
- Pulse CTU_1 on each rising edge of PART_SENSOR
- Set PV = 10
- Assert BATCH_DONE on CTU_1.Q
- Reset counter with RESET_PB
Hints
- CTU_1(CU:=PART_SENSOR, R:=RESET_PB, PV:=10)
- BATCH_DONE := CTU_1.Q
I/O Table
Inputs
PART_SENSORPart detect sensor
BOOL · %I0.0
RESET_PBReset push-button
BOOL · %I0.1
Outputs
BATCH_DONEBatch complete output
BOOL · %Q0.0
Your program will be tested against:
All test cases run automatically when you submit. Assertions are hidden until you pass.
- #1Batch not done at count 9
Batch not done at count 9
- #2Batch done at count 10
Batch done at count 10
- #3Reset clears batch done
Reset clears batch done
Related scenarios
Ready to build this?
Sign up free — no credit card required. This scenario requires the Pro plan.
Sign up to play this scenario →Already have an account? Log in