Conveyor Sort — 3D Cell
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
Boxes travel along a main conveyor. An entry photo-eye announces each arriving box. A second photo-eye mounted at a known height differentiates tall boxes from short ones. Tall boxes must be diverted onto a second conveyor by firing a pneumatic solenoid while the box is passing the diverter arm; short boxes continue past undisturbed. A counter watches the divert lane's limit sensor and lights a lamp once five tall boxes have been successfully diverted.
Objectives
- START energises MAIN_MOTOR; STOP de-energises it
- Fire DIVERTER_SOL so that tall boxes are pushed onto the divert lane
- Leave DIVERTER_SOL off for short boxes
- Light TALL_COUNT_LAMP once 5 tall boxes have cleared the divert-lane limit sensor
- Never energise DIVERTER_SOL while ENTRY_PE is still broken — the arm would collide with the box
Hints
- Use SET/RESET on MAIN_MOTOR driven by START (set) and STOP (reset)
- SET DIVERTER_SOL on HEIGHT_PE and RESET it on DIVERT_LIMIT — the belt spacing guarantees ENTRY_PE has already cleared before HEIGHT_PE fires
- Count DIVERT_LIMIT rising edges with a CTU (PV := 5) and drive TALL_COUNT_LAMP from its Q output
- SHORT_COUNT_LAMP is an optional extension — the 5 test cases only require MAIN_MOTOR, DIVERTER_SOL, TALL_COUNT_LAMP, and the ENTRY_PE safety invariant
I/O Table
Inputs
STARTStart push-button (momentary)
BOOL · %I0.0
STOPStop push-button (momentary)
BOOL · %I0.1
ENTRY_PEEntry photo-eye (beam broken by any box)
BOOL · %I0.2
HEIGHT_PEHeight photo-eye (beam broken by tall boxes)
BOOL · %I0.3
DIVERT_LIMITDivert-lane limit sensor
BOOL · %I0.4
Outputs
MAIN_MOTORMain conveyor motor contactor
BOOL · %Q0.0
DIVERTER_SOLPneumatic diverter solenoid
BOOL · %Q0.1
TALL_COUNT_LAMPTall-box count ≥ 5 indicator
BOOL · %Q0.2
SHORT_COUNT_LAMPShort-box count ≥ 5 indicator
BOOL · %Q0.3
Your program will be tested against:
All test cases run automatically when you submit. Assertions are hidden until you pass.
- #1Start energises main motor, stop drops it
START -> MAIN_MOTOR on; STOP -> off
- #2Tall box fires the diverter solenoid and is diverted
Inject a tall box: solenoid pulses for the transit window, box reaches the divert lane
- #3Short box passes without firing the diverter
Inject a short box: diverter solenoid remains off throughout the run
- #4Five tall boxes light TALL_COUNT_LAMP
Five tall boxes are injected spaced apart; TALL_COUNT_LAMP energises after the fifth is diverted
- #5Diverter never fires while a box still breaks the entry beam
Inject a tall box; assert the solenoid was never energised while ENTRY_PE was active
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