Section 06 · Practice Questions

Conveyor & Process Control

Nine practical PLC problems from the production floor — fallen-bottle detection with a pusher, multi-position stamping, pump systems with safety windows and lockouts, two-tank filling, a seven-day tea-making sequence, a workcell with running box-count and scrap timeout, and a sensor-triggered conveyor pause.

9Questions
9Worked Solutions
All practice sections

Map every input and output first, decide which signals need seal-in, which need timers, and which feed counters — then build each rung one stage at a time.

Q1

Fallen-bottle detection with a pusher

Write a program that detects a fallen bottle on a conveyor and, when one is found, actuates a mechanism to push it off into a box or tray below. X1 and X0 are the two sensors and Y0 drives the pusher. Provide the truth table and derive both the SOP and POS expressions.

ShowHide worked solution

X1 is the upper beam (head height of a standing bottle) and X0 the lower beam (body height). A standing bottle blocks both beams; a fallen bottle blocks only the lower one; the (X1=1, X0=0) state is physically impossible.

Pusher fires only when the lower beam is blocked AND the upper beam is clear.
X1 (upper)X0 (lower)conditionY0
00no bottle0
01fallen bottle1
10impossible0
11standing bottle0
SOP: Y0 = X1′ · X0 POS: Y0 = (X1 + X0) · (X1′ + X0) · (X1′ + X0′) — which simplifies to X1′ · X0
Ladder program
|---[/X1]---[ X0 ]---------( Y0 )---|

Single rung — the pusher fires when the lower beam is blocked and the upper beam is clear.

Final AnswerY0 = X1′ · X0 — pusher fires when only the lower beam is blocked.
Q2

Counting standing bottles with warning and stop

Extend the fallen-bottle program so the system also counts the standing bottles and resets itself just before the maximum hardware limit is reached. A warning flash-lamp must come on as the limit is approached; if the program is not reset by an external operator, the conveyor must be stopped.

ShowHide worked solution

Assume a hardware maximum of 9999. Pick a warning level (e.g. 9900) and a force-stop level (e.g. 9990). The counter C0 ticks each time a standing bottle passes (X1 AND X0 on a rising edge). A comparator triggers the warning flash near the limit; the DN bit kills the conveyor at 9990 unless the operator resets first.

Ladder program
Rung 1 — count standing bottles (rising edge of X1·X0):
|---[OSR EDGE]---[ X1 ]---[ X0 ]------(CTU C0, PRE = 9990)---|

Rung 2 — fallen-bottle pusher (from Q1):
|---[/X1]---[ X0 ]------------------(Y0)----|

Rung 3 — flash warning near the limit:
|---[ C0.ACC ≥ 9900 ]---[ CLOCK_1Hz ]----(FLASH_LAMP)---|

Rung 4 — force-stop conveyor at the force-stop level:
|---[ C0.DN ]----------(STOP_CONV)----|

Rung 5 — operator reset:
|---[ RESET_BUTTON ]----(RES C0)----|
Final AnswerCounter C0 tracks standing bottles; a comparator triggers the warning flash at 9900 and the conveyor stops at 9990 (DN). The operator’s reset button clears the counter.
Q3

Three-position conveyor with a stamping cycle

A part is placed on a conveyor at Position 1. When Start is pressed it moves to Position 2 where it stops for a stamping operation; after stamping it moves automatically to Position 3 where it is removed manually. Limit switches LS1, LS2, LS3 detect the positions. The stamping motor is reversible — UP_MOTOR drives reverse, DN_MOTOR drives forward — and LSDN/LSUP detect the stamper arm’s travel limits. Include interlocks.

ShowHide worked solution

Build the program as a small state machine — STATE1 (part at LS1), STATE2 (part at LS2, stamping in progress), STATE3 (part heading to LS3 for removal). The stamper rungs interlock against each other so both directions can never energise at once, and LSDN / LSUP guarantee the arm stops at its travel limits.

  1. Press Start while the part sits at LS1 — the conveyor advances toward LS2.
  2. LS2 trips — conveyor stops, DN_MOTOR drives the stamper down.
  3. LSDN trips — DN_MOTOR off, UP_MOTOR retracts the stamper.
  4. LSUP trips — conveyor restarts, moving the part toward LS3.
  5. LS3 trips — conveyor stops; the operator removes the part manually.
Ladder program
Rung 1 — master enable:
|---[/STOP]---[ START ]----+----( EN )---|
|                          |
|---[ EN ]-----------------+

Rung 2 — conveyor toward Position 2:
|---[EN]---[/LS2]---[/LS3]---[STATE1]---(CONV)---|

Rung 3 — enter stamping state at LS2:
|---[EN]---[LS2]---+----(STATE2)---|
|                  |
|---[STATE2]---[/LSUP]---+

Rung 4 — DN_MOTOR until LSDN (interlocked against UP):
|---[STATE2]---[/LSDN]---[/UP_MOTOR]---(DN_MOTOR)---|

