GE 90-30/20/Micro manual Input index -NX NX- output index

Models: 90-30/20/Micro

1 311
Download 311 pages 52.91 Kb
Page 172
Image 172

4

SRCH_EQ and SRCH_NE (INT, DINT, BYTE, WORD)

SRCH_GT and SRCH_LT

SRCH_GE and SRCH_LE

Use the appropriate Search function listed below to search for all array values for that particular operation.

Abbreviation

Function

Description

 

 

 

 

 

 

SRCH_EQ

Search Equal

Search for all array values equal to a specified value.

 

 

 

SRCH_NE

Search Not Equal

Search for all array values not equal to a specified value.

 

 

 

SRCH_GT

Search Greater

Search for all array values greater than a specified value.

 

Than

 

 

 

 

SRCH_GE

Search Greater

Search for all array values greater than or equal to a

 

Than or Equal

specified value.

 

 

 

SRCH_LT

Search Less Than

Search for all array values less than a specified value.

 

 

 

SRCH_LE

Search Less Than

Search for all array values less than or equal to a specified value.

 

or Equal

 

 

 

 

Each function has four input parameters and two output parameters. When the function receives power, the array is searched starting at (AR + input NX). This is the starting address of the array (AR) plus the index into this array (input NX).

The search continues until the array element of the search object (IN) is found or until the end of the array is reached. If an array element is found, output parameter (FD) is set ON and output parameter (output NX) is set to the relative position of this element within the array. If no array element is found before the end of the array is reached, then output parameter (FD) is set OFF and output parameter (output NX) is set to zero.

The valid values for input NX are 0 to LEN — 1. NX should be set to zero to begin searching at the first element. This value increments by one at the time of execution. Therefore, the values of output NX are 1 to LEN. If the value of input NX is out-of-range, (< 0 or LEN), its value is set to the default value of zero.

_____

(enable)

 

EQ_

WORD

(starting address) —AR FD— LEN 00001

(input index) —NX NX— (output index)

(object of search) —IN

_____

GFK-0467K

Chapter 4 Series 90-30/20/Micro Instructions Set

4-91

Page 172
Image 172
GE 90-30/20/Micro manual Input index -NX NX- output index