Log what explains a stop: PLC SCADA training exercise
Store a value when it changes enough, never go silent, then read the trend to find what failed.
Give the factory's history what it needs to explain a stop. Write the store for two : the air pressure, kept when it moves 0.2 bar or after 10 s, and the line's state, kept on every change or after 10 s. Then choose what to log and how, and read a recorded stop to find its cause.
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
PRO (needs Pro) missionA flat line still gets its heartbeat
Test 1 of 3StartStart the factoryOFFAirSamplesAir samples stored2LineSamplesLine samples stored2AirStoredAir stored, bar0- Level
- Advanced
- Time
- About 45 min
- Reward
- +500 XP
- Rig
- 3D model factory
- Siemens editors
- Ladder (LAD), SCL
- Rockwell editors
- Ladder, Structured Text
- Beckhoff editors
- Structured Text
- Stage
- 45. SCADA 3: log what explains a stop
Log what explains a stop: what your code must do
The plant control is written and working. A historian can't keep every scan of every tag, so each tag is stored on change, with a slowest rate so a flat line is known to be alive. Write that store in the PLC, as a remote station does, so only what matters is sent. Air pressure: add 0.02 to AirAge every scan. When AirPressure is 0.2 bar or more above or below AirStored, or AirAge reaches 10.0 s, store it: copy AirPressure to AirStored, add 1 to AirSamples and set AirAge to 0. The line: add 0.02 to LineAge every scan. When LineRun differs from LineStored, or LineAge reaches 10.0 s, store it: copy LineRun to LineStored, add 1 to LineSamples and set LineAge to 0. The Operator screen tab draws what your PLC stores over the real signal. There, choose which tags the history keeps, how often and with what deadband. Then read the stop recorded last night and say what failed.
- Air
- Store on a 0.2 bar change either way, or after 10 s.
- Line
- Store on any change of LineRun, or after 10 s.
- A store
- Copy the value, add 1 to the count, set the age to 0.
Log what explains a stop: inputs and outputs
Your program reads 17 inputs and sets 18 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.
Log what explains a stop: what the tests check
- AirStored follows AirPressure to within 0.2 bar.
- A steady pressure is still stored every 10 s, so a flat line is known to be live.
- LineStored takes every change of LineRun on the it happens, and a 10 s heartbeat.
- AirSamples and LineSamples count one for each store: tens a minute, not thousands.
- The history keeps the measurement, the command and the state that explain a stop, on change, with a just above the 's noise.
- The recorded stop is read correctly: the compressor was called and the pressure kept falling.
- Try it Use the buttons below the model and watch the rig respond.
- Test solution Every check runs on your code in one press.
- 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.
Where you’d see this on site
A plant historian keeps years of readings from thousands of tags. After every unexplained stop, the first thing an engineer opens is the trend of the minutes before it.
A trip that happens at night with nobody watching leaves only what was logged. If the command and the pressure were not both kept, at a rate fast enough to see which moved first, the cause is a guess.
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.
- BatchMix and pasteurise
- FillFill, cap, label
- InspectReject bad bottles
- PackRobot stacks packsYou are here
- 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.
Next on the road
- Write the batch record as it happensBatch number, time in every phase, totals and the peak temperature, closed the moment the batch ends.Advanced · 45 min · +650 XP
- One alarm block for every alarmNew, seen, cleared: one loop takes every alarm through the same states and marks the one that came first.Expert · 45 min · +800 XP
- One screen for the whole plantFour stations report one state each, and the overview says which one needs you.Advanced · 40 min · +650 XP
- Run the whole factoryStart-up, batching, bottling, rejects, robot, wrapper, AGV and safety: one program for the whole plant.Expert · 240 min · +3000 XP