0% found this document useful (0 votes)
60 views6 pages

Code PLC

This document contains the code for a main program that controls four pumps. The program uses networks of logic to start and stop each pump based on inputs and timers, and to handle errors by setting flags in the data block.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views6 pages

Code PLC

This document contains the code for a main program that controls four pumps. The program uses networks of logic to start and stop each pump based on inputs and timers, and to handle errors by setting flags in the data block.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Totally Integrated

Automation Portal

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:

WWW
EN ENO
%DB333%MW10
"DB 333"CTRL_DBRET_VAL"Tag_1"

Network 2:
Totally Integrated
Automation Portal

%DB5.DBX0.1
%M20.0 %M20.1 %Q0.5 "data".STOP_ PUMP_1 %Q0.0
"Tag_18" "Tag_19" "Q_error_1" "Tag_3"

%DB5.DBX0.0 %DB1
"data".START_ PUMP_1 "IEC_Counter_ 0_DB"
CTU
Int
%M0.3
"Clock_2Hz"

%Q0.0 CU Q
"Tag_3" "IEC_Counter_ %MW12
0_DB".QU R CV "Tag_5"
100 PV

Network 3:

%DB5.DBX0.3
%M20.2 %M20.3 %Q0.6 "data".STOP_ PUMP_2 %Q0.1
"Tag_20" "Tag_21" "Q_error_2" "Tag_6"

%DB5.DBX0.2 %DB2
"data".START_ PUMP_2 "IEC_Counter_ 0_DB_1"
CTU
Int
%M0.3
"Clock_2Hz"

%Q0.1 CU Q
"Tag_6" "IEC_Counter_ 0_DB_1".QU %MW14
100 R CV "Tag_9"
PV

Network 4:
Totally Integrated
Automation Portal

%DB5.DBX0.5
%M20.4 %M20.5 %Q0.7 "data".STOP_ PUMP_3 %Q0.3
"Tag_22" "Tag_23" "Q_error_3" "Tag_12"

%DB5.DBX0.4 %DB3
"data".START_ PUMP_3 "IEC_Counter_ 0_DB_2"
CTU
Int
%M0.3
"Clock_2Hz"

%Q0.3 CU Q
"Tag_12" "IEC_Counter_ 0_DB_2".QU %MW16
100 R CV "Tag_13"
PV

Network 5:

%DB5.DBX0.7
%M20.6 %M20.7 %Q1.0 "data".STOP_ PUMP_4 %Q0.4
"Tag_24" "Tag_25" "Q_error_4" "Tag_16"

%DB5.DBX0.6 %DB4
"data".START_ PUMP_4 "IEC_Counter_ 0_DB_3"
CTU
Int
%M0.3
"Clock_2Hz"

%Q0.4 CU Q
"Tag_16" "IEC_Counter_ 0_DB_3".QU %MW18
100 R CV "Tag_17"
PV

Network 6:
Totally Integrated
Automation Portal

%DB5.DBX1.0
"data".Error_ pump_1 %DB5.DBX1.4 %Q0.5
"data".Fix_error "Q_error_1"

%Q0.5
"Q_error_1"

Network 7:

%DB5.DBX1.1
"data".Error_ pump_2 %DB5.DBX1.4 %Q0.6
"data".Fix_error "Q_error_2"

%Q0.6
"Q_error_2"

Network 8:

%DB5.DBX1.2
"data".Error_ pump_3 %DB5.DBX1.4 %Q0.7
"data".Fix_error "Q_error_3"

%Q0.7
"Q_error_3"

Network 9:
Totally Integrated
Automation Portal

%DB5.DBX1.3
"data".Error_ pump_4 %DB5.DBX1.4 %Q1.0
"data".Fix_error "Q_error_4"

%Q1.0
"Q_error_4"

You might also like