You are on page 1of 7

Totally Integrated

Automation Portal

aniket1 / PLC_1 [CPU 315-2 PN/DP] / 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

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:
Example 1: Develop a LAD programme such
that the lamp L1 should glow when the switch
S1 is made ON and the lamp gets OFF when
switch S1 is made OFF

%Q0.1
%I0.1 "departmental
"Tag_1" light"

Symbol Address Type Comment


"departmental light" %Q0.1 Bool
"Tag_1" %I0.1 Bool

Network 2:
Example 2: Develop a LAD programme such
that the Lamp L2 should not glow when switch
S2 is made ON Lamp should glow when switch
S2 is made OFF.

%I0.2 %Q0.2
"Tag_4" "green"

Symbol Address Type Comment


"green" %Q0.2 Bool
"Tag_4" %I0.2 Bool

Network 3:
Example 3: The lamp L3 should glow when both
the switch S1 & S2 are ON.

%I0.3 %I0.4 %Q0.3


"Tag_5" "Tag_6" "Tag_7"

Symbol Address Type Comment


"Tag_5" %I0.3 Bool
"Tag_6" %I0.4 Bool
"Tag_7" %Q0.3 Bool

Network 4:
Example 4: The lamp L4 should glow when any
one of the switch S1 or S2 is ON.

%I0.5 %Q0.4
"Tag_8" "Tag_10"

%I0.6
"Tag_9"
Totally Integrated
Automation Portal

Symbol Address Type Comment


"Tag_8" %I0.5 Bool
"Tag_9" %I0.6 Bool
"Tag_10" %Q0.4 Bool

Network 5:
Example 5: Develop Ladder Logic for a car
door/seat belt safety system. When the car
door is open, or the seat belt is not done up,
the ignition power must not be applied. If all is
safe then the key will start the engine.

%I1.1 %Q1.1
"Tag_11" "Tag_14"

%I1.2
"Tag_12"

%I1.3
"Tag_13"

Symbol Address Type Comment


"Tag_11" %I1.1 Bool
"Tag_12" %I1.2 Bool
"Tag_13" %I1.3 Bool
"Tag_14" %Q1.1 Bool

Network 6:
Example 6: The lamp should glow when either
the switch (S1 & S2) or S3 is ON.

%I1.4 %I1.5 %Q1.2


"Tag_15" "Tag_16" "Tag_18"

%I1.6
"Tag_17"

Symbol Address Type Comment


"Tag_15" %I1.4 Bool
"Tag_16" %I1.5 Bool
"Tag_17" %I1.6 Bool
"Tag_18" %Q1.2 Bool

Network 7:
Example 7: The lamp should glow when the
switch (S1 & S2) or (S3 & S4) is pressed.
Example 8: The lamp should glow when the
switch (S1 or S2) & (S3 or S4) is pressed

%I2.0 %I2.1 %Q2.1


"Tag_19" "Tag_20" "Tag_23"

%I2.2 %I2.3
"Tag_21" "Tag_22"

Symbol Address Type Comment


"Tag_19" %I2.0 Bool
"Tag_20" %I2.1 Bool
"Tag_21" %I2.2 Bool
"Tag_22" %I2.3 Bool
"Tag_23" %Q2.1 Bool

Network 8:
8

%I2.4 %I2.6 %Q2.2


"Tag_24" "Tag_26" "Tag_28"

%I2.5 %I2.7
"Tag_25" "Tag_27"

Symbol Address Type Comment


"Tag_24" %I2.4 Bool
"Tag_25" %I2.5 Bool
"Tag_26" %I2.6 Bool
"Tag_27" %I2.7 Bool
"Tag_28" %Q2.2 Bool
Totally Integrated
Automation Portal

Network 9:
Example 9: Develop ladder logic for a car door
and inside light system. If any of the car door,
out of four doors is opened or a switch S1
inside the car is made ON a lamp L1 inside the
car gets ON .When all the four doors are closed
and switch S1 is kept open the lamp inside the
car gets OFF. If all the 4 doors are opened and
switch S1 is made ON the lamp inside the car
can be made OFF by pressing another switch
S2. If all the car doors are closed, then the
inside lamp can be made ON by switch S1 and
can be made OFF by switch S2

%I3.0 %I3.5 %I3.6 %Q3.1


"Tag_29" "Tag_34" "Tag_35" "Tag_36"

%I3.1
"Tag_30"

%I3.2
"Tag_31"

%I3.3
"Tag_32"

%I3.4
"Tag_33"

Symbol Address Type Comment