Rung 5 — UP_MOTOR after LSDN until LSUP (interlocked against DN):
|---[STATE2]---[ LSDN ]---[/LSUP]---[/DN_MOTOR]---(UP_MOTOR)---|

Rung 6 — advance to Position 3 after stamping:
|---[STATE2]---[LSUP]----+---(STATE3)---|
|                        |
|---[STATE3]---[/LS3]----+

Rung 7 — conveyor toward Position 3:
|---[STATE3]---[/LS3]----(CONV)----|

Rung 8 — cycle complete:
|---[STATE3]---[LS3]----(RES STATE2)----|
|---[STATE3]---[LS3]----(RES STATE3)----|
Final AnswerState-machine ladder with STATE1, STATE2, STATE3 flags; mutually-exclusive UP_MOTOR / DN_MOTOR interlocks; conveyor energised only when moving between positions.
Q4

Pump with a 5-second safety window and 14-second restart lockout

Write a PLC program for a pump system: PS1 must be closed before any start; pressing Start energises the pump (button can then be released) and Stop stops it. PS2 and PS3 must both be closed for 5 seconds after the pump starts; if either opens, the pump shuts off and is prevented from restarting for a further 14 seconds.

ShowHide worked solution

The seal-in rung needs three pre-conditions: PS1 closed, Stop not pressed, and the 14-second lockout timer not active. A 5-second TON gives PS2/PS3 time to close after startup. After the window expires, loss of either pressure latches a FAULT, which kills the pump and starts the 14-s lockout.

Ladder program
Rung 1 — start with PS1 + STOP + lockout interlock, then seal-in:
|---[ PS1 ]---[/STOP]---[/LOCKOUT_T.TT]---[START]---+----(PUMP)---|
|                                                   |
|---[ PUMP ]----------------------------------------+

Rung 2 — 5-second safety window for PS2 & PS3:
|---[ PUMP ]----(TON T1, PRE = 5 s)----|

Rung 3 — fault if either pressure switch opens after the window:
|---[ PUMP ]---[ T1.DN ]---[/PS2 OR /PS3]----(FAULT)----|
   (in real ladder: split into two parallel branches of /PS2 and /PS3)

Rung 4 — drop the pump on fault, start 14-s lockout:
|---[ FAULT ]------(/PUMP)----|
|---[ FAULT ]------(TON LOCKOUT_T, PRE = 14 s)---|
Final AnswerPump seals when PS1 is closed and Start is pressed. T1 (5 s) gives PS2 & PS3 time to close. After the 5 s, loss of either pressure latches FAULT, which kills the pump and starts a 14-second lockout that blocks the next start attempt.
Q5

Two tanks filled in sequence from a single pump

Two tanks must be filled with water from a single pump. The pump is started manually with a Start push-button. When the first tank is full, the circuit must automatically begin filling the second by closing the first valve and opening the second. When the second tank is full, the pump must disconnect automatically and a sign lamp must light up to indicate the second tank is full.

ShowHide worked solution

Inputs: START (NO), STOP (NC), L1 (tank 1 full, NO), L2 (tank 2 full, NO). Outputs: PUMP, V1, V2 and LAMP.

Ladder program
Rung 1 — pump seal-in, stops when L2 trips:
|---[/STOP]---[/L2]---+----[START]---+----(PUMP)---|
|                     |               |
|                     |---[ PUMP ]----|

Rung 2 — V1 opens until tank 1 is full:
|---[PUMP]---[/L1]------------( V1 )----|

Rung 3 — V2 opens after tank 1 is full, until tank 2 is full:
|---[PUMP]---[ L1 ]---[/L2]------( V2 )---|

Rung 4 — sign lamp when tank 2 is full:
|---[ L2 ]----------------( LAMP )---|
Final AnswerV1 fills tank 1; once L1 trips, V2 takes over filling tank 2; when L2 trips, the pump drops and the sign lamp lights.
Q6

A seven-day tea-making sequence

Write a PLC program for the following tea-making process, which repeats every morning for seven days (the water tank holds enough for seven days only): pressing Start opens valve V1 and water flows into the heating tank; when the float switch FS trips, V1 closes and heating begins; when the temperature is reached, the thermostat disconnects the heater and opens V2 for 10 seconds; after V2 closes an alarm bell sounds to indicate the tea jug is full.

ShowHide worked solution

A clean five-stage sequence — V1 → HEATER → V2 (10 s) → BELL — where each stage uses the previous stage’s completion signal as its enable.

Ladder program
Rung 1 — V1 fills the heating tank until FS trips:
|---[ START ]---[/FS]---+-----( V1 )----|
|                       |
|---[ V1 ]---[/FS]------+

Rung 2 — HEATER ON after FS, OFF when TH (thermostat) trips:
|---[ FS ]---[/TH]---+-----( HEATER )---|
|                    |
|---[ HEATER ]--[/TH]+

