14 HIGH-SPEED COUNTER INSTRUCTION
14.1 High-speed Processing Instruction
809
14
• Make sure that the comparison value 1 and the comparison value 2 have the following relationship: [Comparison value 1]
[Comparison value 2]. When the setting differs from the above, an operation error occurs and the DHSZ instruction will not
perform any operation.
• 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.
Precautions
An operation error occurs in the following cases.
Three devices are occupied from the device specified in (d). Make sure that these devices are not used in other controls.
When designating a Y device, do not set a device that crosses over a module or a device No. that is a multiple of 16
Example: Designating Y36 or Y37 when using FX5U-64M
.
For other precautions, refer to
MELSEC iQ-F FX5 User's Manual (Application).
Operation error
Comparison pattern
Current value of CH1 (s3) Change of output contact (Y)
Y0
Y1
Y2
(s1) > (s3)
1000>(s3)
ON
OFF
OFF
999
1000
ON
OFF
OFF
ON
OFF
1000
999
OFF
ON
ON
OFF
OFF
(s1)
(s3)
(s2)
999
1000
ON
OFF
OFF
ON
OFF
1000
999
OFF
ON
ON
OFF
OFF
1000
(s3)
2000
OFF
ON
OFF
2000
2001
OFF
ON
OFF
OFF
ON
2001
2000
OFF
OFF
ON
ON
OFF
(s3) > (s2)
2000
2001
OFF
ON
OFF
OFF
ON
2001
2000
OFF
OFF
ON
ON
OFF
(s3) > 2000
OFF
OFF
ON
• When a channel which is not set to (s3) by the parameter or a value other than K1 to 8 is specified
• When an LC device number which is not set by the parameter is specified
Error code
(SD0/SD8067)
Description
2820H
The number of devices is insufficient.
3405H
A channel number or LC device outside the range is specified.
The comparison value 1 is greater than the comparison value 2.
3582H
The DHSZ instruction is executed in an interrupt program.
3600H
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.
3780H
The DHSCS, DHSCR, and DHSZ instructions are used exceeding the maximum limit of the number of these instructions.
SM400
DHSZ
K1000
K2000
Y0
K1
Y0
Y1
Y2
K1000
K2000
K1000
K2000
ON
RUN monitor
CH1 current value
CH1 current value
CH1 current value
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......