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

One screen for the whole plant: PLC SCADA training exercise

Four stations report one state each, and the overview says which one needs you.

Give the control room one screen over the whole factory. Write one state for each of the four stations, the reason the line is waiting, one state for the plant and a count of line stops. Then choose what earns a place on the overview.

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 model factory this mission runs onPRO (needs Pro) mission
How the test runs

Start-up: waiting, then running

Test 1 of 4
Set by the testChecked by the testStep 13 of 13 · 31.5 s
Level
Advanced
Time
About 40 min
Reward
+650 XP
Rig
3D model factory
Siemens editors
Ladder (LAD), SCL
Rockwell editors
Ladder, Structured Text
Beckhoff editors
Structured Text
Stage
43. SCADA 1: one screen for the whole plant
Required behaviour

One screen for the whole plant: what your code must do

The plant control is written and working. A SCADA overview reads a few tags from each station, so every station reports the same way: 0 Off, 1 Running, 2 Waiting, 3 Fault. UtilStatus: 3 while CompressorFault is on; otherwise 0 unless Utilities is on; 2 while AirPressure or SteamPressure is below 6.0 bar; else 1. BatchStatus: 0 unless Run is on; 2 while Step is 0, when the buffer tank has enough; else 1. LineStatus: 0 unless Run is on; 1 while LineRun is on; else 2. LineReason says why the line waits: 1 air low (AirPressure below 5.5 bar), else 2 packs backed up (AccumFull is on). Write 0 whenever the line is not waiting. PackStatus: 3 while CellTrip is on; otherwise 1 while Run is on; else 0. PlantStatus is the worst news first: 4 emergency stop (State 30); else 3 if any station is in Fault; else 2 starting (State 10); else 1 running (State 20); else 0 stopped. LineStops counts how often the line has had to wait: add 1 each time LineStatus becomes 2. On the Operator screen tab, choose what the overview shows, how it says a state, whether it says why, and the order of the stations.

States
0 Off, 1 Running, 2 Waiting, 3 Fault, the same for all four.
Line reason
1 air low, 2 packs backed up, 0 not waiting.
Plant
4 emergency stop, 3 fault, 2 starting, 1 running, 0 stopped.
Line stops
Add 1 each time LineStatus becomes 2.
Tag table

One screen for the whole plant: inputs and outputs

