Mitsubishi Electronics C6 Home Safety Product User Manual


 
7. Basic Commands
EGP, EGF
- 119 -
Program example
(1) Program containing a subroutine program using an EGP command.
END処理
X0
ON
OFF
X1
ON
OFF
①②
①②
V0
ON
OFF
V1
OFF
ON
D0
1
D1
1
①② ①②
2
OFF
ON
ON
X0の立上りでONする
X1の立上りでONする
X0がON  ONのためOFFする
X1がON  ONのためOFFする
*1 *2 *1 *2 *1 *2 *1 *2 *1 *2
END processing
Turns OFF because X0 is from ON to ON.
Turns OFF because X1 is from ON to ON.
Turns ON at the leadin
g
ed
g
e of X0.
Turns ON at the leadin
g
ed
g
e of X1.
Operation of EGP and EGF commands
Points
(1) Because the EGP and EGF commands operate with the operation results immediately prior to
the EGP and EGF commands, the AND instruction should be used at the same position.
The EGP and EGF commands cannot be used at the LD or OR position.
Coding
No. of
steps
Com-
mand
Device
10 LD M400
11 MOV K0 Z0
14 CALL P0
16 MOV K1 Z0
19 CALL P0
21 FEND
22 P0
23 LD X0Z0
24 EGP V0Z0
30 INC D0Z0
32 RET
10
*1
M400
MOV K0 Z0
CALL P0
*2
MOV K1 Z0
CALL P0
FEND
21
23
32
P0
X0Z0
V0Z0
INC D0Z0
RET
33