FT1A
S
MART
A
XIS
U
SER
’
S
M
ANUAL
FT9Y
‐
B1382
23
‐
5
23: F
ILE
D
ATA
P
ROCESSING
I
NSTRUCTIONS
NDSRC (N Data Search)
Applicable CPU Modules
Valid Devices
For the valid device address range, see pages 6-1 and 6-2
(Basic Vol.).
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. Data registers D0-D998 and D1000-D1998 can be
designated as destination D1.
When F (float) data type 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 CPU module. 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.
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 CPU module. 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 Chapter 4 “User Program Execution Errors” on page 4-21.
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 as required.
Valid Data Types
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.
When input is on, a value specified by device S1 is sought. Data registers are
searched, starting with the data register designated by device S2. 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 designated by device D1. The quantity of matches is stored in the next
data register. When the search results in no match, 65535 is stored in device D1
and 0 is stored in device D+1.
NDSRC(*)
S1
*****
S2
*****
S3
*****
D1
*****
FT1A-12
FT1A-24
FT1A-40
FT1A-48
FT1A-Touch
X
X
X
X
X
Device
Function
I
Q
M
R
T
C
D
Constant
Repeat
S1 (Source 1)
Value to be sought
—
—
—
—
—
—
X
X
—
S2 (Source 2)
First data register number to search
—
—
—
—
—
—
X
—
—
S3 (Source 3)
Quantity of blocks to search
—
—
—
—
—
—
X
X
—
D1 (Destination 1)
Search result
—
—
—
—
—
—
X
—
—
W (word)
X
When a word device such as D (data register) is designated as the source, 1 point (word or integer data type) or
2 points (double-word, long, or float data type) are used.
I (integer)
X
D (double word)
X
L (long)
X
F (float)
X
Device
W (word), I (integer)
D (double word), L (long), F (float)
S1, S2
1 word device
2 word devices
S3, D1
1 word device
1 word device
Содержание microsmart pentra
Страница 1: ...FT1A SERIES FC9Y B1382 Ladder Programming Manual ...
Страница 6: ...Preface 5 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 104: ...7 DATA COMPARISON INSTRUCTIONS 7 10 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 122: ...8 BINARY ARITHMETIC INSTRUCTIONS 8 18 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 138: ...10 SHIFT ROTATE INSTRUCTIONS 10 12 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 162: ...11 DATA CONVERSION INSTRUCTIONS 11 24 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 188: ...12 CALENDAR COMPARISON INSTRUCTIONS 12 26 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 198: ...15 REFRESH INSTRUCTIONS 15 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 202: ...16 INTERRUPT CONTROL INSTRUCTIONS 16 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Страница 266: ...20 DUAL TEACHING TIMER INSTRUCTIONS 20 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Страница 318: ...25 USER COMMUNICATION INSTRUCTIONS 25 22 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...