
6-9
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
Figure 6-3 shows a ladder logic diagram that you can use to program two
normally open contacts connected in series to a coil. The first Normally Open
Contact instruction in the logic string checks the signal state of the first
contact in the series (input I 1.0) and produces a result based on the findings
(see Table 6-7). This result can be 1 or 0. A result of 1 means that the contact
is closed and any available power could flow across the contact; a result of 0
means that the contact is open, interrupting the flow of any power available
at the contact. The first Normally Open Contact instruction copies this 1 or 0
to a memory bit in the status word of the programmable logic controller. This
bit is called the “result of logic operation” (RLO) bit.
The second Normally Open Contact instruction in the logic string checks the
signal state of the second contact in the series (I 1.1) and produces a result
based on the findings (see Table 6-7). This result can be 1 or 0, depending on
whether the contact is closed or open. At this point, the second Normally
Open Contact instruction performs a Boolean logic combination. The
instruction takes the result it produced upon checking the signal state of the
second contact and combines this result with the value stored in the RLO bit.
The result of this combination (either 1 or 0) is stored in the RLO bit of the
status word, replacing the old value stored there. The Output Coil instruction
(see Section 8.4) assigns this new value to the coil (output Q 4.0).
The possible results of such a logic combination can be shown in a “truth
table.” In such a logic combination, 1 represents “true” and 0 represents
“false.” The possible Boolean logic combinations and their results are
summed up in Table 6-8, where “contact is closed” and “power can flow”
correspond to “true” and “contact is open” and “power cannot flow”
correspond to “false” (see Figure 6-3 for the contacts).
Table 6-8 Truth Table: And
If the result produced by
checking the signal state
of contact I 1.0 is
and the result produced
by checking the signal
state of contact I 1.1 is
the result of the logic
operation shown in
Figure 6-3 is
1 (contact is closed) 1 (contact is closed) 1 (power can flow)
0 (contact is open) 1 (contact is closed) 0 (power cannot flow)
1 (contact is closed) 0 (contact is open) 0 (power cannot flow)
0 (contact is open) 0 (contact is open) 0 (power cannot flow)
Using Normally
Open Contact in
Series
Configuration and Elements of Ladder Logic
Comentários a estes Manuais