0% found this document useful (0 votes)
49 views21 pages

Chuong Trinh PDF

The document describes a Totally Integrated Automation Portal with program blocks and networks. It includes the Main program and functions for modules, automation, and sensors. The networks show logic for motor control and sensor detection states.

Uploaded by

Phuoc Huynh Duy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views21 pages

Chuong Trinh PDF

The document describes a Totally Integrated Automation Portal with program blocks and networks. It includes the Main program and functions for modules, automation, and sensors. The networks show logic for motor control and sensor detection states.

Uploaded by

Phuoc Huynh Duy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

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


Input
Initial_Call Bool
Remanence Bool
Temp
Constant

Network 1:

%FC9000
"MHJ-PLC-Lab-Function-S71200"
EN ENO

Network 2:

%M100.0 %M0.0
"FirstScan" "Step0"
RESET_BF
90

Network 3:

%I2.4 %M50.1
"S3" "1st_detectt_B5"
R

%M50.2
"1st_detectt_B3"
R

Network 4: Motor cuốn 1

%I2.3 %I2.2 %I2.4 %Q1.3


"S2" "S1" "S3" "MR1"

%Q1.3
"MR1"

Network 5:

%FC1
"Module_Can_1"
EN ENO

Network 6:

%FC2
"Module_Can_2"
EN ENO

Network 7:
Totally Integrated
Automation Portal

%FC3
"Module_Can_1_Out"
EN ENO

Network 8:

%FC4
"Module_Can_2_Out"
EN ENO
Totally Integrated
Automation Portal

Program blocks
MHJ-PLC-Lab-Function-S71200 [FC9000]
MHJ-PLC-Lab-Function-S71200 Properties
General
Name MHJ-PLC-Lab-Function- Number 9000 Type FC Language SCL
S71200
Numbering Manual
Information
Title Author Comment Family
Version 0.1 User-defined ID

Name Data type Default value


Input
Output
InOut
Temp
rdTimeReturn Int
outputTime DTL
SyncVal Byte
forVal Int
forVal_2 Int
Value Byte
Constant
CompVal Byte 16#34
Value_01 Byte 16#11
Value_01_DW DWord 16#A165_D992
Value_02_DW DWord 16#58BE_4401
Return
MHJ-PLC-Lab-Function-S71200 Void

