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

Emergency stop: air out, then back on purpose, PLC programming

Dump the air on an emergency stop, and recover without a surprise.

An emergency stop lets the air out at once and drops every solenoid. Nothing comes back until Reset, and the cylinders come home before a new cycle can start.

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 electro-pneumatics trainer this mission runs onPRO (needs Pro) mission
How the test runs

No air until Reset

Test 1 of 4
Set by the testChecked by the testStep 8 of 8 · 6 s
Level
Advanced
Time
About 40 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
Required behaviour

air out, then back on purpose: what your code must do

The trainer's cylinders carry no load, so its safe state is no air: nothing can move. The emergency stop's contact EStopOK is ON while the button is out. The air is ON only when the trainer is armed. It is not armed when the program starts, and Reset arms it: a fresh press of Reset while EStopOK is ON. Armed, AirOn is ON, and Start runs the A+ B+ B− A− cycle as before (with AirOK, A0 and B0). When EStopOK goes OFF: at once, AirOn OFF, ExtendA, ExtendB and RetractB OFF, RunLamp OFF, the cycle abandoned and the trainer no longer armed. FaultLamp is ON whenever the trainer is not armed. Pulling the button back out changes nothing: only a new press of Reset arms it again. Coming back: A returns on its own, because its spring valve went to 'back'. B's valve remembers, so B would carry on the way it was going as the air returns. From the moment the trainer is armed, hold RetractB ON until B0, unless a cycle is running. The valve needs 2 bar to shift, so it moves as soon as there is enough air. Start is refused until both cylinders are home.

Armed
A new press of Reset while EStopOK is ON. AirOn follows it.
Emergency stop
At once: air OFF, all solenoids OFF, cycle abandoned, not armed.
Fault lamp
ON whenever the trainer is not armed.
Coming back
RetractB ON from arming until B0, unless a cycle is running.
Start
Needs armed, AirOK, A0 and B0.
How it's checked
The checks press the buttons and the emergency stop, then watch the trainer itself: its pressure, its reed switches and its counts of finished strokes.
Tag table

air out, then back on purpose: inputs and outputs

Your program reads 8 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 needsGreen Start pushbutton
ResetBOOLReadsAn input your code needsBlue Reset pushbutton
EStopOKBOOLReadsAn input your code needsEmergency stop contact: ON while the button is out
AirOKBOOLReadsAn input your code needsPressure switch 0B1: ON once the air is above 4.5 bar
A0BOOLReadsAn input your code needsReed switch 1B1: cylinder A fully back
A1BOOLReadsAn input your code needsReed switch 1B2: cylinder A fully out
B0BOOLReadsAn input your code needsReed switch 2B1: cylinder B fully back
B1BOOLReadsAn input your code needsReed switch 2B2: cylinder B fully out
EStopBOOLNot neededFor testing or watching; your code can leave it outPush the emergency stop in (ON) or twist it out (OFF)
PressureREALNot neededFor testing or watching; your code can leave it outAir pressure after the dump valve, bar
AirOnBOOLWritesAn output your code setsDump valve 0V2: ON lets the air in, OFF lets it out
ExtendABOOLWritesAn output your code setsValve 1V1, spring return: ON sends A out, OFF brings it back
ExtendBBOOLWritesAn output your code setsValve 2V1, out solenoid: sends B out, and the valve stays there
RetractBBOOLWritesAn output your code setsValve 2V1, back solenoid: brings B back, and the valve stays there
RunLampBOOLWritesAn output your code setsGreen lamp: a cycle is running
FaultLampBOOLWritesAn output your code setsRed lamp: fault

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

air out, then back on purpose: what the tests check

  1. No air and FaultLamp ON until Reset is pressed.
  2. An emergency stop turns AirOn and every solenoid OFF at once, and abandons the cycle.
  3. Releasing the emergency stop restores nothing. Only a new press of Reset does.
  4. After Reset, B comes home without finishing the stroke it was on.
  5. A new cycle needs Start, with the air up and both cylinders home.
  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

Machines with air cylinders have a dump valve like this, and on a real machine a safety relay switches it. The PLC follows, so that it restarts nothing when the relay is reset.

When the air returns, a cylinder whose valve remembers 'out' goes out, with nobody having pressed anything. Unexpected movement after a stop is one of the commonest ways people are hurt by pneumatic machines.

Where you'd find thisMove things with air, and know where every cylinder is

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.

  1. Air supplyFiltered, set to 6 bar
  2. ValvesOne 5/2 valve a cylinder
  3. CylindersOut and back on airYou are here
  4. 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.

Keep going

Next on the road