Basic
25 min

Sortation Diverter

conveyormaterial-handlingdiverteritem-trackingone-shot

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

Sortation Diverter scenario preview

Briefing

A material-handling conveyor feeds items through a photoeye at the entry zone. Each item carries an RFID-style tag identifying it as Type A or Type B. When the photoeye pulses, you must sample the TAG_A and TAG_B inputs immediately, then after a 500 ms travel delay energise the correct diverter for 1 s to route the item. An invalid tag combination (both or neither set) latches ERROR_LAMP.

Objectives

  • CONVEYOR_RUN must be on whenever STOP_PB is not pressed
  • When PHOTOEYE_IN pulses, latch the TAG_A and TAG_B values for the current item
  • After ~500 ms, energise DIVERTER_A_ENERGISE for 1 s if the item is Type A
  • After ~500 ms, energise DIVERTER_B_ENERGISE for 1 s if the item is Type B
  • If both tags or neither tag read, latch ERROR_LAMP (no diverter action)
  • ERROR_LAMP stays latched until power-cycle (or STOP_PB clears it in this simulation)

Hints

  • Use a ONE_SHOT on PHOTOEYE_IN rising edge to capture tag values into latched bits: ITEM_A and ITEM_B
  • Use a TOF or TON timer for the 500 ms travel delay before energising the diverter
  • Use a second TON (1 s) to hold each diverter energised: DIVERTER_A_ENERGISE := TON_A.Q
  • Validate: ERROR_BIT := (ITEM_A AND ITEM_B) OR (NOT ITEM_A AND NOT ITEM_B) — set on each PHOTOEYE_IN pulse
  • STOP_PB de-energises CONVEYOR_RUN and may be used to clear the error latch

I/O Table

Inputs

PHOTOEYE_IN

Photoeye pulse — 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

DIVERTER_A_HOME

Diverter A at home position

BOOL · %I0.3

DIVERTER_B_HOME

Diverter B at home position

BOOL · %I0.4

STOP_PB

Stop / E-stop push-button

BOOL · %I0.5

Outputs

CONVEYOR_RUN

Conveyor drive run

BOOL · %Q0.0

DIVERTER_A_ENERGISE

Diverter A solenoid (energise to divert A)

BOOL · %Q0.1

DIVERTER_B_ENERGISE

Diverter B solenoid (energise to divert B)

BOOL · %Q0.2

ERROR_LAMP

Error indicator lamp (latching)

BOOL · %Q0.3

Your program will be tested against:

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

  1. #1CONVEYOR_RUN asserts when not stopped

    With no STOP_PB, CONVEYOR_RUN must be on from the first scan

  2. #2STOP_PB stops the conveyor

    Press STOP_PB; CONVEYOR_RUN must de-energise immediately

  3. #3Type-A item energises Diverter A

    Inject a Type-A item; after photoeye + travel delay, DIVERTER_A_ENERGISE must pulse

  4. #4Type-B item energises Diverter B

    Inject a Type-B item; DIVERTER_B_ENERGISE must pulse

  5. #5Both tags simultaneously latches ERROR_LAMP

    Manually assert PHOTOEYE_IN + TAG_A + TAG_B together; ERROR_LAMP must latch

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

Runnable simulator field guide

PLC sortation diverter scenario: test checklist

Direct answer

The learner can create one event per product, schedule one actuation, prevent double counts and recover tracking from stops or missing confirmation.

Written for pLC learners programming a conveyor diverter with classification input, product tracking and destination proof.

a guarded conveyor sortation cell with three destinations, photoelectric sensing, pneumatic diversion and package confirmation while studying sensor-triggered package classification, divert timing, confirmation and count reconciliation
System map / 02

NODE 01observable

Scenario setup

Entry edge, product identity, class, conveyor state, travel delay, divert window, actuator feedback, destination sensor, counts and reject state.

NODE 02observable

I/O and state map

Sensor event through tracking record, time or position model, classification decision, output command, mechanism response and destination confirmation.

NODE 03observable

Normal run

Normal products and divert products each receiving one decision and one confirmed destination without duplicated counts.

NODE 04observable

Boundary run

Sensor chatter, back-to-back products, missing class, late response, failed confirmation, jam, stop during transit, restart and manual removal.

NODE 05observable

Injected fault

An event, identity, classification, tracking, timing, output, actuator, destination, count or recovery mismatch.

NODE 06observable

Target check

The model compared with measured conveyor travel, actuator response, sensor placement and safe recovery on target equipment.

Answer surface / 07

How do I time a PLC conveyor diverter?

Measure or model travel from the identification sensor to the diverter, retain the product decision and command inside a window that includes speed and actuator-response tolerances.

Why does a sortation count drift?

Common causes include level-based counting instead of edges, sensor bounce, duplicated writers, missing destination proof, manual product removal and unreconciled restart state.