0001
0002 #Value:=PEEK(area := 16#82,
0003 dbNumber := 0,
0004 byteOffset := 511);
0005 #Value := #Value + 1;
0006
0007 POKE(area := 16#82,
0008 dbNumber := 0,
0009 byteOffset := 511,
0010 value := #Value);
0011
0012 POKE(area:=16#81,
0013 dbNumber:=0,
0014 byteOffset:=1016,
0015 value:=#Value_01_DW);
0016 POKE(area := 16#81,
0017 dbNumber := 0,
0018 byteOffset := 1020,
0019 value := #Value_02_DW);
0020
0021 POKE(area := 16#81,
0022 dbNumber := 0,
0023 byteOffset := 511,
0024 value := B#16#00);
0025
0026 FOR #forVal := 0 TO 120 DO
0027 FOR #forVal_2:=0 TO 10 DO
0028 #rdTimeReturn:=RD_SYS_T(#outputTime);
0029 #rdTimeReturn := WR_SYS_T(#outputTime);
0030 #rdTimeReturn := RD_SYS_T(#outputTime);
0031 #rdTimeReturn := WR_SYS_T(#outputTime);
0032 END_FOR;
0033 #SyncVal:= PEEK(area := 16#81,
0034 dbNumber := 0,
0035 byteOffset := 511);
0036 IF #SyncVal = #CompVal THEN
0037 GOTO M_1;
0038 END_IF;
0039 END_FOR;
0040 RETURN;
0041
0042 M_1:
0043 POKE(area := 16#81,
0044 dbNumber := 0,
0045 byteOffset := 511,
0046 value := B#16#0);
0047
0048
0049
Totally Integrated
Automation Portal

Program blocks
Module_Can_1 [FC1]
Module_Can_1 Properties
General
Name Module_Can_1 Number 1 Type FC Language LAD
Numbering Automatic
Information
Title Author Comment Family
Version 0.1 User-defined ID

Name Data type Default value


Input
Output
InOut
Temp
Constant
Return
Module_Can_1 Void

Network 1: Initial Step

%M0.0
%I2.3 "Step0"
"S2" SR
S Q

%I2.4
"S3"
R1

%M0.1
"Step1"

Network 2:

%M0.1
%M0.0 "Step1"
"Step0" SR
S Q

%M1.0 %I0.0 %I0.1


"Step8" "T3".Q "B1" "B2"

%I2.4
"S3"
R1

%M0.2
"Step2"

%M0.3
"Step3"

%M0.7
"Step7"

Network 3:

%DB1
%M0.2 "T0"
%M0.1 %I0.2 %M50.2 "Step2" TON
"Step1" "B3" "1st_detectt_B3" SR Time
S Q IN Q
T#1s PT ET T#0ms
%I2.4
"S3" %M50.2
R1 "1st_detectt_B3"
S
%M0.3
"Step3"

Network 4:
Totally Integrated
Automation Portal

%M0.3
%M0.2 "Step3"
"Step2" "T0".Q SR
S Q

%M0.1 %M50.2
"Step1" "1st_detectt_B3"

%I2.4
"S3"
R1

%M0.4
"Step4"

%M0.7
"Step7"

Network 5:

%DB2
%M0.4 "T1"
%M0.3 %I0.3 "Step4" TON
"Step3" "B4" SR Time
S Q IN Q
T#1s PT ET T#0ms
%M0.6 %I0.0
"Step6" "B1"

%I2.4
"S3"
R1

%M0.5
"Step5"

Network 6:

%DB3
%M0.5 "T2"
%M0.4 "Step5" TON
"Step4" "T1".Q SR Time
S Q IN Q
T#1s PT ET T#0ms
%I2.4
"S3"
R1

%M0.6
"Step6"

%M0.7
"Step7"

Network 7:

%M0.6
%M0.5 "Step6"
"Step5" "T2".Q SR
S Q

%I2.4
"S3"
R1

%M0.7
"Step7"

%M0.4
"Step4"

Network 8:
Totally Integrated
Automation Portal

%M0.7
%M0.6 %I0.0 "Step7"
"Step6" "B1" SR
S Q

%M0.1 %I0.0
"Step1" "B1"
P
%M50.3
"Tag_5"
%M0.3
"Step3"

%M0.5
"Step5"

%I2.4
"S3"
R1

%M1.0
"Step8"

Network 9:

%DB9
%M1.1 "T8"
%M0.7 %I0.1 "Step88" TON
"Step7" "B2" SR Time
S Q IN Q
T#400MS PT ET T#0ms
%I2.4
"S3"
R1

%M1.0
"Step8"

Network 10:

%DB8
%M1.0 "T3"
%M1.1 "Step8" TON
"Step88" "T8".Q SR Time
S Q IN Q
T#1MS PT ET T#0ms
%I2.4
"S3"
R1

%M0.1
"Step1"
Totally Integrated
Automation Portal

Program blocks
Module_Can_2 [FC2]
Module_Can_2 Properties
General
Name Module_Can_2 Number 2 Type FC Language LAD
Numbering Automatic
Information
Title Author Comment Family
Version 0.1 User-defined ID

Name Data type Default value


Input
Output
InOut
Temp
Constant
Return
Module_Can_2 Void

Network 1:

%M1.4
%M0.0 "Step110"
"Step0" SR
S Q

%M2.3 %I0.0 %I0.1


"Step117" "B1" "B2" "T7".Q

%I2.4
"S3"
R1

%M1.5
"Step111"

%M2.2
"Step116"

%M1.6
"Step112"

Network 2:

%DB4
%M1.5 "T4"
%M1.4 %I3.4 %M50.1 "Step111" TON
"Step110" "B5" "1st_detectt_B5" SR Time
S Q IN Q
T#1s PT ET T#0ms
%I2.4
"S3" %M50.1
R1 "1st_detectt_B5"
S
%M1.6
"Step112"

%M2.2 %M100.3
"Step116" "AlwaysFALSE"

Network 3:
Totally Integrated
Automation Portal

%M1.6
%M1.5 "Step112"
"Step111" "T4".Q SR
S Q

%M1.4 %M50.1
"Step110" "1st_detectt_B5"

%I2.4
"S3"
R1

%M1.7
"Step113"

%M2.2
"Step116"

Network 4:

%DB5
%M1.7 "T5"
%M1.6 %I3.5 "Step113" TON
"Step112" "B6" SR Time
S Q IN Q
T#1s PT ET T#0ms
%M2.1 %I0.1
"Step115" "B2"

%I2.4
"S3"
R1

%M2.0
"Step114"

Network 5:

%DB6
%M2.0 "T6"
%M1.7 "Step114" TON
"Step113" "T5".Q SR Time
S Q IN Q
T#1s PT ET T#0ms
%I2.4
"S3"
R1

%M2.1
"Step115"

%M2.2
"Step116"

Network 6:

%M2.1
%M2.0 "Step115"
"Step114" "T6".Q SR
S Q

%I2.4
"S3"
R1

%M2.2
"Step116"

%M1.7
"Step113"

Network 7:
Totally Integrated
Automation Portal

%M2.2
%M2.1 %I0.1 "Step116"
"Step115" "B2" SR
S Q

%M1.4 %I0.1
"Step110" "B2"
P
%M50.0
"Tag_4"
%M1.5 %M100.3
"Step111" "AlwaysFALSE"

%M1.6
"Step112"

%M2.0
"Step114"

%I2.4
"S3"
R1

%M2.3
"Step117"

Network 8:

%DB10
%M6.0 "T9"
%M2.2 %I0.0 "Step118" TON
"Step116" "B1" SR Time
S Q IN Q
T#200MS PT ET T#0ms
%I2.4
"S3"
R1

%M2.3
"Step117"

Network 9:

%DB7
%M2.3 "T7"
%M6.0 "Step117" TON
"Step118" "T9".Q SR Time
S Q IN Q
T#1MS PT ET T#0ms
%I2.4
"S3"
R1

%M1.4
"Step110"
Totally Integrated
Automation Portal

Program blocks
Module_Can_1_Out [FC3]
Module_Can_1_Out Properties
General
Name Module_Can_1_Out Number 3 Type FC Language LAD
Numbering Automatic
Information
Title Author Comment Family
Version 0.1 User-defined ID

Name Data type Default value


Input
Output
InOut
Temp
Constant
Return
Module_Can_1_Out Void

Network 1: Motor băng tải cán 1

%M0.1 %Q0.4
"Step1" "MC1"

%M0.3 %Q1.0
"Step3" "MH1"

%M0.6 %Q0.2
"Step6" "MD1"

Network 2: Motor băng tải cán 1

%M0.1 %Q0.6
"Step1" "MG1"

%M0.3 %Q1.2
"Step3" "MH3"

%M0.5
"Step5"

%M0.6
"Step6"

%M1.0
"Step8"

Network 3: Motor băng tải cán 1

%M0.2 %Q1.5
"Step2" "V1"

%M0.4
"Step4"
Totally Integrated
Automation Portal

Program blocks
Module_Can_2_Out [FC4]
Module_Can_2_Out Properties
General
Name Module_Can_2_Out Number 4 Type FC Language LAD
Numbering Automatic
Information
Title Author Comment Family
Version 0.1 User-defined ID

Name Data type Default value


Input
Output
InOut
Temp
Constant
Return
Module_Can_2_Out Void

Network 1: Motor băng tải cán 1

%M1.4 %Q0.5
"Step110" "MC2"

%M1.6 %Q1.1
"Step112" "MH2"

%M2.1 %Q0.3
"Step115" "MD2"

Network 2: Motor băng tải cán 1

%M1.4 %Q0.7
"Step110" "MG2"

%M1.6
"Step112"

%M2.1
"Step115"

%M2.3
"Step117"

%M1.5 %M100.3
"Step111" "AlwaysFALSE"

%M2.0
"Step114"

Network 3: Motor băng tải cán 1

%M1.5 %Q1.6
"Step111" "V2"

%M1.7
"Step113"
Totally Integrated
Automation Portal

Program blocks / System blocks / Program resources


T0 [DB1]
T0 Properties
General
Name T0 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


Static
PT Time T#0ms False
ET Time T#0ms False
IN Bool false False
Q Bool false False
Totally Integrated
Automation Portal

Program blocks / System blocks / Program resources


T1 [DB2]
T1 Properties
General
Name T1 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


Static
PT Time T#0ms False
ET Time T#0ms False
IN Bool false False
Q Bool false False
Totally Integrated
Automation Portal

Program blocks / System blocks / Program resources


T2 [DB3]
T2 Properties
General
Name T2 Number 3 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


Static
PT Time T#0ms False
ET Time T#0ms False
IN Bool false False
Q Bool false False
Totally Integrated
Automation Portal

Program blocks / System blocks / Program resources


T4 [DB4]
T4 Properties
General
Name T4 Number 4 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


Static
PT Time T#0ms False
ET Time T#0ms False
IN Bool false False
Q Bool false False
Totally Integrated
Automation Portal

Program blocks / System blocks / Program resources


T5 [DB5]
T5 Properties
General
Name T5 Number 5 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


Static
PT Time T#0ms False
ET Time T#0ms False
IN Bool false False
Q Bool false False
Totally Integrated
Automation Portal

Program blocks / System blocks / Program resources


T6 [DB6]
T6 Properties
General
Name T6 Number 6 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


Static
PT Time T#0ms False
ET Time T#0ms False
IN Bool false False
Q Bool false False
Totally Integrated
Automation Portal

Program blocks / System blocks / Program resources


T7 [DB7]
T7 Properties
General
Name T7 Number 7 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


Static
PT Time T#0ms False
ET Time T#0ms False
IN Bool false False
Q Bool false False
Totally Integrated
Automation Portal

Program blocks / System blocks / Program resources


T3 [DB8]
T3 Properties
General
Name T3 Number 8 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


Static
PT Time T#0ms False
ET Time T#0ms False
IN Bool false False
Q Bool false False
Totally Integrated
Automation Portal

Program blocks / System blocks / Program resources


T8 [DB9]
T8 Properties
General
Name T8 Number 9 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


Static
PT Time T#0ms False
ET Time T#0ms False
IN Bool false False
Q Bool false False
Totally Integrated
Automation Portal

Program blocks / System blocks / Program resources


T9 [DB10]
T9 Properties
General
Name T9 Number 10 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


Static
PT Time T#0ms False
ET Time T#0ms False
IN Bool false False
Q Bool false False

You might also like