You are on page 1of 1

Anatomy of a ladder diagram

The logic in a ladder diagram typically flows from left to right. The diagram
can be divided into sections called rungs, which are roughly analogous to
the rungs on a ladder. Each rung typically consists of a combination of
input instructions. These instructions lead to a single output instruction;
however, rungs containing function block instructions may be more
complicated.
Each input or output instruction is assigned an address (shown below the
instructions in Fig. 1, on page 22) indicating the location in the PLC
memory where the state of that instruction is stored. Function block
instructions may include one or more addresses to store parameters
related to the function that they perform.
The numerical format of the address depends on the scheme used by the
particular manufacturer, and it may be stated in a binary-based numbering
system. (See sidebar on page 26.) A name may also be associated with each
address (shown above the instruction in Fig. 1) to make the ladder diagram
easier to interpret.
Types of instructions
Ladder diagram programming allows PLCs to perform several different
types of tasks, including Boolean logic, timing, counting, arithmetic, and
special functions. We'll discuss the basic instructions and function block
instructions, which are common to nearly all PLCs. In addition to these
instructions, most PLCs support many extended instructions to perform
more complicated tasks.
Boolean logic. Boolean logic is actually what PLCs and relay systems
perform. The legal operations in Boolean logic are AND, OR, and NOT. The
AND operation simply means all of the inputs must be ON for the output to
be ON; it's analogous to relay contacts connected in series.
The OR operation means that the output is ON if at least one of the inputs
is ON; it's analogous to relay contacts connected in parallel.
The NOT operation means that the output is OFF if the input is ON and
vice-versa; it's analogous to a normally closed relay contact. To describe the
situation in Rung 1 of Fig. 1 using Boolean logic, for example, we can say
that Output 201 is ON if Input 101 OR 102 is ON AND Input 103 is NOT
ON.

You might also like