Chapter 2. Program Organization
GFK-2950C
February 2018
21
2.1.8
Languages
Ladder Diagram (LD)
Logic written in Ladder Diagram language consists of a sequence of rungs that execute from top to
bottom. The logic execution is thought of as
power flow
, which proceeds down along the left
rail
of
the ladder, and from left to right along each rung in sequence.
Relay
Power flow into function
Coil
Multiplication function
Power
Rail
Power flow out of function
Figure 11: Explanation of Ladder Diagram Rung
The flow of logical power through each rung is controlled by a set of simple program instructions that
work like mechanical relays and output coils. Whether or not a relay passes logical power flow along
the rung depends on the content of a memory location with which the relay has been associated in
the program. For instance, a relay might pass positive power flow if its associated memory location
contains the value 1. The same relay passes negative power flow if the memory location contains the
value 0.
Usually an instruction that receives negative power flow does not execute and propagates the
negative power flow on to the next instruction in the rung. However, some instructions such as
timers and counters execute even when they receive negative power flow, and may even pass
positive power flow out. Once a rung completes execution, with either positive or negative power
flow, power flows down along the left rail to the next rung.
Within a rung, there are many complex functions that are part of the standard function library and
can be used for operations like moving data stored in memory, performing math operations, and
controlling communications between the CPU and other devices in the system. Some program
functions, such as the Jump function and Master Control Relay, can be used to control the execution
of the program itself. Together, this large group of Ladder Diagram instructions and standard library
functions makes up the
instruction set
of the CPU.
Summary of Contents for PACSystems RSTi-EP
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451 ...