Totally Integrated
Automation Portal
baithuchanh1 / PLC_1 [CPU 1215C DC/DC/DC] / Program blocks
Main [OB1]
Main Properties
General
Name Main Number 1 Type OB Language LAD
Numbering Automatic
Information
Title "Main Program Sweep (Cy‐ Author Comment Family
cle)"
Version 0.1 User-defined ID
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
Constant
Network 1:
%M0.0 %Q0.0
"start1" "bt"
S
%M2.5
"dung"
R
Network 2:
Totally Integrated
Automation Portal
%DB1
"IEC_Timer_0_DB"
%Q0.0 TONR
"bt" Time
IN Q
%MD8
%M2.5 ET "Tag_1"
"dung"
R
T#60s PT
Network 3:
%MD8 %MD8 %MD12 %Q0.1
"Tag_1" "Tag_1" "tanso" "daochieu"
> < ==
S
Time Time Real
T#34s T#36s 0.0
Network 4:
Totally Integrated
Automation Portal
%DB2
"IEC_Timer_0_
DB_1"
%Q0.0 %MD8 TONR ADD
"bt" "Tag_1" Time Real
P_TRIG
<=
Time IN Q CLK Q EN ENO
T#2s ET T#0ms %M2.0 %MD12 %MD12
"p_trig1" "tanso" IN1 OUT "tanso"
1.0 IN2
%MD8 %MD8
"Tag_1" "Tag_1"
>= <=
Time Time
T#10s T#13s
%MD8 %MD8 %Q0.1
"Tag_1" "Tag_1" "daochieu"
> <=
Time Time
T#34s T#40s
%M2.3
"resettimer1"
R
T#100ms PT
Network 5:
"IEC_Timer_0_ %M2.3
DB_1".Q "resettimer1"
Network 6:
Totally Integrated
Automation Portal
%DB3
"IEC_Timer_0_
DB_2"
%Q0.0 %MD8 %MD8 TONR SUB
"bt" "Tag_1" "Tag_1" Time Real
P_TRIG
>= <
Time Time IN Q CLK Q EN ENO
T#30s T#36s ET T#0ms %M2.1 %MD12 %MD12
"p_trig2" "tanso" IN1 OUT "tanso"
1.0 IN2
%M2.4
"resettimer2"
R
T#100ms PT
Network 7:
"IEC_Timer_0_ %M2.4
DB_2".Q "resettimer2"
Network 8:
NORM_X SCALE_X
Real to Real Real to DInt
EN ENO EN ENO
0.0 MIN %MD16 0 MIN %QW64
%MD12 OUT "Tag_2" %MD16 OUT "dauraanalog"
"tanso" VALUE "Tag_2" VALUE
50.0 MAX 27648 MAX
Network 9:
Totally Integrated
Automation Portal
"IEC_Timer_0_ %M2.5
DB".Q "dung"
S
Network 10:
%M2.5 %Q0.0
"dung" "bt"
R
%M0.1
"stop1"
Network 11:
%M2.5 %Q0.1
"dung" "daochieu"
R
Network 12:
%MD12
%Q0.2
"tanso" "LS"
==
Real
20.0
Totally Integrated
Automation Portal
Network 13:
%MD12 %Q0.3
"tanso" "HS"
==
Real
50.0
Network 14:
%M2.5 %Q0.4
"dung" "FN"