Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
12 Applied Instructions (High Speed Processing)
280
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
12.6 DHSZ / High Speed Counter Zone Compare
Function and operation explanation
1. 32-bit operation (DHSZ)
The current value of the high speed counter of the device specified by is compared with two comparison
points (comparison value 1 and comparison value 2). Based on the comparison result, "smaller than the lower
comparison value", "inside the comparison zone" or "larger than the upper comparison value", one among the
devices specified by is set to ON regardless of the operation cycle.
In this instruction, the comparison processing is executed after the count processing in the high speed
counter.
Comparison points
Make sure that the comparison value 1 and the comparison value 2 have the following relationship:
Operation
When the current value of the high speed counter C251 changes (counts) as shown below, the comparison
result is output to one of the outputs Y000, Y001 or Y002.
Related instruction
The following instructions can be combined with high speed counters.
Comparison pattern Current value of C251
Change of output contact (Y)
Y000 Y001 Y002
>
1000>
ON OFF OFF
9991000 ONOFF OFFON OFF
9991000 OFFON ONOFF OFF
≤≤
9991000 ONOFF OFFON OFF
9991000 OFFON ONOFF OFF
1000≤≤2000
OFF ON OFF
20002001 OFF ONOFF OFFON
20002001 OFF OFFON ONOFF
<
20002001 OFF ONOFF OFFON
20002001 OFF OFFON ONOFF
>2000
OFF OFF ON
Instruction Instruction name
DHSCS High speed counter set
DHSCR High speed counter reset
DHSZ High speed counter zone compare
DHCMOV High speed counter move
DHSCT High speed counter compare with data table
Command input
Comparison value 1
Comparison value 2
Comparison source
Output
destination
DHSZ
EN
s1
s2
ENO
d
s
+1
+2
Set to ON
ds1
s2
s
d
d
s
s
s1
s2
OUT_C_32
EN
CCoil
CValue
ENO
K2147483647
s
High speed counter
specified by
>
>
Y000
Y001
Y002
K1000 C251 K2000
K1000 C251
C251 K2000
ON
DHSZ
EN
s1
s2
ENO
d
s
OUT_C_32
EN
CCoil
CValue
ENO
K2147483647
M8000
RUN
monitor
CC251
Y0K1000
K2000
C251
>
>
≤≤