Book Now
Replacing Relays

Next, let’s use a plc in place of the relay. The first thing that’s necessary is to create what’s called a laoder diagram. After seeing a few of these it will become obvious why its called a ladder diagram. We have to create one of these because, unfortunately, a pic doesn’t understand a schematic diagram. It only recognizes code. Fortunately most PLCs have software which converts ladder diagrams into code. This shields us from actually learning the plc’s code.

First step- We have to translate all of the items we’re using into symbols the plc understands. The plc doesn’t understand terms like switch relay , bell, etc. It prefers input, output, coil, contacts, etc. it doesn’t care what the actual input or output device actually is. It only cares that its an input or an output.

First we replace the battery with a symbol. This symbol is common to all ladder diagrams. We draw what are called bus bars. These simply look like two vertical bars. One on each side of the diagram. Next we give the inputs a symbol in this basic example we have one real world input. We give the input that the switch will be connected to, to the symbol shown below. This symbol can also be used contact of a relay.

The AC supply is an external supply so we don’t put it in our ladder. The plc only cares about which output it turns on and not what’s physically connected to it.

Final Step – We have to convert the schematic into a logical sequence of events. This is much easier than it sounds. The program we’re going to write the PLC what to do when certain events take place. In our example we have to tell the pic what to do when the operator turns on the switch. Obviously we want the bell to sound but the plc doesn’t know that. IT’s a pretty stupid device, isn’t it!

The picture above is the final converted diagram. Notice that we eliminated the real world relay from needing a symbol. It’s actually “inferred” from the diagram.