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
Содержание VersaMax PLC
Страница 1: ...GE Intelligent Platforms GFK 1503E VersaMax PLC User Manual September 2015 For public disclosure ...
Страница 16: ...Notes 16 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 38: ...Notes 38 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 50: ...Notes 50 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 92: ...Notes 92 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 112: ...Notes 112 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 224: ...Notes 224 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 292: ...Notes 292 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 316: ...Notes 316 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 317: ......
Страница 318: ...GE Intelligent Platforms 1 800 433 2682 1 434 978 5100 www ge ip com GFK 1503E For public disclosure ...