Rockwell Automation 1775-KA PLC-3 Communication Adapter Module User Manual User Manual
Page 72
Addressing Rules and Examples
Chapter 4
4Ć16
The result of a logical complement is 1 (true) if the expression following
the .NOT. is a value of 0 (zero). Otherwise, the result is 0 (false). For
example, consider the command
$I12:24=.NOT.SYMBOL_A
If the value of SYMBOL_A is 0 (zero), then a 1 is stored in word 24 of
input file 12. If the value of SYMBOL_A IS anything other than 0, then a
0 (zero) is stored in word 24 of input file 12.
The result of a logical AND is 1 (true) if the expression preceding the
.AND. and the expression following the .AND. are both non–zero.
Otherwise, the result is 0 (false).
The result of a logical OR is 1 (true) if either the expression preceding the
.OR., the expression following the .OR., or both expressions are
non–zero. Otherwise, the result is 0 (false).
Bitwise 32–Bit Operators
Bitwise 32–bit operators manipulate the individual bits in a 32–bit
operand.
The bitwise 32–bit complement (.BNOT.) inverts the state of each bit in
the 32– bit expression. That is, bits set to 1 are inverted to 0, and bits set
to 0 are inverted to 1.
The bitwise 32–bit AND (.BAND.) forms a bit–by–bit logical AND of
two 32–bit operands. There is no carry from one bit position to the next
within the operand. For example, if
A contains the bit pattern
10101010010011110010101010101011
B contains the bit pattern
01110101011100100010101110001010
then the assignment C=A.BAND.B yields
C contains the bit pattern
00100000010000100010101010001010