
15-7
Ladder Logic (LAD) for S7-300 and S7-400
C79000-G7076-C504-02
15.6 WXOr Word
A 1 at the Enable (EN) input activates the (Word) Exclusive Or Word
instruction. This instruction combines the two digital values indicated in
inputs IN1 and IN2 bit by bit, according to the XOr truth table. The values
are interpreted as pure bit patterns. The result can be scanned at the output
OUT. ENO has the same signal state as EN.
The relationship of the result at output OUT to 0 affects condition code bit
CC 1 of the status word as follows:
S If the result at output OUT is not equal to 0, condition code bit CC 1 of
the status word is set to 1.
S If the result at output OUT is equal to 0, condition code bit CC 1 of the
status word is 0.
Certain restrictions apply to the placement of word logic boxes (see
Section 6.1).
Table 15-5 (Word) Exclusive Or Word Box and Parameters
LAD Box
Parameter Data Type Memory Area Description
EN BOOL I, Q, M, D, L Enable input
_
EN ENO
ENO BOOL I, Q, M, D, L Enable output
IN1
IN1 WORD I, Q, M, D, L First value for logic operation
IN2 OUT
IN2 WORD I, Q, M, D, L Second value for logic operation
O WORD I, Q, M, D, L Result of logic operation
Status Word Bits
BR CC 1 CC 0 OV OS OR STA RLO FC
Write 1 x 0 0 – x 1 1 1
I 0.0
Q 4.0
WXOR_W
IN2 OUT
EN ENO
2#0000000000001111 MW2
IN1MW0
Function is executed (EN = 1):
A signal state of 1 at input I 0.0
activates the instruction.
IN1 = 0101010101010101
IN2 = 0000000000001111
OUT = 0101010101011010
The signal state of output Q 4.0 is 1
if the operation is executed.
Figure 15-5 (Word) XOr Word
Description
Word Logic Instructions
Comentarios a estos manuales