"Tag_29" %I3.0 Bool
"Tag_30" %I3.1 Bool
"Tag_31" %I3.2 Bool
"Tag_32" %I3.3 Bool
"Tag_33" %I3.4 Bool
"Tag_34" %I3.5 Bool
"Tag_35" %I3.6 Bool
"Tag_36" %Q3.1 Bool

Network 10:
Example 10: The lamp should glow when the
switch (S1 or S2 or S3) & (S4 or S5) & S6 are
pressed.

%I4.0 %I4.3 %I4.5 %Q4.1


"Tag_37" "Tag_40" "Tag_42" "lamp"

%I4.1 %I4.4
"Tag_38" "Tag_41"

%I4.2
"Tag_39"

Symbol Address Type Comment


"lamp" %Q4.1 Bool
"Tag_37" %I4.0 Bool
"Tag_38" %I4.1 Bool
"Tag_39" %I4.2 Bool
"Tag_40" %I4.3 Bool
"Tag_41" %I4.4 Bool
"Tag_42" %I4.5 Bool

Network 11:
Example 11: The lamp should glow when the
switch (S1 & S2 & S3) or (S4 & S5) or S6 is
pressed.

%I5.0 %I5.1 %I5.2 %Q5.1


"Tag_43" "Tag_44" "Tag_45" "Tag_49"

%I5.3 %I5.4
"Tag_46" "Tag_47"

%I5.5
"Tag_48"

Symbol Address Type Comment


"Tag_43" %I5.0 Bool
"Tag_44" %I5.1 Bool
"Tag_45" %I5.2 Bool
Totally Integrated
Automation Portal

Symbol Address Type Comment


"Tag_46" %I5.3 Bool
"Tag_47" %I5.4 Bool
"Tag_48" %I5.5 Bool
"Tag_49" %Q5.1 Bool

Network 12:
Example 12: The lamp should glow when the
switch S1 & (S2 or S3) & (S4 or S5) are made
ON.

%I6.0 %I6.1 %I6.3 %Q6.1


"Tag_50" "Tag_51" "Tag_53" "Tag_55"

%I6.2 %I6.4
"Tag_52" "Tag_54"

Symbol Address Type Comment


"Tag_50" %I6.0 Bool
"Tag_51" %I6.1 Bool
"Tag_52" %I6.2 Bool
"Tag_53" %I6.3 Bool
"Tag_54" %I6.4 Bool
"Tag_55" %Q6.1 Bool

Network 13:
Example 13: A fan is to run when all the
following conditions are met:
a) Switch S1is kept OFF.
b) Switch S2 or S3 is made ON.
c) Switch S4 & S5 are made ON
d) Switch S6 or S7 or S8 is made ON

%I7.0 %I7.1 %I7.3 %I7.4 %I7.5 %Q7.2


"Tag_56" "Tag_57" "Tag_59" "Tag_60" "Tag_61" "Tag_64"

%I7.2 %I7.6
"Tag_58" "Tag_62"

%I7.7
"Tag_63"

Symbol Address Type Comment


"Tag_56" %I7.0 Bool
"Tag_57" %I7.1 Bool
"Tag_58" %I7.2 Bool
"Tag_59" %I7.3 Bool
"Tag_60" %I7.4 Bool
"Tag_61" %I7.5 Bool
"Tag_62" %I7.6 Bool
"Tag_63" %I7.7 Bool
"Tag_64" %Q7.2 Bool

Network 14:
Example 14: There are three fans in a room
are controlled individually by toggle switches
there is a panel board outside the room. Draw
logic in LAD such that when the following
condition satisfied the indicator light should
glow in panel board.
a) If all the three fans are running the RED lamp L1 glows in
panel board at that time L2 and L3 should off.
b) If any two fans are running the YELLOW lamp L2 glows
at that time L1 and L3 should off.
c) If any one fan is running the GREEN lamp L3 glows at
that time L1 and L2 should off.
Totally Integrated
Automation Portal

%I0.0 %I0.1 %I0.2 %I0.3 %Q0.0


"Tag_75" "Tag_1" "Tag_4" "Tag_5" "red(1)"

%Q0.1
%I0.1 %I0.2 %Q0.2 %Q0.0 "departmental
"Tag_1" "Tag_4" "green" "red(1)" light"

%I0.2 %I0.3
"Tag_4" "Tag_5"

%I0.3 %I0.1
"Tag_5" "Tag_1"

%Q0.1
%I0.1 %Q0.0 "departmental %Q0.2
"Tag_1" "red(1)" light" "green"

