Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
32 Applied Instructions (High Speed Processing 2)
32.1 DHSCT / High Speed Counter Compare With Data Table
739
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
31
Applied Instructions
(Data Transfer 3)
32
Applied Instructions
(High Speed
Processing 2)
33
Applied Instructions
(Extension File
Register Control)
34
Applied Instructions
(FX
3U
-CF-ADP)
35
Interrupt Function
and Pulse Catch
Function
A
Relationships
between devices
and addresses
B
Applied
Instruction List
Function and operation explanation
1. 32-bit operation (DHSCT)
The current value of a high speed counter specified in is compared with the data table shown below
which has "m" points stored in the device specified by and later, and the operation output set value (ON
or OFF) specified in the data table is output to the devices specified by .
Data table used for comparison
1) When this instruction is executed, the uppermost data table of the data tables is set as the comparison
target.
2) When the current value of the high speed counter, specified in , becomes equivalent to the
comparison value in the data table, the corresponding operation output specified in the data table is
output to the device specified by .
If an output (Y) is specified in , the output processing is executed immediately without waiting for the
output refresh executed by the END instruction.
When specifying and output (Y), make sure that the least significant digit of the device number is "0".
Examples: Y000, Y010 and Y020
3) Immediately after step 2), "1" is added to the current table counter value D8138.
4) The next comparison point is set as the comparison target data.
5) Steps 2) and 3) are repeated until the current value of the table counter D8138 becomes "m".
When the current value becomes "m", the instruction execution complete flag M8138 turns ON, and the
execution returns to step 1). At this time, the table counter D8138 is reset to "0".
6) When the command contact is set to OFF, execution of the instruction is stopped and the table counter
D8138 is reset to "0".
Comparison
point number
Comparison data
Operation output set value
(SET [1] or RESET [0])
Operation output destination
0
+1, +2
to +n-1
1
+4, +3 +5
2
+7, +6 +8
...
...
...
m-2
+3m-5, +3m-6 +3m-4
m-1
+3m-2, +3m-3 +3m-1
DHSCT
EN ENO
s1
m
s2
n
d
Command
input
Head device storing the data table
Number of comparison points in data table
High speed counte (C235 to C255)
Number of devices to which
the operation status is output
Head device to which
the operation status is output
Operation output set value (SET [1] or RESET [0]) [Up to 16 points]
Operation output setting = HA716
When the current value of the high speed counte
r
becomes equivalent to the comparison value,
the operation output setting pattern is output.
In the case of
" = Y000,
n = K10"
Operation output setting
1 0 1 0 0 1 1 1 0 0 0 1 0 1 1 0
A716
Y
0
1
1
Y
0
1
0
Y
0
0
7
Y
0
0
6
Y
0
0
5
Y
0
0
4
Y
0
0
3
Y
0
0
2
Y
0
0
1
Y
0
0
0
:ON
:OFF
+
n-1
d d
d