Download Print this page

Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual page 807

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

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).
Command
input
DHSCS
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.
M0
M1
HIOEN
SM400
A
DHSCS K1000
M2
I16
B
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.
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.
• 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
For other precautions, refer to MELSEC iQ-F FX5 User's Manual (Application).
Operation error
Error code
Description
(SD0/SD8067)
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.
(s1)
(s2)
(d)
(s1)
El
K0
H1
H0
(1)
(2)
K1
I16
FEND
Y10
IRET
END
(s2)
(d)
=
14 HIGH-SPEED COUNTER INSTRUCTION
14.1 High-speed Processing Instruction
14
805

Hide quick links:

Advertisement

loading