9 HIGH-SPEED COUNTER INSTRUCTION
9.1 High-speed Processing Instruction
639
9
• When the current value of the high-speed counter CH1 changes (counts) as shown below, the comparison result is turn on
to one of the outputs Y0, Y1 or Y2.
It is used when the output should be given when the counting result becomes equivalent to the comparison
value regardless of the scan time of the CPU module.
When the number of instructions that can be simultaneously used is exceeded, use a general-purpose
comparison instruction.
• If a channel which is not set to (s) by the parameter or a value other than K1 to 8 is specified, an operation error occurs.
• Three devices are occupied from the device specified in (d). Make sure that these devices are not used in other controls.
• For other precautions, refer to User's manual [Application].
Comparison pattern Current value of CH1 (s3) Change of output contact (Y)
Y0 Y1 Y2
(s1) > (s3) 1000>(s3) ON OFF OFF
9991000 ONOFF OFFON OFF
1000999 OFFON ONOFF OFF
(s1) (s3) (s2) 9991000 ONOFF OFFON OFF
1000999 OFFON ONOFF OFF
1000 (s3) 2000 OFF ON OFF
20002001 OFF ONOFF OFFON
20012000 OFF OFFON ONOFF
(s3) > (s2) 20002001 OFF ONOFF OFFON
20012000 OFF OFFON ONOFF
(s3) > 2000 OFF OFF ON
Error code
(SD0/SD8067)
Description
3780 The DHSCS, DHSCR, and DHSZ instructions are used exceeding the maximum limit of the number of these instructions.
3405 A channel number outside the range or the device (I) number is specified.
The comparison value 1 is greater than the comparison value 2.
2820 The number of devices is insufficient.
3600 A channel number for which the channel setting is not set is specified in the operand for channel number specification of the high-speed
counter.
SM400
DHSZ K1000 K2000 Y0K1
Y0
Y1
Y2
K1000 K2000
K1000
K2000
ON
RUN monitor
CH1 current value
CH1 current value
CH1 current value
Comparison
value 1
Comparison
value 2
Comparison
source
Output
destination