Pneumatics simulator
Almost every machine has pneumatic cylinders, and they are usually taught with paid software that only runs on the classroom computer. Here you can move a double-acting cylinder with its 5/2 solenoid valve, see which chamber has air, how much force it makes and what each flow control slows down, and build the classic A+ B+ A− B− sequence with two cylinders, their sensors and their GRAFCET. All in the browser, phone included.
GRAFCET: the active step, in green
Find the fault
A random fault is put into the A+ B+ A− B− sequence without telling you which. Press Start and find it by watching the active step, the coils and the sensors.
Try this
How to use it
- One cylinder and its valve: Y1 (and Y2, if the valve is bistable) are the coils; they are on while you hold them. You can change the pressure, the load the cylinder lifts and the opening of both flow controls.
- Sequence A+ B+ A− B−: a small program, like a PLC's, moves both cylinders. Start runs one cycle; with continuous cycle ticked, it repeats until you press Stop.
- Diagram: pressurised lines and chambers are blue. The valve is drawn as on real diagrams: the box connected to the pipes is the one in control at each moment.
The double-acting cylinder
It has two chambers separated by the piston. If air enters the rear chamber and leaves the front one, the rod extends; the other way round, it retracts. So it needs a valve that feeds one chamber and at the same time exhausts the other: the 5/2, with five ports (1 supply, 2 and 4 outlets, 3 and 5 exhausts) and two positions. At rest it connects 1 to 2 and 4 to 5; when the coil on side 14 is energised, it connects 1 to 4 and 2 to 3.
Force is pressure times area: F = P × A. At 6 bar (0.6 N/mm², about 87 psi) and with a 32 mm bore (804 mm²), the cylinder pushes about 480 N when extending. It pulls a little less when retracting, because the rod takes up part of the area: with a 12 mm rod, 691 mm² are left and about 415 N. In practice you allow around 10 % for friction, and choose a cylinder with clearly more force than needed so that it moves freely.
Monostable or bistable
A monostable valve has one coil and a spring: while the coil is energised the cylinder extends; when it is switched off, the cylinder returns. If the power fails or the PLC stops, the cylinder goes back to its rest position, which is why it is chosen when that position is the safe one.
A bistable valve has two coils and stays in the last position commanded: it has memory. A pulse is enough to move it, and if the power fails the cylinder does not move. It is useful for grippers that must not drop the part, but it has to be allowed for in the program and in safety: when power returns, the cylinder is still where it was. If both coils are energised together, the valve does not change, and in a well-written program that never happens.
Speed control: meter the air out
A cylinder's speed is set with one-way flow control valves: an adjustable restriction in parallel with a check valve. Air flows freely in through the check valve and, on the way out, has to pass the restriction. That way the exhaust air of the emptying chamber is controlled (meter-out), and the cylinder moves more steadily, because it has pressure on both sides and the load cannot run away with it.
The practical consequence, which catches many people out: the flow control that slows the rod extending is the one on the front line, because that is where the air escapes while it extends. Check it in the simulator by closing each one.
Sequences and the displacement-step diagram
A machine rarely has a single cylinder. The sequence A+ B+ A− B− means: A extends, B extends, A retracts, B retracts. An example is a feeder that pushes a part (A+), clamps and marks it (B+), withdraws the pusher (A−) and releases (B−). Each movement starts when a sensor confirms the previous one has finished: a1 allows B+, b1 allows A−, a0 allows B− and b0 ends the cycle. The sensors are magnetic (reed or magnetoresistive): they detect a magnet in the piston through the cylinder barrel.
It is drawn with a displacement-step diagram: one row per cylinder, with its position (back or out) at each step. The simulator draws its real-time version, the displacement-time diagram, where you also see how long each movement takes. And the logic is written as a GRAFCET (sequential function chart): one step per movement, and each transition is the sensor to wait for. With bistable valves, as here, each step pulses the coil it needs.
Common mistakes
- Metering the air in instead of out: the cylinder moves in jerks.
- Mixing up which flow control slows which movement.
- Choosing a cylinder with just enough force, with no margin for friction or a pressure drop.
- Using a bistable valve where safety depends on the cylinder returning by itself, or a monostable where it must not let go when the power fails.
- Moving to the next step on a timer instead of a sensor: if the cylinder runs slow, the sequence gets ahead of itself and crashes.
- Badly placed sensors on the barrel: the cylinder arrives, but the program never finds out.
Teaching a class? There is a printable worksheet for this simulator, with exercises and answers. More material on the teachers page.
Found it useful? Share it with your class or your team: WhatsApp · Telegram · LinkedIn · Email