
6-14
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
Bit 2 of the status word is called the status bit (STA bit, see Figure 6-6). The
status bit stores the value of a bit that is referenced. The status of a bit
instruction that has read access to the memory (Normally Open Contact,
Normally Closed Contact) is always the same as the value of the bit that this
instruction checks (the bit on which it performs its logic operation). The
status of a bit instruction that has write access to the memory (Set Coil, Reset
Coil, or Output Coil) is the same as the value of the bit to which the
instruction writes or, if no writing takes place, the same as the value of the bit
that the instruction references. The status bit has no significance for bit
instructions that do not access the memory. Such instructions set the status bit
to 1 (STA=1). The status bit is not checked by an instruction. It is interpreted
during program test (program status) only.
Bit 3 of the status word is called the OR bit (see Figure 6-6). The OR bit is
needed if you use Contact instructions to perform logical Or operations with
an And function. Logical Or operations correspond to arranging contacts in
parallel. The And function corresponds to arranging contacts in series (see
Section 6.2). An And function may contain the following instructions:
Normally Open Contact and Normally Closed Contact. The OR bit shows
these instructions that a previously executed And function has supplied the
value 1 and thus forestalls the result of the logical Or operation. Any other
bit-processing command resets the OR bit.
Bit 5 of the status word is called the overflow bit (OV bit, see Figure 6-6).
The OV bit indicates a fault. It is set by a math instruction or a floating-point
compare instruction after a fault occurs (overflow, illegal operation, illegal
number). The bit is set or reset in accordance with the result of the math or
comparison operation (fault).
Bit 4 of the status word is called the stored overflow bit (OS bit, see
Figure 6-6). The OS bit is set together with the OV bit if an error occurs.
Because the OS bit remains set after the error has been eliminated (unlike the
OV bit), it indicates whether or not a error occurred in one of the previously
executed instructions. The following commands reset the OS bit: JOS (jump
after stored overflow, STL programming), the block call commands, and the
block end commands.
Bits 7 and 6 of the status word are called condition code 1 and condition
code 0 (CC 1 and CC 0, see Figure 6-6). CC 1 and CC 0 provide information
on the following results or bits:
S Result of a math operation
S Result of a comparison
S Result of a digital operation
S Bits that have been shifted out by a shift or rotate command
Status Bit
OR Bit
Overflow Bit
Stored Overflow
Bit
Condition Code 1
and Condition
Code 0
Configuration and Elements of Ladder Logic
Comentarios a estos manuales