Basic
20 min

3-Way Sortation Diverter

conveyorsortationdiverteritem-trackingfault
3-Way Sortation Diverter scenario preview

Ready to build this?

Sign up free — no credit card required. This scenario requires the Basic plan.

Sign up to play this scenario →

Already have an account? Log in

Briefing

An extension of the 2-way sortation diverter with a third lane. Each item passes a photoeye and carries exactly one tag (TAG_A, TAG_B, or TAG_C). After a 500 ms travel delay the correct diverter solenoid energises for 1 s to route the item into the corresponding lane. Multi-tag reads (more than one tag high) or zero-tag reads latch ERROR_LAMP. STOP_PB clears the error and halts the conveyor.

Objectives

  • CONV_RUN is on whenever the system is running (not stopped)
  • On PHOTOEYE_IN rising edge, latch tag values; validate exactly one tag set
  • After 500 ms travel delay, energise the correct diverter (A, B, or C) for 1 s
  • Multi-tag or zero-tag reads latch ERROR_LAMP and suppress diverter action
  • ERROR_LAMP latches until STOP_PB is pressed with all tags de-asserted

Hints

  • Capture tags on PHOTOEYE_IN one-shot: ITEM_A := TAG_A; ITEM_B := TAG_B; ITEM_C := TAG_C
  • Validate: VALID := (ITEM_A XOR ITEM_B XOR ITEM_C) AND NOT (ITEM_A AND ITEM_B) AND NOT (ITEM_A AND ITEM_C) AND NOT (ITEM_B AND ITEM_C)
  • Use TON_TRAVEL (500 ms) then TON_DIVERT (1 s) after valid detection
  • ERROR_BIT: S= on invalid tag, R= on STOP_PB AND NOT TAG_A AND NOT TAG_B AND NOT TAG_C

I/O Table

Inputs

PHOTOEYE_IN

Photoeye — item at entry zone

BOOL · %I0.0

TAG_A

Tag read: item is Type A

BOOL · %I0.1

TAG_B

Tag read: item is Type B

BOOL · %I0.2

TAG_C

Tag read: item is Type C

BOOL · %I0.3

DIVERTER_A_HOME

Diverter A at home position

BOOL · %I0.4

DIVERTER_B_HOME

Diverter B at home position

BOOL · %I0.5

DIVERTER_C_HOME

Diverter C at home position

BOOL · %I0.6

STOP_PB

Stop / fault-reset push-button

BOOL · %I0.7

Outputs

CONV_RUN

Conveyor drive run

BOOL · %Q0.0

DIVERTER_A

Diverter A solenoid

BOOL · %Q0.1

DIVERTER_B

Diverter B solenoid

BOOL · %Q0.2

DIVERTER_C

Diverter C solenoid

BOOL · %Q0.3

ERROR_LAMP

Error indicator lamp (latching)

BOOL · %Q0.4

Your program will be tested against:

All test cases run automatically when you submit. Assertions are hidden until you pass.

  1. #1CONV_RUN on by default, stops on STOP_PB

    Conveyor runs immediately; STOP_PB drops it

  2. #2TAG_A item activates DIVERTER_A after 500ms

    Single TAG_A read routes item to lane A

  3. #3TAG_C item activates DIVERTER_C

    Single TAG_C read routes item to lane C

  4. #4Multi-tag read latches ERROR_LAMP

    TAG_A and TAG_B both set causes error; STOP_PB clears

  5. #5Zero-tag read latches ERROR_LAMP

    No tag asserted when photoeye fires causes error

Ready to build this?

Sign up free — no credit card required. This scenario requires the Basic plan.

Sign up to play this scenario →

Already have an account? Log in