%I0.2
"Tag_4"

%I0.3
"Tag_5"

Symbol Address Type Comment


"departmental light" %Q0.1 Bool
"green" %Q0.2 Bool
"red(1)" %Q0.0 Bool
"Tag_1" %I0.1 Bool
"Tag_4" %I0.2 Bool
"Tag_5" %I0.3 Bool
"Tag_75" %I0.0 Bool

Network 15:
Example 15: In a factory there is a switch at
the entry gate when it is pressed a main
contractor is on when the main contractor is
on it makes five light off which was running
last night in a corridor loaded on a separate
contactor when the corridor lights are off main
office building light and other office rooms ten
numbers of lights gets on which is loaded on
another contactor.
Totally Integrated
Automation Portal

%I10.0 %I10.1 %Q10.0


"Tag_2" "Tag_3" "main con"

%Q10.0 %Q10.1
"main con" "sec con"

%Q10.1
"sec con"

%Q10.1
"sec con"

%Q10.1
"sec con"

%Q10.1
"sec con"

%Q10.1 %Q10.2
"sec con" "thrd con"

%Q10.2
"thrd con"

%Q10.2
"thrd con"

%Q10.2
"thrd con"

%Q10.2
"thrd con"

%Q10.2
"thrd con"

%Q10.2
"thrd con"

%Q10.2
"thrd con"

%Q10.2
"thrd con"

Symbol Address Type Comment


"main con" %Q10.0 Bool
"sec con" %Q10.1 Bool
"Tag_2" %I10.0 Bool
"Tag_3" %I10.1 Bool
"thrd con" %Q10.2 Bool

Network 16:
Example 16: When the switch is made ON it
makes a lamp L1 OFF which is previously ON.
When L1 gets OFF another lamp L2 gets ON
which is previously OFF.

%I0.2 %I0.0 %Q0.0


"Tag_4" "Tag_75" "red(1)"

%Q0.1
%Q0.0 "departmental
"red(1)" light"

Symbol Address Type Comment


"departmental light" %Q0.1 Bool
"red(1)" %Q0.0 Bool
"Tag_4" %I0.2 Bool
"Tag_75" %I0.0 Bool

Network 17:
Example 17: Lamp L2 is glowing previously.
Another lamp L1 should glow when any of the
switches S1, S2, S3, S4, and S5 is pressed.
Lamp L2 gets OFF when the lamp L1 glows.
Totally Integrated
Automation Portal

%I1.0 %I1.1 %Q1.1


"Tag_74" "Tag_11" "Tag_14"

%I1.2
"Tag_12"

%I1.3
"Tag_13"

%I1.4
"Tag_15"

%I1.5
"Tag_16"

%Q1.1 %Q1.2
"Tag_14" "Tag_18"

Symbol Address Type Comment


"Tag_11" %I1.1 Bool
"Tag_12" %I1.2 Bool
"Tag_13" %I1.3 Bool
"Tag_14" %Q1.1 Bool
"Tag_15" %I1.4 Bool
"Tag_16" %I1.5 Bool
"Tag_18" %Q1.2 Bool
"Tag_74" %I1.0 Bool

Network 18:
Example 18: There are four hazard inputs to the
alarm system which get ON when the following
logics occurs:
a) If one input is ON, nothing happens to alarm.
b) If any two inputs are ON, a pilot light glows.
c) If any three inputs are ON, the pilot light goes OFF & an
alarm siren blows.
d) If all the four inputs are ON the fire department light
glows with this the alarm siren goes ON as well as the pilot
light also glows.

%Q0.1
%I0.0 %I0.1 %I0.2 %I0.3 %I0.4 "departmental
"Tag_75" "Tag_1" "Tag_4" "Tag_5" "Tag_6" light"

%I0.1 %I0.2 %I0.3


"Tag_1" "Tag_4" "Tag_5" <??.?>

%I0.1 %I0.2 %I0.4


"Tag_1" "Tag_4" "Tag_6"

%I0.2 %I0.3 %I0.4


"Tag_4" "Tag_5" "Tag_6"

<??.?> <??.?> <??.?> <??.?>

<??.?> <??.?>

<??.?> <??.?>

<??.?> <??.?>

<??.?> <??.?>

<??.?> <??.?>

Symbol Address Type Comment


"departmental light" %Q0.1 Bool
"Tag_1" %I0.1 Bool
"Tag_4" %I0.2 Bool
"Tag_5" %I0.3 Bool
"Tag_6" %I0.4 Bool
"Tag_75" %I0.0 Bool

You might also like