Skip to content
PLCampus

Worked examples with virtual plants

Real processes explained step by step, ordered by difficulty. Each example includes its input/output list, the Ladder program and an animated virtual plant. Open it in the simulator, run it and change it.

  1. 01Level 1Plant: Lamp

    Turn on a lamp with a switch

    The simplest program: one input and one output. Perfect for seeing power flow and the scan cycle for the first time.

  2. 02Level 1Plant: Motor with contactor and overload relay

    Motor start and stop with seal-in

    The most used circuit in industry: NO start button, NC stop button, contactor and thermal overload relay.

  3. 03Level 2Plant: Reversing motor

    Reversing motor with electrical interlock

    Two contactors run the motor in one direction or the other. An interlock prevents both from closing at once, which would cause a short circuit.

  4. 04Level 2Plant: Crossroad traffic lights

    Crossroad traffic lights

    Two coordinated traffic lights driven by a single cycle timer and compare contacts on its elapsed time.

  5. 05Level 2Plant: Automatic gate

    Automatic gate

    A gate that opens and closes with limit switches, stops and reopens if a photocell detects an obstacle, and warns with a flashing beacon while it moves.

  6. 06Level 2Plant: Tank with pump

    Tank filling with level switches

    A pump keeps the level between two switches: it starts at low level and stops at high level (hysteresis control).

  7. 07Level 3Plant: Star-delta motor starter

    Star-delta starter with timer

    The motor starts in star, with less current, and after a few seconds switches to delta. A timer marks the change and a short pause prevents a short circuit between contactors.

  8. 08Level 3Plant: Conveyor belt with boxes

    Conveyor belt with box counter

    A sensor counts the passing boxes. When a batch of 6 boxes is complete, the belt stops and a light turns on until the operator starts a new batch.

  9. 09Level 3Plant: Car park

    Car park with space counter

    An up/down counter keeps track of the cars inside. With all 10 spaces taken the FULL sign lights up and the entry barrier no longer opens.

  10. 10Level 4Plant: Sorting conveyor

    Sorting parts by size

    Two sensors at different heights tell the large parts apart. A timer waits for the part to reach the piston, which pushes it aside. Small parts continue to the end of the belt.

  11. 11Batch mixerComing soon
  12. 12Level 4Plant: Tank with two pumps

    Two pumps with alternation and backup

    Two pumps fill a tank. Each filling cycle uses a different one to share the wear, and if one fails the other takes over and an alarm lights up.

  13. 13Level 4Plant: Electric oven

    On/off temperature control of an oven

    A temperature transmitter gives an analog signal. The program scales it to degrees Celsius and switches the heater on and off with a ±5 °C hysteresis around 180 °C.

  14. 14Level 5Plant: Tank with proportional valve

    Analog level control (introduction to PID)

    A proportional valve opens more or less depending on how far the level is from 60 %. It is the P part of a PID, and shows its limitation: the steady-state error.