In fact, that was the whole idea behind ladder logic. It was supposed to look, and work, like real electrical circuits
Excerpted from “The Beginner’s Guide to PLC Programming”
In its elementary form, PLC logic is very similar to the hard-wired logic you would find in an electrical ladder diagram.
For example, if you wanted to turn on a light with a momentary pushbutton, you would wire it like the circuit below.
When you press PB1, the pilot light PL1 lights up.
Now let’s do the same thing in a PLC. To duplicate the hardwired circuit on a PLC, you would wire the switch PB1 to an input and wire the light PL1 to an output. Each PLC manufacturer gives you the details of wiring their particular modules. The I/O (hardwired inputs and outputs) is set up like this:
– There is a “PB1” pushbutton switch wired to INPUT1 of the PLC.
– There is a “PL1” pilot light wired to OUTPUT1 of the PLC.
Now let’s examine the sequence of events. When you first turn on the PLC, the PB1 pushbutton is off, or false. Therefore, the PL1 output is off. Pressing PB1 will make INPUT1 true, OUTPUT1 will come on and the light will be energized. It will stay on only as long as you hold the button in. Just like electrical current has to flow through the switch to turn on the light in the hardwired circuit, the logic has to “flow” through the normally open instruction (which is closed when you press the switch) of INPUT1 to energize the output that turns on PL1.
The programming terminal display will look something like this as you hold in PB1. The yellow highlight indicates the bit, or address, is “on” or “true”.