5 Applied Instructions and Basic Usage
DVP-20PM Application Manual
5-74
API
Applicable model
20PM
61
D
D
SER
P
P
Searching data
Bit device Word device
X Y M S K H KnX KnY KnM KnS T C D V Z
S1
* * * * * * *
S2
* *
* * * * * * * * *
D
* * * * * *
N
* *
*
Note: The instruction supports V devices and Z devices. (If the 16-bit
instruction is used, Z devices can not be used. If the 32-bit
instruction is used, V devices can not be used.)
Please refer to specifications for more information about device
ranges.
If KnX/KnY/KnM/KnS is used, it is suggested that X/devices/Y
devices/M device numbers/S device numbers should start from a
number which is a multiple of 16 in the octal numeral system or in
the decimal numeral system, e.g. K1X0 (octal numeral system),
K4SY20 (octal numeral system), K1M0 (decimal numeral system),
and K4S16 (decimal numeral system).
16-bit instruction (9 steps)
SER
Continuity
instruction
SER P
Pulse
instruction
32-bit instruction (17 steps)
DSER
Continuity
instruction
DSERP
Pulse
instruction
Flag: None
Explanation
S
1
: Initial device involved in a comparison; S
2
: Value which is compared; D:
Initial device in which a comparison result is stored (5 consecutive devices are
occupied.); n: Number of values
S
1
is the initial register involved in a comparison, and n is the number of values
which are compared. The values in the n registers starting from S
1
are
compared with the value in S
2
, and the comparison results are stored in the
five registers starting from D.
If the 32-bit instruction is used, S
1,
S
2
, D, and n will be 32-bit registers.
16-bit instruction: n=1~256; n=1~128 (32-bit instruction)
Example
When X0 is ON, the values in D10~D19 are compared with the value in D0,
and the comparison results are stored in D50~D54. If none of the values in
D10~D19 are equal to the value in D0, the values in D50~D52 will be 0.
A comparison is based on algebra (-10<2).
The number of the minimum value is stored in D53, and the number of the
maximum value is stored in D54. If there is more than one minimum
value/maximum value, the number which is the biggest will be stored.
X0
SER D10 D0 D50 K10