Program Blocks: Main (OB1)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Totally Integrated

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

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: GỌI FC CHƯƠNG TRÌNH AUTO

%Q0.0 %FC2
"Q_Lamp_Auto" "FC_AUTO_MODE"
EN ENO

Network 2: GỌI FC MANUAL

%Q0.1
"Q_Lamp_ %FC1
Manual" "FC_MANUAL_MODE"
EN ENO

Network 3: GỌI CHƯƠNG TRÌNH ĐẦU RA Q

%FC3
"FC_OUTPUT"
EN ENO

Network 4: GỌI CHƯƠNG TRÌNH MÔ PHỎNG

%FC4
"FC_SIMULATION"
EN ENO

Network 5: ĐIỀU KHIỂN ĐÈN

%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

Name Data type Default value Comment


Input
Output
InOut
Temp
Constant
Return
FC_MANUAL_MODE Void

Network 1: BĂNG TẢI

%I0.4 %M30.0
"I_BT" "Q_Manual_BT"

%M10.4
"M_BT"

Network 2: XILANH CAO

%M30.1
%I0.5 "Q_Manual_
"I_Xilanh_Cao" Xilanh_Cao"

%M10.5
"M_Xilanh_Cao"

Network 3: XILANH TRUNG BÌNH

%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

Name Data type Default value Comment


Input
Output
InOut
Temp
Constant
Return
FC_AUTO_MODE Void

Network 1: RESET CÁC BỘ ĐẾM VỀ 0

%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"

Network 2: ĐIỀU KHIỂN BĂNG TẢI

%M1.3 %M10.0 %M20.0


"AlwaysFALSE" "M_Mode" P_TRIG "Q_Auto_BT"
CLK Q S
%M70.0
"Tag_1"
%I0.0
"I_Mode"

%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"

Network 3: ĐIỀU KHIỂN XILANH SP CAO


Totally Integrated
Automation Portal

%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

Network 4: ĐIỀU KHIỂN XILANH SP TRUNG BÌNH

%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

Network 5: ĐẾM SẢN PHẨM CAO

%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

Network 6: ĐẾM SẢN PHẨM TB

%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

Network 7: ĐẾM SẢN PHẨM THẤP

%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

Name Data type Default value Comment


Input
Output
InOut
Temp
Constant
Return
FC_OUTPUT Void

Network 1: BĂNG TẢI

%Q0.0 %M20.0 %Q0.2


"Q_Lamp_Auto" "Q_Auto_BT" "Q_BT"

%Q0.1
"Q_Lamp_ %M30.0
Manual" "Q_Manual_BT"

Network 2: XILANH CAO

%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"

Network 3: XILANH TRUNG BÌNH

%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

Name Data type Default value Comment


Input
Output
InOut
Temp
Constant
Return
FC_SIMULATION Void

Network 1: BĂNG TẢI CHẠY THÌ BỘ ĐẾM SẼ TĂNG GIÁ TRỊ

%M20.0 %M5.2 %M0.5 ADD


"Q_Auto_BT" "SIMU_CB_CAO" "Clock_1Hz" P_TRIG Auto (Int)
CLK Q EN ENO
%M80.0 %MW206 %MW206
"Tag_11" "Simu_VT_SP" "Simu_VT_SP"
%M5.3 IN1 OUT
"SIMU_CB_TB" 1 IN2

%M5.4
"SIMU_CB_Thấp"

Network 2: RESET BỘ ĐẾM KHI CẢM BIẾN NÀO ĐÓ TÁC ĐỘNG

%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"

Network 3: MÔ PHỎNG TÁC ĐỘNG CẢM BIẾN CAO

%M1.3 %M5.2 %MW206 %M10.1


"AlwaysFALSE" "SIMU_CB_CAO" "Simu_VT_SP" "M_CB_CAO"
>=
S
Int
4
%M5.2
"SIMU_CB_CAO"
R

%MW206 %M10.1
"Simu_VT_SP"
"M_CB_CAO"
<=
R
Int
1

Network 4: MÔ PHỎNG TÁC ĐỘNG CẢM BIẾN TRUNG BÌNH


Totally Integrated
Automation Portal

%M1.3 %M5.3 %MW206 %M10.2


"AlwaysFALSE" "SIMU_CB_TB" "Simu_VT_SP" "M_CB_TB"
>=
S
Int
8
%M5.3
"SIMU_CB_TB"
R

%MW206 %M10.2
"Simu_VT_SP"
"M_CB_TB"
<=
R
Int
1

Network 5: MÔ PHỎNG TÁC ĐỘNG CẢM BIẾN THẤP

%M1.3 %M5.4 %MW206 %M10.3


"AlwaysFALSE" "SIMU_CB_Thấp" "Simu_VT_SP" "M_CB_Thấp"
>=
S
Int
15
%M5.4
"SIMU_CB_Thấp"
R

%MW206 %M10.3
"Simu_VT_SP"
"M_CB_Thấp"
<=
R
Int
1
Totally Integrated
Automation Portal

Program blocks / System blocks / Program resources


IEC_Timer_0_DB [DB1]
IEC_Timer_0_DB Properties
General
Name IEC_Timer_0_DB Number 1 Type DB Language DB
Numbering Automatic
Information
Title Author Simatic Comment Family IEC
Version 1.0 User-defined ID IEC_TMR

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

Program blocks / System blocks / Program resources


IEC_Timer_0_DB_1 [DB2]
IEC_Timer_0_DB_1 Properties
General
Name IEC_Timer_0_DB_1 Number 2 Type DB Language DB
Numbering Automatic
Information
Title Author Simatic Comment Family IEC
Version 1.0 User-defined ID IEC_TMR

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy