
6-6
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
6.2 Boolean Logic and Truth Tables
A ladder logic program tracks power flow between power rails as it passes
through various inputs, outputs, and other elements and boxes. Many Ladder
instructions work according to the principles of Boolean logic.
Each of the Boolean logic instructions checks the signal state of an electrical
contact for 0 (not activated, off) or 1 (activated, on) and produces a result
based on the findings. The instruction then either stores this result or uses it
to perform a Boolean logic operation. The result of the logic operation is
called the RLO. The principles of Boolean logic are demonstrated here on
the basis of normally open and normally closed contacts.
Figure 6-1 shows two conditions of a relay logic circuit with one contact
between a power rail and a coil. The normal state of this contact is open. If
the contact is not activated, it remains open. The signal state of the open
contact is 0 (not activated). If the contact remains open, the power from the
power rail cannot energize the coil at the end of the circuit. If the contact is
activated (signal state of the contact is 1), power will flow to the coil.
The circuit on the left in Figure 6-1 shows a normally open control relay
contact as it is sometimes represented in relay logic diagrams. For the
purpose of this example, the circuit on the right indicates that the contact has
been activated and is therefore closed.
Power Rail
Normally Open
Contact
Coil
Standard Representation Representation Indicating
Activated Contact
Figure 6-1 Relay Logic Circuit with Normally Open Control Relay Contact
You can use a Normally Open Contact instruction (see Section 8.2) to check
the signal state of a normally open control relay contact. By checking the
signal state, the instruction determines whether power can flow across the
contact or not. If power can flow, the instruction produces a result of 1; if
power cannot flow, the instruction produces a result of 0 (see Table 6-7). The
instruction can either store this result or use it to perform a Boolean logic
operation.
Power Flow
Normally Open
Contact
Configuration and Elements of Ladder Logic
Komentarze do niniejszej Instrukcji