Your program reads 18 inputs and sets 23 outputs. One more input drives the simulation or shows a reading, 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 the factory
StopBOOLReadsAn input your code needsStop the factory where it is
ResetBOOLReadsAn input your code needsReset after an emergency stop or a light-curtain trip
EStopBOOLReadsAn input your code needsEmergency stop pressed
CompressorFaultBOOLReadsAn input your code needsTry it: the compressor trips
AirPressureREALReadsAn input your code needsAir receiver pressure, bar
SteamPressureREALReadsAn input your code needsBoiler steam pressure, bar
VesselLevelREALReadsAn input your code needsMixing vessel level, %
VesselTempREALReadsAn input your code needsBatch temperature, °C
SugarAddedREALReadsAn input your code needsSugar the weigh feeder has added to this batch, kg
BufferLevelREALReadsAn input your code needsFiller buffer tank level, %
BadBottleBOOLReadsAn input your code needsCamera: a bottle with no label is passing
GateEyeBOOLReadsAn input your code needsA bottle is in front of the reject gate
AccumFullBOOLReadsAn input your code needsThree packs are waiting for the robot
CurtainClearBOOLReadsAn input your code needsLight curtain beams unbroken
PalletFullBOOLReadsAn input your code needsA full pallet is waiting or on its way to the wrapper
PalletOnWrapperBOOLReadsAn input your code needsA pallet is on the wrapper turntable
WrapDoneBOOLReadsAn input your code needsThe pallet on the wrapper is wrapped
PersonInCellBOOLNot neededFor testing or watching; your code can leave it outTry it: someone walks into the robot cell
CompressorBOOLWritesAn output your code setsRun the air compressor
BoilerOnBOOLWritesAn output your code setsSwitch the boiler on
WaterValveBOOLWritesAn output your code setsWater into the mixing vessel
FeederBOOLWritesAn output your code setsRun the sugar weigh feeder
AgitatorBOOLWritesAn output your code setsRun the agitator
SteamValveBOOLWritesAn output your code setsSteam to the vessel jacket
TransferPumpBOOLWritesAn output your code setsPump the batch to the buffer tank
LineRunBOOLWritesAn output your code setsRun the bottling line
RejectGateBOOLWritesAn output your code setsFire the reject gate
RobotEnableBOOLWritesAn output your code setsLet the robot palletise
PalletOutBOOLWritesAn output your code setsMove the full pallet to the wrapper
WrapBOOLWritesAn output your code setsRun the stretch wrapper
AGVCallBOOLWritesAn output your code setsCall the AGV to collect the wrapped pallet
GreenLampBOOLWritesAn output your code setsStack light: producing
AmberLampBOOLWritesAn output your code setsStack light: starting or waiting
RedLampBOOLWritesAn output your code setsStack light: emergency stop or light-curtain trip
UtilStatusINTWritesAn output your code setsOverview: utilities, 0 Off, 1 Running, 2 Waiting, 3 Fault
BatchStatusINTWritesAn output your code setsOverview: batching, 0 Off, 1 Running, 2 Waiting, 3 Fault
LineStatusINTWritesAn output your code setsOverview: bottling line, 0 Off, 1 Running, 2 Waiting, 3 Fault
LineReasonINTWritesAn output your code setsOverview: why the line waits, 1 air low, 2 packs backed up
PackStatusINTWritesAn output your code setsOverview: packing, 0 Off, 1 Running, 2 Waiting, 3 Fault
PlantStatusINTWritesAn output your code setsOverview: 0 stopped, 1 running, 2 starting, 3 fault, 4 emergency stop
LineStopsINTWritesAn output your code setsOverview: times the line has had to wait

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

One screen for the whole plant: what the tests check

  1. Every station reports 0 Off, 1 Running, 2 Waiting or 3 Fault, by the same rules as the brief.
  2. A waiting line gives its reason: 1 air low, 2 packs backed up, and 0 when it isn't waiting.
  3. PlantStatus puts the worst news first: emergency stop, then a fault, then starting, running, stopped.
  4. LineStops goes up by one each time the line starts to wait, however long the wait lasts.
  5. The overview shows one state and one number for each station, in words, in process order, and says why a station waits.
  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 bottling hall's control room has one overview on the wall. Utilities, batching, the line and packing each show as a block, grey when all is well.

When the line stops, the costly minutes are the ones spent finding out why. An overview that says 'waiting: air low' sends the fitter to the compressor, not to the line.

Where you'd find thisOne controller for a whole factory: when each machine may run, and what keeps it safe

A small drinks factory makes an orange drink. Sugar and water are batched and pasteurised, then pumped to a filler. Bottles are filled, capped, labelled and inspected, packed in sixes, stacked on pallets by a robot, wrapped and carried to the dock by a driverless forklift. Every machine has its own controls; the plant controller decides when each may run, hands work from one to the next, and stops everything safely.

  1. BatchMix and pasteurise
  2. FillFill, cap, label
  3. InspectReject bad bottles
  4. PackRobot stacks packsYou are here
  5. ShipWrap, AGV to dock
On a real site: places, parts and safety
  • Soft drinks and juice bottling halls
  • Sauces, dairy and liquid food plants
  • Household and personal-care liquids

An emergency stop is wired through a safety relay that cuts the power on its own. The program must then hold everything off and wait for a deliberate Reset and Start, so nothing moves by surprise.

Robot cells are fenced. Light curtains and interlocked doors stop the robot when someone goes in, and a restart needs a reset from outside the cell, in the spirit of ISO 10218 and ISO 13849.

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

Keep going

Next on the road