System description
The system includes an assembly with a table, a compressor, a DC 24V power supply, a single-acting cylinder, a double-acting cylinder, a 3/2 way solenoid activated directional valve, a 5/3 way solenoid activated directional valve and three pushbuttons.
Build a circuit
The first circuit you are going to build is the one represented in the diagram below. This circuit shows how to use a solenoid acted valve controlled by an electric pushbutton.

First, make the pneumatic connections, left side of the diagram. The pneumatic compressor ‘COMPRESSOR’ will be connected to the 3/2 way directional valve ‘Y01’ and this one to the single-acting cylinder ‘C01’. The ‘COMPRESSOR’ has a pneumatic output port called ‘out’, connect it directly to ‘Y01’ input port ‘p1’. Then connect the ‘C01’ input port ‘p1’ to the ‘Y01’ valve output port ‘p2’.
Once the pneumatic connections are done, you can continue with the electric connections. Connect the ‘S01’ input port ‘x1’ to the ‘PS01.dc_p’ port, then connect the ‘Y01’ solenoid inputs ‘x11’ and ‘x12’ to the button’s ‘x2’ output and the ‘PS01’ ground output ‘dc_n’ respectively.
Start emulation
The circuit is now ready to test. We should expect that the ‘C01’ cylinder will expand when we press the ‘S01’ button, and retract when we release it. Click on start and see if it works.

If you reset the emulation the system will be reset and the cylinder will go back to its retracted position.