Mitsubishi Electronics FX5 ユーザーズマニュアル

ページ / 306
19  BUILT-IN I/O FUNCTION
19.1  High-speed Counter Function
163
19
Precautions when using high-speed counters
This section describes the precautions when using high-speed counters.
Common precautions when using high-speed counter instructions and parameters
This section describes the common precautions when using high-speed comparison tables and multi-point output comparison 
tables with the high-speed counter instructions (DHSCS, DHSCR, DHSZ instructions) or parameters. For the individual 
precautions on high-speed counter instructions, refer to MELSEC iQ-F FX5 Programming Manual (Instructions, Standard 
Functions/Function Blocks).
High-speed counter devices
The current values for high-speed counters are checked with special registers for each channel.
To start or stop counting of the high-speed counters, use the HIOEN instruction or the SPD instruction.
 • High-speed counter start/stop conditions
*1 Can be stopped when counting was started with the SPD instruction.
*2 Can be stopped when the high-speed comparison table is not set with parameters.
Precautions for the counting operation when the current value is changed
For the high-speed counter instructions, high-speed comparison tables, and multi-point output high-speed comparison tables, 
comparison processing is performed when the current value of the high-speed counter has changed due to pulse input. When 
the preset input comparison function is also enabled, comparison processing is also performed when the preset is executed.
However, please note that the comparison processing is not performed when the current value of the high-speed counter is 
changed with the following methods.
 • When the current value of a high-speed counter was rewritten with the HCMOV instruction.
 • When the current value of the high-speed counter is reset with the RST instruction or the ZRST instruction (when the FX3 
compatible high-speed counter function is valid)
 • When the current value of the high-speed counter was changed by a self-reset. (When the preset input comparison function 
is disabled)
 • When high-speed counter current value is the ON or OFF output result of the comparison of the DHSCS, DHSCR, DHSZ 
instructions.
 • When high-speed counter current value is the ON or OFF output result of the comparison of a high-speed comparison 
table.
Preset input comparison operation
When the preset input comparison is enabled and preset control switching is set to constant when ON, the preset input 
comparison does not operate.
Timing at which the instruction is enabled
The DHSCS, DHSCR, DHSZ instructions are enabled at the END instruction for the scan in which the instructions are driven. 
Even when the comparison value is changed, it is updated at the END instruction for the scan in which it was changed .
Configuring high-speed comparison tables with parameters
Operations of DHSCS, DHSCR, DHSZ instructions of the same comparison value are executed after high-speed comparison 
tables set with parameters. The high-speed comparison table is processed sequentially from the top of the table.
Function
Start
Stop
Counting
• HIOEN instruction
• SPD instruction
• HIOEN instruction
• SPD instruction
Comparison processing
• HIOEN instruction
• DHSCS, DHSCR, DHSZ instructions
• HIOEN instruction
• DHSCS, DHSCR, DHSZ instructions