Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
12 Applied Instructions (High Speed Processing)
291
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
11
Applied Instructions
(Data Operation)
12
Applied Instructions
(High Speed
Processing)
13
Applied Instructions
(Handy
Instruction)
14
Applied Instructions
(External FX I/O
Device)
15
Applied Instructions
(External Device
(optional device))
16
Applied Instructions
(External Device)
17
Applied Instructions
(Data Transfer 2)
18
Applied Instructions
(Floating Point)
19
Applied Instructions
(Data Operation 2)
20
Applied Instructions
(Positioning
Control)
12.6 DHSZ / High Speed Counter Zone Compare
Output pulse characteristics
1) Write prescribed data in advance to data registers constructing the table as shown in this program
example.
2) The output frequency of the DPLSY instruction remains in the value (D303, D302) until the current value
of a high speed counter specified in becomes equivalent to (D301, D300). (D302 specifies low-order
16 bits. D303 specifies high-order 16 bits, but is always "0".)
3) The operation in the second line is started after that, and then the operation in each line is executed in
turn.
4) When the operation in the last line is completed, the complete flag M8133 turns ON. The program
execution returns to the first line, and the operation is repeated.
5) For stopping the operation in the last line, set the frequency in the last table to K0.
6) When the command input is set to OFF, the pulse output turns OFF and the table counter D8131 is reset.
7) After DHSZ instruction is first executed, creation of the table is completed at the END instruction. The
DHSZ instruction becomes valid after that.
8) Accordingly, the contact of PLS M10 is used so that the DPLSY instruction is executed from the second
scan after the command input has been set to ON.
Data can be written to the table in a program as shown in this example or directly using keys in peripheral
equipment.
1) M8132: This is the special auxiliary relay for declaring the frequency control mode.
2) D8132: In the frequency control mode, the frequency set in the table is received by D8132 sequentially
according to the table counter D8131 count.
3) D8134 (low-order), D8135 (high-order):
In the frequency control mode, the comparison data in the table is received sequentially according to the
table counter count.
Cautions
1) DHSZ instruction can be used only once.
2) With regard to the DHSCS, DHSCR, DHSZ and DHSCT instructions for other purposes, a limited number
of instructions including the DHSZ instruction can be driven at one time.
3) Because the table is created when the END instruction is executed, it is necessary to delay execution of
the DPLSY instruction until creation of the table is completed.
4) Do not change the data table while the DHSZ instruction is driven.
5) In the frequency control mode, simultaneous output to Y000 to Y001 is not permitted.
Current value of C251
Output pulse
Frequency (Hz)
0
100
200
300
500
0 20 600 700 800