Ndsrc (N Data Search) - IDEC MICROSmart FC6A Series Ladder Programming Manual

Automation organizer windldr
Hide thumbs Also See for MICROSmart FC6A Series:
Table of Contents

Advertisement

NDSRC (N Data Search)

NDSRC(*)
*****
Valid Devices
Device
S1 (Source 1)
S2 (Source 2)
S3 (Source 3)
D1 (Destination 1)
For valid device address ranges, see "Device Addresses" on page 2-1.
Source S1 data specifies the value to be sought and the valid range depends on the data type.
The search range cannot straddle data registers and non-retentive data registers. Make sure that the sum of data register numbers designated by
S1 and S2 does not result in a different data register range.
For source S3 and destination D1, 1 word is always used without regard to the data type.
Destination D1 occupies two consecutive data registers starting with the device designated by D1.
When F (float) data is selected and S1 does not comply with the normal floating-point format, a user program execution error will result, turning on
special internal relay M8004 and ERR LED on the FC6A Series MICROSmart. When a user program execution error occurs, the execution of the
instruction is canceled and the next instruction is executed.
When data in S2 to S2+(S3) does not comply with floating-point format, the data is skipped to continue the search and the results are stored in D1
and D1+1.
The NDSRC instruction cannot be used in an interrupt program.
If used, a user program execution error will result, turning on special internal relay M8004 and the ERR LED on the FC6A Series MICROSmart.
When S3 is zero or the sum of S2 and S3 is not within the valid data register range, a user program execution error will result, turning on special
internal relay M8004 and ERR LED on the FC6A Series MICROSmart. When a user program execution error occurs, the execution of the instruction is
canceled and the next instruction is executed.
For details about the user program execution errors, see "User Program Execution Errors" on page 3-10.
Since the NDSRC instruction is executed in each scan while input is on, a pulse input from a SOTU or SOTD instruction should be used.
Valid Data Types
W (word)
X
I (integer)
X
D (double word)
X
L (long)
X
F (float)
X
Quantity of Source and Destination Devices
Depending on the data type, source devices S1 and S2 use a different quantity of devices. Source device S3 and destination device
D1 always use 1 word without regards to the data type.
Device
S1, S2
S3, D1
S1
S2
S3
*****
*****
*****
Function
Value to be sought
First data register number to search
Quantity of blocks to search
Search result
When a word device such as D (data register) is assigned as the source, 1 point (word or integer data) or 2
points (double-word, long, or float data) are used.
W (word), I (integer)
1 word device
1 word device
FC6A S
MICROS
ERIES
MART
23: F
When input is on, a value specified by device S1 is searched for. Data
registers are searched, starting with the data register assigned by device S2.
D1
Device S3 specifies the quantity of 1-word or 2-word blocks of data registers
to search, depending on the data type.
The offset of the data register where a match first occurred is stored in data
register assigned by device D1. The number of matches is stored in the next
data register. When the search results in no match, 65,535 is stored in device
D1 and 0 is stored in device D+1.
I
Q
L
P
M
ADDER
ROGRAMMING
D
P
ILE
ATA
ROCESSING
M
R
T
C
D
P
X
X
X
X
D (double word), L (long), F (float)
2 word devices
1 word device
FC9Y-B1726
ANUAL
I
NSTRUCTIONS
Constant
Repeat
X
X
23-5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents