Arithmetic instructions
479
Part III FP Instructions
F96_SRC
Table data search (16-bit search)
When the search operation is performed, the search results are stored as follows:
The number of data that is the same as s1 is transferred to special data register
DT9037 (or DT90037 for FP2/2SH, FP10/10S/10SH).
The position the data is first found in, counting from the starting 16-bit area, is
transferred to special data register DT9038 (or DT90038 for FP2/2SH,
FP10/10S/10SH).
Be sure that s2 s3.
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
PLC types
Availability of F96_SRC (see page 1326)
Variable Data type Function
s1 16-bit area or equivalent constant to store the value
searched for
s2 starting 16-bit area of the block
s3
ANY16
ending 16-bit area of the block
The variables s1, s2 and s3 have to be of the same data type.
For Relay T/C Register Constant
s1 WX WY WR WL SV EV DT LD FL dec. or hex.
s2, s3 - WY WR WL SV EV DT LD FL -
Description
Searches for the value that is the same as s1 in the block of 16-bit areas specified by s2 (starting
area) through s3 (ending area) if the trigger EN is in the ON-state.
Data types
Operands
Example
In this example the function has been programmed in ladder diagram (LD) and structured text
(ST).The same POU header is used for all programming languages.