You are on page 1of 2

Totally Integrated

Automation Portal

giaothong / PLC_1 [CPU 313C] / Program blocks


Main [OB1]
Main Properties
General
Name Main Number 1 Type OB Language LAD
Numbering Manual
Information
Title "Main Program Sweep (Cy‐ Author Comment Family
cle)"
Version 0.1 User-defined ID

Main
Name Data type Offset Default value Comment
Temp
OB1_EV_CLASS Byte 0.0 Bits 0-3 = 1 (Coming event), Bits 4-7 = 1 (Event class 1)
OB1_SCAN_1 Byte 1.0 1 (Cold restart scan 1 of OB 1), 3 (Scan 2-n of OB 1)
OB1_PRIORITY Byte 2.0 Priority of OB Execution
OB1_OB_NUMBR Byte 3.0 1 (Organization block 1, OB1)
OB1_RESERVED_1 Byte 4.0 Reserved for system
OB1_RESERVED_2 Byte 5.0 Reserved for system
OB1_PREV_CYCLE Int 6.0 Cycle time of previous OB1 scan (milliseconds)
OB1_MIN_CYCLE Int 8.0 Minimum cycle time of OB1 (milliseconds)
OB1_MAX_CYCLE Int 10.0 Maximum cycle time of OB1 (milliseconds)
OB1_DATE_TIME Date_And_Time 12.0 Date and time OB1 started
Constant

Network 1:

%I124.1 %I124.2 %M1.1


"Tag_1" "Tag_2" "Tag_3"

%M1.1
"Tag_3"

Network 2:

CONV
MOVE Bcd16 to Int
EN ENO EN ENO
%LB15 IN %MW10 %MW10 %MW12
OUT1 "Tag_4" "Tag_4" IN OUT "Tag_5"

Network 3:

CONV
MOVE Bcd16 to Int
EN ENO EN ENO
%LB16 IN %MW14 %MW14 %MW16
OUT1 "Tag_6" "Tag_6" IN OUT "Tag_7"

Network 4:

%C1
%M1.1 %Q124.3 "Tag_8"
"Tag_3" "Tag_14" S_CU
CU Q
... S %MW40
... PV CV "Tag_20"
%I124.2 CV_BCD ...
"Tag_2" R

Network 5:

%MW40 %T1 %I124.5


"Tag_20" "Tag_10" "Tag_21"
==
NOT
Int
3
Totally Integrated
Automation Portal

Network 6:

%T1
%I124.5 %MW12 %MW16 %MW16 %T1 "Tag_10"
"Tag_21" "Tag_5" "Tag_7" "Tag_7" "Tag_10" S_ODT
== >= <=
S Q
Int Int Int
10 45 48 s5t#25s TV %MW20
... R BI "Tag_11"
BCD ...

%MW20 %Q124.1
"Tag_11" "Tag_12"
>
Int
150

%MW20 %MW20 %Q124.2


"Tag_11" "Tag_11" "Tag_13"
> <
Int Int
100 150

%MW20
%Q124.3
"Tag_11" "Tag_14"
<
Int
100

Network 7:

%T2
%MW40 %T2 "Tag_15"
"Tag_20" "Tag_15" S_ODT
==
S Q
Int
3 s5t#2s TV %MW30
... R BI "Tag_16"
BCD ...

%MW30 %Q124.4
"Tag_16" "Tag_17"
>
Int
100

%MW30 %Q124.5
"Tag_16" "Tag_22"
>
Int
100

%MW30
%Q124.6
"Tag_16" "Tag_23"
>
Int
100

You might also like