Rung 3 — V2 opens for 10 seconds after the heater turns off:
|---[ TH ]----+--------( V2 )-------|
|             |
|---[ V2 ]---[/T1.DN]-+

Rung 4 — 10-second timer drives V2:
|---[ V2 ]----(TON T1, PRE = 10 s)---|

Rung 5 — alarm bell after V2 closes:
|---[ T1.DN ]----------( BELL )------|
Final AnswerSequential five-stage process — V1 → HEATER → V2 (timed 10 s) → BELL. Each stage uses the previous stage’s completion signal as its enable.
Q7

Workcell with a running box count and scrap-timeout reset

Design a conveyor-control system: S1 detects boxes entering, S2 detects boxes leaving; entry conveyor C1 brings them in, exit conveyor C2 takes them out. Keep a running count from S1 and S2. If more than 5 boxes are inside, stop C1. If there are no boxes inside, turn C2 off. If C1 has been stopped for more than 30 seconds, reset the count to zero (the boxes inside are then assumed scrapped).

ShowHide worked solution

One up-counter on the entry sensor, one down-counter (or second up-counter) on the exit sensor; the difference is the net count inside the workcell. Comparators against 5 and 0 gate the two conveyors; a 30-second TON while C1 is stopped clears everything.

Ladder program
Rung 1 — count box entering on rising edge of S1:
|---[OSR S1]------------(CTU C_IN)---|

Rung 2 — count box leaving on rising edge of S2:
|---[OSR S2]------------(CTD C_OUT)----|
   (net count = C_IN.ACC − C_OUT.ACC stored in N7:0)

Rung 3 — compute the net count:
|---[ ALWAYS_TRUE ]----(SUB C_IN.ACC, C_OUT.ACC, N7:0)---|

Rung 4 — entry conveyor stops if more than 5 boxes inside:
|---[ N7:0 ≤ 5 ]----------------------( C1 )---|

Rung 5 — exit conveyor off if zero boxes inside:
|---[ N7:0 > 0 ]----------------------( C2 )---|

Rung 6 — 30-s timer while C1 is stopped:
|---[/C1]----(TON T1, PRE = 30 s)----|

Rung 7 — on timeout, reset count (boxes scrapped):
|---[ T1.DN ]----(RES C_IN)----|
|---[ T1.DN ]----(RES C_OUT)----|
|---[ T1.DN ]----(CLR N7:0)----|
Final AnswerCTU on S1, CTD on S2, net count compared to 5 and 0; T1 (30 s) clears the count when C1 has been stopped that long.
Q8

Counting bottles in groups of ten

Write code that counts the bottles passing a counter. When the count reaches 10, the counter must reset itself and add 1 to Register 1.

ShowHide worked solution

One CTU with preset 10. Every rising edge of the sensor increments the accumulator. When ACC = 10, the DN bit fires for one scan: it adds 1 to register N7:1 (the ×10 counter) and resets the CTU back to zero. The system effectively counts boxes-of-10.

Ladder program
Rung 1: |---[OSR SENSOR]----------(CTU C0, PRE = 10)---|
Rung 2: |---[ C0.DN ]----(ADD N7:1, 1, N7:1)---|
Rung 3: |---[ C0.DN ]----(RES C0)----|
Final AnswerCTU with preset 10. On DN: ADD 1 to N7:1 and RES C0. The pattern repeats forever, counting groups of ten bottles.
Q9

Sensor-triggered conveyor pause and restart

Write a PLC program: a motor switches the conveyor ON or OFF; parts are detected by an optical sensor. When the sensor goes ON, the program waits 1.5 seconds before stopping the conveyor; after a further 2-second delay, the conveyor restarts. Start and Stop push-buttons are provided, and an indicator lamp must be ON whenever the system is active.

ShowHide worked solution

An ACTIVE seal-in latches the system on Start. Two cascading TON timers gate the conveyor: T1 (1.5 s) starts when the sensor sees a part — when T1.DN fires the conveyor stops. T2 (2 s) starts immediately after; when T2.DN fires the conveyor restarts. The lamp simply follows the ACTIVE seal.

Ladder program
Rung 1 — system seal:
|---[/STOP]---[ START ]----+----( ACTIVE )---|
|                          |
|---[ ACTIVE ]-------------+

Rung 2 — indicator lamp:
|---[ ACTIVE ]----( LAMP )----|

Rung 3 — 1.5-s timer triggered while sensor sees a part:
|---[ ACTIVE ]---[ SENSOR ]----(TON T1, PRE = 1.5 s)---|

Rung 4 — 2-s timer after T1 finishes:
|---[ T1.DN ]----(TON T2, PRE = 2.0 s)---|

Rung 5 — conveyor on/off logic:
|---[ ACTIVE ]---+----[/T1.DN]----+----( CONV )---|
                 |                |
                 |----[ T2.DN ]---+
Final AnswerTwo cascading TON timers (1.5 s then 2 s) gate the conveyor; the lamp follows the ACTIVE seal; Start and Stop manage the seal.