Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
12 Applied Instructions (High Speed Processing)
271
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.4 DHSCS, DHSCS_I / High Speed Counter Set, High Speed Interrupt Counter Set
12.4.1 Common cautions on using instructions for high speed counter
DHSCS, DHSCR, DHSZ and DHSCT 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.
1) For FX
3U and FX3UC PLCs
2) For FX
0S, FX0, FX0N, FX1S, FX
1N
, FX1NC, FXU, FX2C, FX2N, FX2NC, FX3S, FX3G and FX3GC PLCs
*1. The instruction is not provided in the FX
0S, FX0, FX0N, FX1S, FX1N and FX1NC PLCs.
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.
Instruction Limitation in number of instructions driven at same time
DHSCS
32 instructions including DHSCT instructionDHSCR
DHSZ
DHSCT Only 1 (This instruction can only be used once.)
Instruction Limitation in number of instructions driven at same time
DHSCS
6 instructions
DHSCR
DHSZ
*1
M8000
DHSCS
EN
s1
s2
ENO
d
K100
CN255
Y000
DHSCS
EN
s1
s2
ENO
d
Y010K100
CN255