9 HIGH-SPEED COUNTER INSTRUCTION
9.1 High-speed Processing Instruction
643
9
ï‚¢Function number 10
The measuring start and stop of the pulse density (rotation speed measurement) can be controlled for each channel of the
high-speed counter.
ï‚¢Function number 20
Set the value to turn on the bit of the high-speed comparison table number which is to be started or stopped.
ï‚¢Function number 30
For the multi-output high-speed comparison table, specification of a channel is not required. To start the multi-output high-
speed comparison table, set 01H in (s2). To stop it, set 01H in (s3).
ï‚¢Function numbers 40 and 50
The measuring start and stop of pulse width measurement and PWM can be controlled for each channel.
• When the same channel is simultaneously turned on for start and stop, the stop operation is prioritized.
• When the high-speed comparison table is used with the DHIOEN instruction, the total number of high-speed comparisons,
including the DHSCS instruction, DHSCR instruction, DHSZ instruction, and interrupt input of built-in positioning, must be 4
or less.
• To start the multi-output high-speed comparison table (function number: 30), start the high-speed counter using the
(D)HIOEN instruction in advance.
• The high-speed input/output instructions operate according to the following parameters.
Bit position
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
 CH8 CH7 CH6 CH5 CH4 CH3 CH2 CH1
Low-order bit position
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
 4321
High-order bit position
b31 b30 b29 b28 b27 b26 b25 b24 b23 b22 b21 b20 b19 b18 b17 b16

Bit position
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
 Valid
Bit position
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
 CH4 CH3 CH2 CH1
Function
number
Function specified by the DHIOEN instruction Parameter setting
0 High-speed counter Channel setting of the high-speed counter
10 Pulse density (rotation speed measurement) Channel setting of the pulse density/rotation speed measurement
High-speed counter
20 High-speed comparison table Output setting of the high-speed counter
30 Multi-output high-speed comparison table Output setting of the high-speed counter
40 Pulse width measurement Channel setting of the pulse width measurement
50 PWM Channel setting of PWM
Error code
(SD0/SD8067)
Description
1810 A channel number which is used in another instruction is specified.
3405 An invalid function number is specified in (s).
3600 A channel number which is not selected in the parameter setting is executed.