Справочник Пользователя для Mitsubishi Electronics FXCPU

Скачать
Страница из 838
12 Applied Instructions (High Speed Processing)
283
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
11
Appl
ied
 In
stru
cti
ons 
(D
ata O
per
at
io
n)
12
Ap
plied
 Instru
ctio
ns 
(High S
peed 
Process
ing)
13
App
lied Instr
ucti
ons 
(Handy
 
Instruction)
14
Ap
pl
ied In
struct
ions 
(External FX I/O
 
D
evice)
15
Appl
ied
 Instru
cti
ons
 
(External
 Dev
ice 
(op
tional
 dev
ice)
)
16
App
lie
d Instr
uction
(E
xter
nal
 Devi
ce)
17
Ap
pl
ied Inst
ruct
io
ns 
(Dat
a T
ransf
er 2)
18
Appl
ied
 In
stru
cti
ons 
(Float
ing P
oin
t)
19
App
lie
d Instr
uction
(D
at
a Oper
at
ion 2)
20
App
lied Inst
ructi
ons 
(Pos
itioning 
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
≤  
>
<
>
<