An interactive PLC running a motor loads here. It needs JavaScript; the sections below explain everything it shows.
| Part | What it does |
|---|---|
| Power supply | Usually feeds the PLC from 24 V DC. |
| CPU | Holds and runs the program. |
| Input modules | Read switches, push buttons, sensors and 4 to 20 mA signals. |
| Output modules | Drive contactors, solenoid valves, lamps and analogue outputs. |
| Communication | Links to screens, other PLCs and the ship's alarm system. |
- Read all the inputs and store their states.
- Run the program from top to bottom, using those stored states.
- Write the results to the outputs.
- Do it again, typically every few to tens of milliseconds.
PLC programs are often written as ladder diagrams, drawn like the relay circuits they replaced: two vertical rails with rungs between them. Each rung has contacts on the left, which stand for inputs or conditions, and a coil on the right, which stands for an output. Contacts in series mean AND; contacts in parallel mean OR. Because it looks like a wiring diagram, an electrician can read it.
A typical rung is the motor start-stop latch: a start button in parallel with the motor's own contact, in series with the stop button. Press start and the motor runs and holds itself on; press stop and the rung breaks.
- Changes are made in the program, not by rewiring.
- Fault finding is easier: the state of every input and output shows on the PLC's lamps and in its software.
- Timers, counters and sequences that would need many relays are a few lines of program.