EasyManua.ls Logo

Mitsubishi Electric MELSEC FX Series - Page 78

Mitsubishi Electric MELSEC FX Series
838 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
5 Basic Instruction
5.5 Operating Counters
76
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
Program example
1. This program turns ON Y30 when X0 turns ON 10 times and resets the counter when X1
turns ON.
2. This program sets "10" to C10 when X0 turns ON and sets to "20" to C10 when X1 turns ON.
*1. Var_D10 is a global label and is defined as D10.
OUT_C
EN ENO
CC10
X000
CCoil
CValue
K10
CS10 Y030
RST
EN ENO
d
CN10
X001
[Structured ladder]
OUT_C(X0,CC10,10);
OUT(CS10,Y30);
RST(X1,CN10);
[ ST ]
CS10 Y030
OUT_C
EN ENO
CC10
X003
CCoil
CValue
Var_D0
MOVP
EN
s
ENO
d
Var_D0
*1
D0
X000 X001
10
MOVP
EN
s
ENO
d
Var_D0D0
X001 X000
20
Sets "10" to D0 when
X0 turns ON.
Sets "20" to D0 when
X1 turns ON.
C10 counts with the
data stored in D0 as
the set value.
When C10 completes counting,
Y30 turns ON.
[Structured ladder]
MOVP(X0 AND NOT X1,10,Var_D0);
MOVP(X1 AND NOT X0,20,Var_D0);
OUT_C(X3,CC10,Var_D0);
OUT(CS10,Y30);
[ ST ]

Table of Contents

Other manuals for Mitsubishi Electric MELSEC FX Series

Related product manuals