14 HIGH-SPEED COUNTER INSTRUCTION
14.1 High-speed Processing Instruction
805
14
Processing details
• When the current value of a high-speed counter of the channel specified in (s2) becomes the comparison value (s1) (for
example, when the current value changes from "199" to "200" or from "201" to "200" if the comparison value is K200), the
bit device (d) is set to ON regardless of the scan time. In this instruction, the comparison processing is executed after the
count processing in the high-speed counter. For details, refer to
MELSEC iQ-F FX5 User's Manual (Application).
Use DHSCS if 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 using the high-speed comparison match interrupt, the corresponding interrupt programs can be executed by setting the
interrupt pointers (I16 to I23) to (d) as shown below.
Precautions
The value specified in (s2) should only be the channel of high-speed counter number (1 to 8) set by the parameter.
• An operation error occurs in the following cases.
For other precautions, refer to
MELSEC iQ-F FX5 User's Manual (Application).
Operation error
A: Main routine program
B: I16 Interrupt Program
(1): Start the high-speed counter CH1.
(2): When the current value of the high-speed counter CH1 reaches 1000, the interrupt program (I16) is executed.
• When a channel which is not set 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
3405H
A channel number LC device, or device (I) number outside the range is specified.
3582H
The DHSCS 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.
DHSCS
=
(s1)
(s2)
(d)
(s1)
(s2)
(d)
Command
input
M0
M1
SM400
M2
DHSCS K1000
K1
I16
Y10
FEND
IRET
END
K0
HIOEN
H1
H0
El
I16
A
B
(1)
(2)
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: ......