GE PACSystems RX7i Cpu Programmer's Reference Manual page 200

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

Operands for the Search Function
Note: For each mnemonic, use the corresponding data type for the AR and IN operands. For
example, SEARCH_EQ_BYTE requires AR and IN to be BYTE variables.
Parameter
Description
Length (??)
The number of registers starting at AR that make up the
memory block to search. 1  Length  32,767 8-bit or 16-bit
registers.
AR (must be the
The starting address of the memory block to search; the
same type as
address of the first register in the memory block.
IN)
INX
The zero-based index into the memory block at which to
begin the search. Zero points to the first reference.
Valid range: 0  INX  (Length-1).
If INX is out of range, it is set to the default value of 0.
IN (must be the
The value that the search is based on. For example:
same type as
SEARCH_GT_DINT searches for a DINT value that is greater
AR)
than IN.
SEARCH_NE_UINT searches for a UINT value that is not equal
to IN.
SEARCH_GE_WORD searches for a WORD value that is
greater than or equal to IN.
ONX
The one-based position within the memory block of the
search target. A value of 1 points to the first reference.
Valid range: 1  ONX  Length
FD
Found indicator. This power flow indicator is energized when
a register that satisfies the search criteria is found and the
function was successful.
Example for the Search Function
To search the memory block %AI00001 - %AI00016, AR is set as
%AI00001 and Length is set as 16. The values of the 16
registers are 100, 20, 0, 5, 90, 200, 0, 79, 102, 80, 24, 34, 987, 8,
0, and 500. Initially, the search index into AR, %AQ0001, is 5.
When power flow input is ON, each scan searches the memory
block looking for a match to the IN value of 0. The first scan
starts searching at %AI00006 and finds a match at %AI00007,
so FD turns ON and %AQ00001 becomes 7. The second scan
starts searching at %AI00008 and finds a match at %AI00015,
so FD remains ON and %AQ0001 becomes 15. The next scan
starts at %AI00016. Since the end of the memory block is
reached without a match, FD is set OFF and %AQ0001 is set to
zero. The next scan starts searching at the beginning of the
memory block.
GFK-2950C
Chapter 4. Ladder Diagram (LD) Programming
February 2018
Allowed Operands Optional
Constants
No
All except constants No
All except constants No
All
No
data flow, I, Q, M, T,
No
G, R, P, L, AI, AQ
Power flow
No
185

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents