Program Blocks: Main (OB1)
Program Blocks: Main (OB1)
Program Blocks: Main (OB1)
Automation Portal
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
%Q0.0 %FC2
"Q_Lamp_Auto" "FC_AUTO_MODE"
EN ENO
%Q0.1
"Q_Lamp_ %FC1
Manual" "FC_MANUAL_MODE"
EN ENO
%FC3
"FC_OUTPUT"
EN ENO
%FC4
"FC_SIMULATION"
EN ENO
%I0.0 %Q0.0
"I_Mode" "Q_Lamp_Auto"
%M10.0 %Q0.1
"M_Mode" "Q_Lamp_
Manual"
NOT
Totally Integrated
Automation Portal
Program blocks
FC_MANUAL_MODE [FC1]
FC_MANUAL_MODE Properties
General
Name FC_MANUAL_MODE Number 1 Type FC Language LAD
Numbering Automatic
Information
Title Author Comment Family
Version 0.1 User-defined ID
%I0.4 %M30.0
"I_BT" "Q_Manual_BT"
%M10.4
"M_BT"
%M30.1
%I0.5 "Q_Manual_
"I_Xilanh_Cao" Xilanh_Cao"
%M10.5
"M_Xilanh_Cao"
%M30.2
%I0.6 "Q_Manual_
"I_Xilanh_TB" Xilanh_TB"
%M10.6
"M_Xilanh_TB"
Totally Integrated
Automation Portal
Program blocks
FC_AUTO_MODE [FC2]
FC_AUTO_MODE Properties
General
Name FC_AUTO_MODE Number 2 Type FC Language LAD
Numbering Automatic
Information
Title Author Comment Family
Version 0.1 User-defined ID
%M5.1
"M_reset" MOVE MOVE MOVE
EN ENO EN ENO EN ENO
0 IN %MW200 0 IN %MW202 0 IN %MW204
OUT1 "Act_Count_Cao" OUT1 "Act_Count_TB" OUT1 "Act_Count_Thap"
%M20.1
"Q_Auto_ %M20.0
Xilanh_Cao" N_TRIG "Q_Auto_BT"
CLK Q S
%M70.1
"Tag_2"
%M20.2
"Q_Auto_ %M20.0
Xilanh_TB" N_TRIG "Q_Auto_BT"
CLK Q S
%M70.2
"Tag_3"
%I0.1 %M20.0
"I_CB_CAO" P_TRIG "Q_Auto_BT"
CLK Q R
%M70.3
"Tag_4"
%M10.1
"M_CB_CAO"
%I0.2 %M20.0
"I_CB_TB" P_TRIG "Q_Auto_BT"
CLK Q R
%M70.4
"Tag_5"
%M10.2
"M_CB_TB"
%M20.1
%M1.3 %I0.1 "Q_Auto_
"AlwaysFALSE" "I_CB_CAO" P_TRIG Xilanh_Cao"
CLK Q S
%M70.5
"Tag_6"
%M10.1
"M_CB_CAO"
%DB1
"IEC_Timer_0_DB"
%M20.1 %M20.1
"Q_Auto_ TON "Q_Auto_
Xilanh_Cao" Time Xilanh_Cao"
IN Q R
T#3S PT ET T#0ms
%M20.2
%M1.3 %I0.2 "Q_Auto_
"AlwaysFALSE" "I_CB_TB" P_TRIG Xilanh_TB"
CLK Q S
%M70.6
"Tag_7"
%M10.2
"M_CB_TB"
%DB2
"IEC_Timer_0_
DB_1"
%M20.2 %M20.2
"Q_Auto_ TON "Q_Auto_
Xilanh_TB" Time Xilanh_TB"
IN Q R
T#3S PT ET T#0ms
%I0.1 ADD
"I_CB_CAO" P_TRIG Auto (Int)
CLK Q EN ENO
%M71.0 %MW200 %MW200
"Tag_8" "Act_Count_Cao" "Act_Count_Cao"
%M10.1 IN1 OUT
"M_CB_CAO" 1 IN2
%I0.2 ADD
"I_CB_TB" P_TRIG Auto (Int)
CLK Q EN ENO
%M71.1 %MW202 %MW202
"Tag_9" "Act_Count_TB" "Act_Count_TB"
%M10.2 IN1 OUT
"M_CB_TB" 1 IN2
%I0.3 ADD
"I_CB_Thấp" P_TRIG Auto (Int)
CLK Q EN ENO
%M71.2 %MW204 %MW204
"Tag_10" "Act_Count_Thap" "Act_Count_Thap"
%M10.3 IN1 OUT
"M_CB_Thấp" 1 IN2
Totally Integrated
Automation Portal
Program blocks
FC_OUTPUT [FC3]
FC_OUTPUT Properties
General
Name FC_OUTPUT Number 3 Type FC Language LAD
Numbering Automatic
Information
Title Author Comment Family
Version 0.1 User-defined ID
%Q0.1
"Q_Lamp_ %M30.0
Manual" "Q_Manual_BT"
%M20.1
%Q0.0 "Q_Auto_ %Q0.3
"Q_Lamp_Auto" Xilanh_Cao" "Q_Xilanh_Cao"
%Q0.1 %M30.1
"Q_Lamp_ "Q_Manual_
Manual" Xilanh_Cao"
%M20.2
%Q0.0 "Q_Auto_ %Q0.4
"Q_Lamp_Auto" Xilanh_TB" "Q_Xilanh_TB"
%Q0.1 %M30.2
"Q_Lamp_ "Q_Manual_
Manual" Xilanh_TB"
Totally Integrated
Automation Portal
Program blocks
FC_SIMULATION [FC4]
FC_SIMULATION Properties
General
Name FC_SIMULATION Number 4 Type FC Language LAD
Numbering Automatic
Information
Title Author Comment Family
Version 0.1 User-defined ID
%M5.4
"SIMU_CB_Thấp"
%M1.3 %M10.1
"AlwaysFALSE" "M_CB_CAO" MOVE
EN ENO
0 IN %MW206
%M10.2 OUT1 "Simu_VT_SP"
"M_CB_TB"
%M10.3
"M_CB_Thấp"
%MW206 %M10.1
"Simu_VT_SP"
"M_CB_CAO"
<=
R
Int
1
%MW206 %M10.2
"Simu_VT_SP"
"M_CB_TB"
<=
R
Int
1
%MW206 %M10.3
"Simu_VT_SP"
"M_CB_Thấp"
<=
R
Int
1
Totally Integrated
Automation Portal
Name Data type Start value Retain Accessible Writ‐ Visible in Setpoint Supervi‐ Comment
from able HMI engi‐ sion
HMI/OPC from neering
UA HMI/
OPC
UA
Static
PT Time T#0ms False True True True False
ET Time T#0ms False True False True False
IN Bool false False True True True False
Q Bool false False True False True False
Totally Integrated
Automation Portal
Name Data type Start value Retain Accessible Writ‐ Visible in Setpoint Supervi‐ Comment
from able HMI engi‐ sion
HMI/OPC from neering
UA HMI/
OPC
UA
Static
PT Time T#0ms False True True True False
ET Time T#0ms False True False True False
IN Bool false False True True True False
Q Bool false False True False True False