Straight Talk on Modern Industrial Automation and Engineering Technology

Ladder Logic

If you understand basic electrical diagrams, it is much easier to understand ladder logic as it is used in a PLC. In fact, that was the whole idea behind ladder logic. It was supposed to look, and work, like real electrical circuits.

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.

There are a number of addressing schemes used by PLC manufacturers. Let’s take a quick look at how memory locations (including hardware I/O) are accessed with RSLogix 500. Along the way, I will define some terms.

INSTRUCTION – RSLogix’s command language is comprised of “instructions”. An XIC (it looks like a normally open contact –] [– ) is an instruction. A timer is an instruction. A few of the most common instructions are described below.

BIT – an address within the PLC. It can be an input, output or internal coil, among others.

In RSLogix, there are a couple of ways to show the address of a bit. The default is:

[type]:[word]/[bit]

For example, an address that references an output of a MicroLogix 1100 is O:0/0. That is:

O:0/5 means that it is a physical output.
O:0/5 means that it uses Slot 0 (in the case of the 1100, this output is onboard)
O:0/5 means that it is the fifth output on the PLC.

By the way, don’t get the capital “O” confused with a zero.

RUNG – A section of the PLC ladder program that terminates in an output function of some type. Just like in an electrical ladder diagram, a rung has some type of output that is turned on or turned off by the preceding entities in the rung. The first rung in a ladder program is always 0000.

HARDWIRED INPUT – a physical connection to the PLC from an input device (switch or sensor, etc.).

An SCP (Scale with Parameters) is a really handy instruction in RSLogix 500. It scales any range of values to a range defined by the programmer.

One of the common uses of the SCP instruction is to take the value from an analog input and scale it to an engineering value.

In the example below, you can see how the output from a set of scales can be scaled to show the actual weight of the tank.

In RSLogix 500, double-click on 0000. This opens up the ASCII editor.

Type SCP in the box and press enter. SCP stands for “Scale with Parameters”. It allows you to take an analog input from a sensor and scale it to the output units you want. [Note: You could certainly insert the instruction using the toolbar. I just wanted to show how to use the ASCII editor to insert an instruction.]

Excerpted from How To Troubleshoot With A PLC
Let’s consider a batching system just like the one we worked on earlier, except that the PLC is an Allen-Bradley ControlLogix. The software we use to program a ControlLogix PLC is Rockwell’s RSLogix 5000.
TROUBLESHOOTING OPERATION #3
BATCHING SYSTEM WON’T… [Read more]

Engineer-and-technician.com exists to provide useful and economically priced information of a technical nature, ranging from ebooks and tutorials to actual code that can be implemented in the industrial environment.