6 Standard Function Blocks
6.5 CTUD(_E)
216
FXCPU Structured Programming Manual
(Application Functions)
Program example
In this program, the number of times the bit data stored in a device specified in
turns ON from OFF is
counted up (added by "1"). When the value stored in a device specified in
reaches the value specified in
, a device specified in
turns ON.
At the same time, the number of times the bit data stored in a device specified in
turns ON from OFF is
counted down (subtracted by "1"). When the value stored in a device specified in
becomes "0", a device
specified in
turns ON.
1) Function without EN/ENO(CTUD)
2) Function with EN/ENO(CTUD_E)
[Structured ladder]
[ST]
[Structured ladder]
[ST]
s1
d3
n
d1
s2
d3
d2
CTUD
CTUD_Instance
g_bool1
CU
QU
g_bool5
g_bool6
g_bool2
CD
QD
g_int2
CV
g_bool3
RESET
g_bool4
LOAD
g_int1
PV
CTUD_Instance(CU:=g_bool1,CD:=g_bool2,RESET:=g_bool3,LOAD:=g_bool4,PV:=g_int1);
g_bool5:=CTUD_Instance.QU;
g_bool6:=CTUD_Instance.QD;
g_int2:=CTUD_Instance.CV;
CTUD_E
CTUD_E_Instance
EN
ENO
QU
g_bool5
M10
M0
g_bool1
CU
CV
g_int2
g_bool4
LOAD
g_int1
PV
QD
g_bool6
g_bool2
CD
g_bool3
RESET
CTUD_E_Instance(EN:=M0,CU:=g_bool1,CD:=g_bool2,RESET:=g_bool3,LOAD:=g_bool4,PV:=g_int1);
M10:=CTUD_E_Instance.ENO;
g_bool5:=CTUD_E_Instance.QU;
g_bool6:=CTUD_E_Instance.QD;
g_int2:=CTUD_E_Instance.CV;
Содержание 09R927
Страница 2: ......
Страница 234: ...232 FXCPU Structured Programming Manual Application Functions Revision History MEMO ...