An interactive computer program has been developed for programming and simulating a simple PLC and an associated pneumatic cylinder system. Up to 30 ladder 'rungs' can be programmed with a combination of inputs (pushbottons and limit switches), outputs (solenoids and lights), timers and counters. Logical 'OR' connections are allowed by connecting successive ladder rungs. The movements of a simple pneumatic system with four cylinders under the control of the PLC program can then be graphically simulated. The use of the graphical simulation greatly improves students' understanding of PLC ladder logic programming.