Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
12 Applied Instructions (High Speed Processing)
283
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
12.6.1 Program in which comparison result is set to ON when power is turned ON [ZCP]
instruction
DHSZ instruction outputs the comparison result only when a counting pulse is input. Even if the current value
of C235 is "0", Y010 remains OFF at the time of startup.
For initializing Y010, compare the current value of C235 with K1000 and K1200 and drive Y010 by DZCPP
instruction (for general zone comparison) as pulse operation only at the time of startup.
Refer to the program example shown below.
Explanation of operation
The outputs Y010 to Y012 are as shown below.
Program examples
Y010 = ON Y011 = ON Y012 = ON
1,000 1,200
Current value of C235
0
[Structured ladder/FBD]
X010
RST
EN
d
ENO
CC235
ZRST
EN ENO
d1
d2
Y010
Y012
OUT_C_32
EN
CCoil
CValue
ENO
CC235
K999
Pulse input: X000
M8000
RUN
monitor
M8000
DZCPP
EN
s1
s2
ENO
d
s3
DHSZ
EN
s1
s2
ENO
d
s
CN235
Y010
K1000
K1200
K1000
K1200
CN235
Y010
Start
Immediately after start, comparison is executed only once.
K1000 CN235
K1000 CN235 K1200
K1200 CN235
Immediately after start, comparison is executed by
interrupt when each pulse is input from X000.
K1000 CN235
K1000 CN235 K1200
K1200 CN235
[ST]
OUT_C_32(M8000,CC235,K999
);
ZRST(NOT X010,Y010,Y012);
RST(NOT X010,CC235);
DZCPP(X010,K1000,K1200,CN235,Y010);
DHSZ(X010,K1000,K1200,CN235,Y010);
Y010 to Y012 are reset.
:Y010 ON
:Y011 ON
:Y012 ON
:Y010 ON
:Y011 ON
:Y012 ON
>
<
>
<