Tram4 / PLC - 1 (CPU 1214C DC/DC/DC) / Program Blocks: Main (OB1)
Tram4 / PLC - 1 (CPU 1214C DC/DC/DC) / Program Blocks: Main (OB1)
Tram4 / PLC - 1 (CPU 1214C DC/DC/DC) / Program Blocks: Main (OB1)
Automation Portal
Main
Name Data type Default value Comment
Input
Initial_Call Bool Initial call of this OB
Remanence Bool =True, if remanent data are available
Temp
t1 DInt
Constant
%M20.0 %M2.1
"auto/manual" "BTBangTai_HMI"
%M0.5
"trunggian_ %M0.1
nguon" "NC" MOVE
EN ENO
%MW80 OUT1 #t1
%M20.0 "oNhoTrungGian" IN
"auto/manual"
#t1
MOVE
>=
EN ENO
DInt
100 30000 IN
%QW80
"oNhoDieuKhienT
OUT1 anSo"
#t1
MOVE
<=
DInt EN ENO
0 IN
0 %QW80
"oNhoDieuKhienT
OUT1 anSo"
MUL
#t1 #t1 Auto (DInt)
> <
DInt DInt EN ENO
0 100 #t1 IN1 %QW80
300 IN2 "oNhoDieuKhienT
OUT anSo"
Network 3: cylinder 2
%M20.0 %M2.2
"auto/manual" "BTxilanh2_HMI"
Network 4: cylinder 1
Totally Integrated
Automation Portal
%M20.0 %M2.3
"auto/manual" "BTxilanh1_HMI"
Network 5: cylinder 3
%M20.0 %M2.4
"auto/manual" "BTxilanh3_HMI"
%M0.5
%M0.7 %M20.0 %M40.0 "trunggian_
"Start_HMI" "auto/manual" "Stop_HMI" nguon"
%M0.5
"trunggian_
nguon"
%M40.0
"Stop_HMI" MOVE
EN ENO
0 IN
%QW80
"oNhoDieuKhienT
OUT1 anSo"
%M0.5 %M0.6
"trunggian_ %I1.2 "trunggianCamBi %M0.0
nguon" "camBien1" en2" "BTBangTai"
%M0.0
"BTBangTai"
%M0.6
%I1.1 "trunggianCamBi
"camBien2" en2"
%M0.6
"trunggianCamBi %M0.3
en2" "BTxilanh1"
%DB2
"Timer1"
TON
Time
IN Q
t#2s PT ET ...
%M0.2
"Timer1".Q "BTxilanh2"
%DB3
"Timer2"
TON
Time
IN Q
t#2s PT ET ...
%M0.4
"Timer2".Q "BTxilanh3"
%M100.1
"BT_Foward/ %Q0.1
Reverse" "Foward/Reverse"