GE VersaMax PLC User Manual page 183

Table of Contents

Advertisement

%I0001
%R0001
CONST
00003
%R0100
%I0001
%AI001
%AQ001
00005
CONST
00000
Instruction Set Reference
For public disclosure
SRCH_
EQ__
INT
FD
AR
NX
NX
%R0101
IN
10.8.2.3 Example 2:
Array AR is defined as memory addresses %AI001 - %AI016. The values of the array
elements are 100, 20, 0, 5, 90, 200, 0, 79, 102, 80, 24, 34, 987, 8, 0, and 500. Initially, %
AQ001 is 5. When EN is ON, each sweep will search the array looking for a match to the
IN value of 0. The first sweep will start searching at %AI006 and find a match at %
AI007, so FD is ON and %AQ001 is 7. The second sweep will start searching at %AI008
and find a match at %AI015, so FD remains ON and %AQ001 is 15. The next sweep will
start at %AI016. Since the end of the array is reached without a match, FD is set OFF and
%AQ001 is set to zero. The next sweep will start searching at the beginning of the array.
SRCH_
EQ__
INT
AR
FD
NX
NX
%AQ001
IN
%Q0001
( )
%M001
( )
GFK-1503E User Manual 183

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents