You are on page 1of 9

PLCtt1_test

Totally Integrated
Automation Portal

Table of contents
Main [OB1] 3-1
Totally Integrated
Automation Portal

Main [OB1]
Main Properties
General
Name Main Number 1 Type OB
Language LAD Numbering Automatic
Information
Title "Main Program Sweep Author Comment
(Cycle)"
Family Version 0.1 User-defined
ID

Name Data type Default value Supervi‐ Comment


sion
Temp
Start_temp Bool
Accept_0 Bool
Accept_1 Bool
Constant

Network 1: Khởi động

%DB4
"Control__DB"
%FB1
"Control_"
EN ENO
%M1.0 %M0.7
"Start" Start Control "Control"
%M1.1
"Stop" Stop

Network 2: Khởi tạo giá trị


Totally Integrated
Automation Portal

%M1.2 %FC2
"Accept" "Scale_time"
P EN ENO
#Accept_0 %MD54 %MD6
"Time_XA" Time_XA S_XA "Time_XA_1"
%MD62 %MD10
"Time_XB" Time_XB S_XB "Time_XB_1"
%MD58 %MD74
"Time_VA" Time_VA S_VA "Time_VA_1"
%MD66 %MD14
"Time_VB" Time_VB S_VB "Time_VB_1"
%MD78
S_DA "Time_DA"
%MD2
S_DB "Time_DB"
%MD70
Time_tru "Time_tru"

%M1.2 T_CONV
"Accept" DInt TO Time
P EN ENO
#Accept_1 %MD70 %MD18
"Time_tru" IN OUT "Time_FOR_Timer"

Network 3: Đèn A+B

%DB1
"IEC_Timer_0_DB"
%M0.7 "IEC_Timer_0_ TON
"Control" DB".Q Time
IN Q
%MD18 ET ...
"Time_FOR_Timer" PT

SUB
Auto (DInt)
EN ENO
%MD70 %MD46
"Time_tru" IN1 OUT "Time_TEMP"
"IEC_Timer_0_
DB".ET IN2

T_CONV
Time TO DInt
EN ENO
%MD46 %MD28
"Time_TEMP" IN OUT "Time_Dint"

ADD
Auto (DInt)
EN ENO
%MD74 %MD82
"Time_VA_1" IN1 OUT "Temp_1"
%MD78
"Time_DA" IN2

Network 4: So sánh tru A


Totally Integrated
Automation Portal

%M0.7 %MD28 %M1.4


"Control" "Time_Dint" "DEN_XA"
>=
DInt
%MD82
"Temp_1"

%MD28 %MD28
%M0.7 %M1.5
"Control" "Time_Dint" "Time_Dint" "DEN_VA"
<= >=
DInt DInt
%MD82 %MD78
"Temp_1" "Time_DA"

%M0.7 %MD28 %M1.6


"Control" "Time_Dint" "DEN_DA"
<=
DInt
%MD78
"Time_DA"

Network 5: Tách số tru A


Totally Integrated
Automation Portal

Network 5: Tách số tru A

%M1.4 SUB DIV


"DEN_XA" Auto (DInt) Auto (DInt)
EN ENO EN ENO 1
%MD28 %MD32 %MD32 %MD106
"Time_Dint" IN1 OUT "Temp_3" "Temp_3" IN1 OUT "XA_temp"
%MD82 1000 IN2
"Temp_1" IN2

%M1.5 SUB DIV


"DEN_VA" Auto (DInt) Auto (DInt)
EN ENO EN ENO 2
%MD28 %MD32 %MD32 %MD110
"Time_Dint" IN1 OUT "Temp_3" "Temp_3" IN1 OUT "VA_temp"
%MD78 1000 IN2
"Time_DA" IN2

%M1.6 DIV DIV


"DEN_DA" Auto (DInt) Auto (DInt)
EN ENO EN ENO 3
%MD28 %MD114 %MD114 %MD90
"Time_Dint" IN1 OUT "DA_temp" "DA_temp" IN1 OUT "chucA"
1000 IN2 10 IN2

DIV MOD
Auto (DInt) Auto (DInt)
1 EN ENO EN ENO
%MD106 %MD90 %MD106 %MD38
"XA_temp" IN1 OUT "chucA" "XA_temp" IN1 OUT "donviA"
10 IN2 10 IN2

DIV MOD
Auto (DInt) Auto (DInt)
2 EN ENO EN ENO
%MD110 %MD90 %MD110 %MD38
"VA_temp" IN1 OUT "chucA" "VA_temp" IN1 OUT "donviA"
10 IN2 10 IN2

MOD
Auto (DInt)
3 EN ENO
%MD114 %MD38
"DA_temp" IN1 OUT "donviA"
10 IN2

Network 6: Đổi ra led A


Totally Integrated
Automation Portal

%M0.7 %FC1 %FC1


"Control" "Conver-ses" "Conver-ses"
EN ENO EN ENO
%MD90 %M0.0 %MD38 %M50.0
"chucA" numb a "a1" "donviA" numb a "a2"
%M0.1 %M50.1
b "b1" b "b2"
%M0.2 %M50.2
c "c1" c "c2"
%M0.3 %M50.3
d "d1" d "d2"
%M0.4 %M50.4
e "e1" e "e2"
%M0.5 %M50.5
f "f1" f "f2"
%M0.6 %M50.6
g "g1" g "g2"

Network 7: So sánh tru B

%MD28
%M0.7 %M36.1
"Control" "Time_Dint" "DEN_DB"
>=
DInt
%MD78
"Time_DA"

%M0.7 %MD28 %MD28 %M1.7


"Control" "Time_Dint" "Time_Dint" "DEN_XB"
<= >=
DInt DInt
%MD78 %MD10
"Time_DA" "Time_XB_1"

%MD28
%M0.7 %M36.0
"Control" "Time_Dint" "DEN_VB"
<=
DInt
%MD10
"Time_XB_1"

Network 8: Tách số tru B


Totally Integrated
Automation Portal

Network 8: Tách số tru B

%M36.1 SUB DIV


"DEN_DB" Auto (DInt) Auto (DInt)
EN ENO EN ENO 1
%MD28 %MD94 %MD94 %MD122
"Time_Dint" IN1 OUT "Temp_4" "Temp_4" IN1 OUT "DB_temp"
%MD78 1000 IN2
"Time_DA" IN2

%M1.7 SUB DIV


"DEN_XB" Auto (DInt) Auto (DInt)
EN ENO EN ENO 2
%MD28 %MD94 %MD94 %MD118
"Time_Dint" IN1 OUT "Temp_4" "Temp_4" IN1 OUT "XB_temp"
%MD14 1000 IN2
"Time_VB_1" IN2

%M36.0 DIV DIV


"DEN_VB" Auto (DInt) Auto (DInt)
EN ENO EN ENO 3
%MD28 %MD126 %MD126 %MD42
"Time_Dint" IN1 OUT "VB_temp" "VB_temp" IN1 OUT "chucB"
1000 IN2 10 IN2

DIV MOD
Auto (DInt) Auto (DInt)
1 EN ENO EN ENO
%MD122 %MD42 %MD122 %MD98
"DB_temp" IN1 OUT "chucB" "DB_temp" IN1 OUT "donviB"
10 IN2 10 IN2

DIV MOD
Auto (DInt) Auto (DInt)
2 EN ENO EN ENO
%MD118 %MD42 %MD118 %MD98
"XB_temp" IN1 OUT "chucB" "XB_temp" IN1 OUT "donviB"
10 IN2 10 IN2

MOD
Auto (DInt)
3 EN ENO
%MD126 %MD98
"VB_temp" IN1 OUT "donviB"
10 IN2

Network 9: Đổi ra led B


Totally Integrated
Automation Portal

%M0.7 %FC1 %FC1


"Control" "Conver-ses" "Conver-ses"
EN ENO EN ENO
%MD42 %M50.7 %MD98 %M51.5
"chucB" numb a "a3" "donviB" numb a "a4"
%M51.0 %M51.6
b "b3" b "b4"
%M51.1 %M51.7
c "c3" c "c4"
%M52.4 %M52.0
d "d3" d "d4"
%M51.2 %M52.1
e "e3" e "e4"
%M51.3 %M52.2
f "f3" f "f4"
%M51.4 %M52.3
g "g3" g "g4"

You might also like