Loading local progress…
PLC Gym
PLC Gym homeLevel 1, 0 XP · your progress
Mission 43 · PRO (needs Pro)

The tank that overflowed: PLC fault finding exercise

Trace a fault to a failed device, then make the program catch it.

The receiving tank overflowed last night. The program is sound: something on the skid has failed. Find it with the and list, then make the program detect it, light the right fault lamp and stop the transfer.

This mission is part of ProCreate a free account: every account gets a free Pro trial until 5 December.

No card. Nothing to pay. Nothing to cancel.

Official release: 5 December. Top the leaderboard on the day and win 3 months of Pro, plus 2 weeks of Pro to give a friend. 2nd place wins 4 weeks. 3rd place wins 2 weeks. Rules

  • Every Coaching lesson, from zero
  • Every mission and lesson, as you level up
  • A practical test for every title, with a certificate
  • Rewind any test, one scan at a time
  • Worked solutions when you're stuck
  • The code converter, as much as you like
The 3D two-tank transfer rig this mission runs onPRO (needs Pro) mission
How the test runs

A healthy skid transfers to 80%

Test 1 of 4
Set by the testChecked by the testStep 6 of 6 · 11.3 s
Level
Applied
Time
About 25 min
Reward
+250 XP
Rig
3D two-tank transfer rig
Siemens editors
Ladder (LAD), SCL
Rockwell editors
Ladder, Structured Text
Beckhoff editors
Structured Text
Stage
26. Find the fault: it isn’t always the program
Required behaviour

The tank that overflowed: what your code must do

Night shift report: 'TK-202 overflowed during a transfer. The screen showed it empty the whole time, and the pump just kept going.' The program transfers water from TK-201 to TK-202: Start opens valve XV-201, the pump runs once the valve is proved open, and everything stops at 80%. Press Run, then Start, and watch. Compare each line of the input and output list with its Healthy column: one device is not doing what the list says. Then change the program so this failure is caught. Within a quarter of a second of the fault showing: the lamp for the failed device ON (SignalFault, ValveFault or PumpFault, and only that one), PumpOn and ValveCmd OFF, and LevelPV left at its last good value. No transfer may start while the fault is there. A healthy skid must still transfer to 80% with no lamp lit.

Transfer
Start opens XV-201. The pump runs once ZSO-201 proves it open. Both stop at 80%.
Find the fault
One device has failed. The input and output list shows what each signal should read.
Catch it
The failed device's lamp ON within 0.25 s, and no other. PumpOn and ValveCmd OFF.
Level shown
LevelPV keeps its last good value while the fault is there.
How it's checked
The checks press Start and Reset, nothing else, on a skid with the same fault as yours and on a healthy one. They read the skid itself: SpilledLitres (water on the floor), whether the pump is really running, and the real level in TK-202.
Tag table

The tank that overflowed: inputs and outputs

Your program reads 3 inputs and sets 6 outputs. 2 more inputs drive the simulation or show readings, for you to test with. The names are the same in every maker’s editor.

TagData typeYour codeWhat it means on the machine
StartBOOLReadsAn input your code needsStart pushbutton S1: begin a transfer
LevelRawINTReadsAn input your code needsLT-101 on the receiving tank, 4 to 20 mA input counts: 0 = 4 mA (empty), 27648 = 20 mA (full)
ValveOpenBOOLReadsAn input your code needsZSO-201: discharge valve XV-201 is fully open
ResetBOOLNot neededFor testing or watching; your code can leave it outReset pushbutton S2: clear a fault
FlowOKBOOLNot neededFor testing or watching; your code can leave it outFS-201 flow switch: ON while more than 2 L/s is flowing
ValveCmdBOOLWritesAn output your code setsOpen discharge valve XV-201
PumpOnBOOLWritesAn output your code setsRun transfer pump P-101
LevelPVREALWritesAn output your code setsReceiving tank level for the operator, %
SignalFaultBOOLWritesAn output your code setsRed lamp H1: the level signal has failed
ValveFaultBOOLWritesAn output your code setsRed lamp H2: the discharge valve has failed
PumpFaultBOOLWritesAn output your code setsRed lamp H3: the pump has failed

In Siemens SCL, write a block’s own tags with # in front, as TIA Portal does: #Start. Rockwell and TwinCAT use the name on its own: Start.

Automatic tests

The tank that overflowed: what the tests check

  1. A healthy skid transfers to 80% and stops, with no fault lamp.
  2. When the device fails, its lamp, and only its lamp, comes ON at once.
  3. The transfer stops: the tank does not overflow.
  4. LevelPV holds its last good value while the fault is there.
  5. Start does nothing while the fault is there.
  1. Try it Use the buttons below the model and watch the rig respond.
  2. Test solution Every check runs on your code in one press.
  3. Rewind PRO (needs Pro) If one fails, step back through it one scan at a time to see why.

Stuck on this mission? Ask the members in the Locker Room.

Why it matters

Where you’d see this on site

A level transmitter's cable runs across the plant to the panel. It can be crushed in a tray, corroded in a junction box or pulled out by a contractor.

A broken wire doesn't look like a fault to a program. It looks like an empty tank, and a program that fills an empty tank will fill it for ever.

Where you'd find thisMove water without emptying one tank or flooding the other

At a food factory, a big storage tank refills a smaller wash tank. A pump pushes the water through a valve between them. Before pumping, the engineer checks both levels and that the valve has really opened. If the storage tank empties, the pump can run dry and damage its seal, the part that stops leaks.

  1. Source tankHolds 400 litres when full
  2. Transfer pumpA spinning motor does not prove water is flowing
  3. Discharge valveA switch confirms the valve is openYou are here
  4. Receiving tankHolds 100 litres when full
On a real site: places, parts and safety
  • Food factory — refill a wash tank
  • Brewery — move water from storage to a batch tank
  • Water-treatment works — move water between holding tanks

The model shows spills and a rough idea of pump wear. Do not use its timings as safe limits for real equipment.

A real site needs separate safety devices and a design made for that site.

The sizes, timings and cutaways are teaching choices, not a drawing of any one real installation.

Keep going

Next on the road