The cylinder that never arrives: PLC programming exercise
Give every move three seconds, and stop safely if one runs out.
Run the A+ B+ B− A− cycle, and watch every move with a three second . A move that runs out of time stops the cycle with FaultLamp ON, and the cylinders come home in a safe order.
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) missionHealthy cycles, no fault
Test 1 of 7StartGreen Start pushbuttonOFFAirOnDump valve 0V2: ON lets the air in, OFF lets it outONExtendAValve 1V1, spring return: ON sends A out, OFF brings it backOFFRunLampOutputOFF- Level
- Advanced
- Time
- About 35 min
- Reward
- +500 XP
- Rig
- 3D electro-pneumatics trainer
- Siemens editors
- Ladder (LAD), SCL
- Rockwell editors
- Ladder, Structured Text
- Beckhoff editors
- Structured Text
- Stage
- 33. Pneumatics lab: cylinders, valves and reed switches
The cylinder that never arrives: what your code must do
A sequence that waits for a switch waits for ever if the switch never comes: a jammed cylinder, a failed reed switch, a kinked hose. Keep AirOn ON, and run the same cycle as before: Start with AirOK, A0 and B0; A out (ExtendA), B out (ExtendB), B back (RetractB), A back, each on its reed switch, with RunLamp ON. Now time each move. If any one move takes more than 3 seconds, stop the cycle: RunLamp OFF and FaultLamp ON. Then come home safely: bring B back first (RetractB ON until B0) with A still held out, and only then let A go (ExtendA OFF). FaultLamp stays ON until Reset is pressed with both cylinders home (A0 and B0). While FaultLamp is ON, Start does nothing. A slow cylinder is not a fault: a move that finishes inside 3 seconds must not trip.
- Cycle
- A out, B out, B back, A back, on the reed switches.
- Time limit
- More than 3 s for any one move is a fault.
- On a fault
- B back first, then A. FaultLamp ON, RunLamp OFF.
- Reset
- Only with A0 and B0. Start does nothing until then.
- How it's checked
- The checks press the buttons and switch the jam on, then watch the trainer itself: its reed switches and its counts of finished strokes.
The cylinder that never arrives: inputs and outputs
Your program reads 7 inputs and sets 6 outputs. 4 more inputs drive the simulation or show readings, for you to test with. The names are the same in every maker’s editor.
The cylinder that never arrives: what the tests check
- A healthy cycle runs with no fault, even with a slow cylinder.
- A move that takes more than 3 seconds stops the cycle: RunLamp OFF, FaultLamp ON.
- After a fault, B comes back first, and A lets go only when B is home.
- The fault holds until Reset is pressed with both cylinders home.
- Start does nothing while FaultLamp is ON.
- 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
Every real sequence has this watchdog. On an operator screen it reads as 'Step 20 timeout: B not out', which tells the fitter exactly where to look.
Without a time limit, a jammed cylinder leaves the machine sitting silently in the middle of a cycle with the clamp closed. People reach in to see what's wrong.
Most machines that clamp, push, lift or eject do it with air cylinders. A solenoid valve sends air to one side of the piston and lets it out of the other, and a small switch on the barrel tells the controller when the piston has arrived. Colleges teach it on a board like this one, because the same few parts make up almost every pneumatic machine.
- Air supplyFiltered, set to 6 bar
- ValvesOne 5/2 valve a cylinder
- CylindersOut and back on airYou are here
- Reed switchesProve each stroke
On a real site: places, parts and safety
- Assembly machines that clamp a part, then press or drill it
- Packing lines that push, lift and eject cartons
- College and apprentice training workshops
Compressed air is stored energy. Shut the isolator and let the air out before touching pipework: a hose that comes off under pressure whips.
Letting the air out isn't always the safe state. A cylinder holding a load upright drops when the air goes, so real machines are assessed one cylinder at a time.
The sizes, timings and cutaways are teaching choices, not a drawing of any one real installation.
Next on the road
- Two channels must agreeRead the E-stop and the gate on two channels each, and lock the cell out when a pair disagrees.Advanced · 40 min · +550 XP
- Prove the contactors let goCheck the contactors' mirror contacts, and refuse a reset while one is welded shut.Advanced · 40 min · +500 XP
- Both hands, checked twiceAdd checked palm buttons, an emergency stop and a reset to the two-hand press.Advanced · 45 min · +650 XP
- Stop dead or slow downMake the E-stop a category 0 stop and the gate a category 1 stop: brake first, then cut the power.Advanced · 40 min · +500 XP