EasyManuals Logo

GE VersaMax PLC User Manual

GE VersaMax PLC
318 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #134 background imageLoading...
Page #134 background image
3. Updates the output bit string Q to match the new content of mask string M
4. Sets the bit number output (BN) to the number of the miscompared bit.
5. Stops the comparison.
Example
In the example, after first scan the Masked Compare Word function executes. It compares
%M0001–16 with %M0017–32. %M0033–48 contain the mask. The value in %R0001
determines the bit position in the two input strings where the comparison starts.
%M0001
%R0001
FST_SCN
| |
MASK_
COMP_
WORD
I1 MC
%M0017
Q I2
%M0033
%Q0001
(S)
BN
%R0001
BIT
%M0033
M
Before the function block is executed, the contents of the above references are:
00,1‘00,sfx)=}graphics:graphic4c25db79}
The contents of these references after the function block is executed are:
0
1
1
0
1
1
0
0
0
1
1
0
1
1
0
0
0
1
1
0
1
1
0
1
0
1
1
0
1
1
1
1
0
0
0
0
0
0
0
1
0
0
0
0
1
1
1
1
(I1 ) – %M0001 = (same) =
(I2) – %M0017 = (same) =
(M/Q) – %M0033 =
(BIT/BN) – %R0001 = 8
(MC) – %Q0001 = ON
In this example, contact %T1 and coil %M100 force one and only one execution;
otherwise the function would repeat with possibly unexpected results.
10.1.11 Bit Operation Functions Bit Position
The Bit Position function locates a bit set to 1 in a bit string.
Each sweep that power is received, the function scans the bit string starting at IN. When
the function stops scanning, either a bit equal to 1 has been found or the entire length of
the string has been scanned.
POS is set to the position within the bit string of the first non-zero bit; POS is set to zero
if no non-zero bit is found.
A string length of 1 to 256 words can be selected. The function passes power flow to the
right whenever enable is ON.
First word
OK Enable
BIT_
POS_
WORD
IN
POS
Position of non-zero bit or 0
134 GFK-1503E VersaMax PLC User Manual
For public disclosure

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the GE VersaMax PLC and is the answer not in the manual?

GE VersaMax PLC Specifications

General IconGeneral
BrandGE
ModelVersaMax PLC
CategoryController
LanguageEnglish

Related product manuals