Bit Operation Functions; Data Lengths For The Bit Operation Functions; Bit Operation Functions Logical And, Logical Or - GE VersaMax PLC User Manual

Table of Contents

Advertisement

10.1 Bit Operation Functions

%R0100
16
15
14
%R0101
32
31
30
%R0102
48
47
46
(MSB)
124
GFK-1503E
For public disclosure
The Bit Operation functions perform comparison, logical, and move operations on bit
strings. The Bit Operation functions are:
Logical AND
Logical OR
Exclusive OR
Logical Invert (NOT)
Shift Right/Shift Left
Rotate Right/Rotate Left

10.1.1 Data Lengths for the Bit Operation Functions

The Logical AND, OR, XOR, and NOT (Invert) functions operate on a single word of
data. The other Bit Operation functions may operate on up to 256 words.
All Bit Operation functions require Word-type data. However, they operate on data as a
continuous string of bits, with bit 1 of the first word being the Least Significant Bit
(LSB). The last bit of the last word is the Most Significant Bit (MSB). For example, if
you specified three words of data beginning at reference %R0100, it would be operated
on as 48 contiguous bits.
13
12
11
10
9
29
28
27
26
25
45
44
43
42
41
Overlapping input and output reference address ranges in multi-word functions is not
recommended, it can produce unexpected results.
10.1.2 Bit Operation Functions Logical AND, Logical
OR
Each scan that power is received, a Logical AND or Logical OR function examines each
bit in bit string I1 and the corresponding bit in bit string I2, beginning at the least
significant bit in each. A string length of 256 words can be selected.
10.1.2.1 Logical AND
If both bits examined by the Logical AND function are 1, a 1 is placed in the
corresponding location in output string Q. If either or both bits are 0, a 0 is placed in
string Q in that location. The Logical AND function can be used to build masks or
screens, where only certain bits are passed through (bits opposite a 1 in the mask), and all
other bits are set to 0. The Logical AND function can also be used to clear an area of
word memory by ANDing the bits with another bit string known to contain all 0s. The I1
and I2 bit strings specified may overlap.
Bit Test
Bit Set, Bit Clear
Masked Compare
Bit Position
Bit Sequencer
8
7
6
5
4
24
23
22
21
20
40
39
38
37
36
← bit 1
3
2
1
(LSB)
19
18
17
35
34
33
VersaMax PLC User Manual

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents