Bit Operation Functions Exclusive Or - GE VersaMax PLC User Manual

Table of Contents

Advertisement

126
GFK-1503E
For public disclosure

10.1.3 Bit Operation Functions Exclusive OR

The Exclusive OR function compares each bit in bit string I1 with the corresponding bit
in string I2. If the bits are different, a 1 is placed in the corresponding position in the
output bit string.
XOR_
Enable
WORD
Input 1
I1 Q
I2
Input 2
I1 and the corresponding bit in string I2, beginning at the least significant bit in each. For
each two bits examined, if only one is 1, then a 1 is placed in the corresponding location
in bit string Q. The Exclusive OR function passes power flow to the right whenever
power is received.
If string I2 and output string Q begin at the same reference, a 1 placed in string I1 will
cause the corresponding bit in string I2 to alternate between 0 and 1, changing state with
each scan as long as power is received. Longer cycles can be programmed by pulsing the
power flow to the function at twice the desired rate of flashing; the power flow pulse
should be one scan long (one-shot type coil or self-resetting timer).
The Exclusive OR function is useful for quickly comparing two bit strings, or to blink a
group of bits at the rate of one ON state per two scans.
10.1.3.1 Parameters of the Exclusive OR Function
Input/ Output
Choices
enable
I, Q, M, T, S, G, R, AI,
I1
AQ, constant
I, Q, M, T, S, G, R, AI,
I2
AQ, constant
flow, none
ok
I, Q, M, T, SA, SB, SC
Q
(not S), G, R, AI, AQ
OK
Output
When the function is enabled, the operation is
flow
performed.
Constant or reference for the first word to be
XORed.
Constant or reference for the second word to be
XORed.
The OK output is energized whenever enable is
energized.
Output Q contains the result of the operation.
Description
VersaMax PLC User Manual

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents