Application example – 4-rung ladder logic program, Application example 4-rung ladder logic program, 4œ11 – Rockwell Automation 9323-PA1E USER MANUAL APS 6.0 User Manual

Page 65

Advertising
background image

Ladder Logic Program Basics

4–11

Application Example – 4-Rung Ladder Logic Program

The following 4-rung ladder logic program uses the same 3 bit locations as our
simple 1-rung diagram. It also uses an external input bit address and an external
output bit address. Note that individual bits are addressed repeatedly. For example,
B3/11 is addressed with an XIC instruction in rungs 1 and 4, and it is addressed with
both an XIC and an OTE instruction in rung 2.

During normal controller operation, the processor checks the state of the input data
file bits, then executes the program instructions individually, rung by rung, from the
beginning to the end of the program; as it does, it updates the data file bits and
energizes the appropriate output data file bits accordingly.

When the XIC instruction I:0/1 goes true (because an external momentary push
button closes):

Rung 1 is evaluated as false, because XIC instruction B3/11 is false at this time.

Rung 2 is evaluated as true. XIC B3/11 in the branch of this rung goes true to
maintain continuity in the rung.

Rung 3 is evaluated as true.

Rung 4 is evaluated as true because XIC B3/11 has gone true. The external
device represented by OTE O:0/2 is energized.

Use the following program to achieve the maintained contact action of an On-Off
toggle switch using a momentary contact push button. Press for On. Press again for
Off.

The first time you press the push button (represented by address I:0/1), instruction
B3/11 is latched, energizing output O:0/2. The second time you press the push
button, instruction B3/12 unlatches instruction B3/11, de-energizing output O:0/2.
Instruction B3/10 prevents interaction between instructions B3/12 and B3/11.

Advertising