7 Applied Instructions
7.6 High Speed Processing
280
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
Common cautions on using instructions for high speed counter
DHSCS, DHSCR and DHSZ instructions are provided for high speed counters. This section explains common
cautions for these instructions.
1. Limitation in the number of an instruction in a program
DHSCS, DHSCR and DHSZ instructions can be used as many times as necessary in the same way as
general instructions. However, the number of simultaneously driven instructions is limited.
→ Refer to Section 1.3.7.
2. Response frequency of high speed counters
When DHSZ instruction is used, the maximum response frequency of every software counter and the total
frequency are limited. For details, refer to the following manual.
→ FX Structured Programming Manual (Device & Common)
3. Specification of output numbers (Y)
When using the same instruction for high speed counter repeatedly or when driving two or more instructions
for high speed counter at the same time, specify such output devices (Y) whose high-order two digits are the
same (in units of 8 devices).
1) When using devices of the same number (in units of 8 devices)
Example: when using Y000, specify Y000 to Y007. When using Y010, specify Y010 to Y017.
2) When using two or more instructions for high speed counter and non-consecutive output (Y) numbers
A program example is shown below:
When C255 reaches K100, the output Y000 is driven by interrupt. Y010 is driven when END processing is
executed.
If interrupt drive is required, use an output number in the range from Y001 to Y007 whose high-order two
digits are equivalent.
4. Caution on the counting operation when the current value is changed
An instruction for the high speed counter gives the comparison result when a pulse is input to the input (X) of
the high speed counter.
However, the comparison result is not given when the current value of the high speed counter is changed in
the following method.
1) Change method (example)
a) Overwriting the contents of a word device used as the comparison value using DMOV instruction, etc.
b) Resetting the current value of a high speed counter in a program.
2) Operation
Even if the condition for setting the output to ON or OFF is given as the comparison result, the
comparison result does not change when an instruction is simply driven.
M8000
DHSCS
EN
s1
s2
ENO
d
VAR_01
*1
CN255
Y000
DHSCS
EN
s1
s2
ENO
d
Y010
*1. VER_01 is a global label and is defined as K100.
VAR_01
*1
CN255