
6-13
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
Bit 0 of the status word is called the first-check bit (FC bit, see Figure 6-6).
At the start of a ladder logic network, the signal state of the FC
bit is always
0, unless the previous network ended with –––(SAVE). (The bar over the FC
indicates that it is negated, that is, always 0 at the beginning of a ladder logic
network.)
Each logic instruction checks the signal state of the FC
bit as well as the
signal state of the contact that the instruction addresses. The signal state of
the FC
bit determines the sequence of a logic string. If the FC bit is 0 (at the
start of a ladder logic network), the instruction stores the result in the result
of logic operation bit of the status word and sets the FC
bit to 1. The
checking process is called a first check. The 1 or 0 that is stored in the RLO
bit after the first check is then referred to as the result of first check.
If the signal state of the FC bit is 1, an operation then links the result of its
signal state check with the RLO formed at the addressed contact since the
first check, and stores the result in the RLO bit.
A rung of ladder logic instructions (logic string) always ends with an output
instruction (Set Coil, Reset Coil, or Output Coil) or a jump instruction related
to the result of logic operation. Such an output instruction resets the FC
bit
to 0.
Bit 1 of the status word is called the result of logic operation bit (RLO bit,
see Figure 6-6). This bit stores the result of a string of bit logic instructions or
math comparisons. The signal state changes of the RLO bit can provide
information related to power flow.
For example, the first instruction in a network of ladder logic checks the
signal state of a contact and produces a result of 1 or 0. The instruction stores
the result of this signal state check in the RLO bit. The second instruction in
a rung of bit logic instructions also checks the signal state of a contact and
produces a result. Then the instruction combines this result with the value
stored in the RLO bit of the status word according to the principles of
Boolean logic (see First Check above and Chapter 8). The result of this logic
operation is stored in the RLO bit of the status word, replacing the former
value in the RLO bit. Each subsequent instruction in the rung performs a
logic operation on two values: the result produced when the instruction
checks the contact, and the current RLO.
You can, for example, use a Boolean bit logic instruction on a first check to
assign the state of the contents of a Boolean bit memory location to the RLO
or trigger a jump.
First Check
Result of Logic
Operation
Configuration and Elements of Ladder Logic
Kommentare zu diesen Handbüchern