You are on page 1of 7

Totally Integrated

Automation Portal

gkc STL / PLC_1 [CPU 315-2 PN/DP] / Program blocks


Main [OB1]
Main Properties
General
Name Main Number 1 Type OB Language STL
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:-Write a programme in STL such
that when a switch is made ON,
the motor gets OFF.
0001 AN "START"
0002 = "MOTOR"
0003
0004

Symbol Address Type Comment


"MOTOR" %Q0.0 Bool
"START" %I0.0 Bool

Network 2:
EXAMPLE 2:-
Write a STL programme for panel
board door control system, when
the door is open the cooling fan
gets off and a lamp gets on.
0001 A "Tag_1"
0002 NOT
0003 = "Tag_2"
0004
0005
0006
0007

Symbol Address Type Comment


"Tag_1" %I1.0 Bool
"Tag_2" %Q1.0 Bool

Network 3:
EXAMPLE 2:- 2

0001 A "Tag_1"
0002 = "Tag_3"
0003

Symbol Address Type Comment


"Tag_1" %I1.0 Bool
"Tag_3" %Q1.1 Bool

Network 4:
EXAMPLE 3:-Write a STL programme for two
motors such that both have
common stop and start switch
with individual start switch.
The condition for starting the
motor that first switch on the
common start switch, then switch
on the motors using individual
switches. To stop the motor
presses the stop switch.
0001 AN "Tag_4"
0002 A "Tag_5"
Totally Integrated
Automation Portal

0003 = %L20.0
0004 A %L20.0
0005 A "Tag_6"
0006 = "MOTOR1"
0007 A %L20.0
0008 A "Tag_8"
0009 = "MOTOR2"
0010
0011
0012
0013

Symbol Address Type Comment


"MOTOR1" %Q2.0 Bool
"MOTOR2" %Q2.1 Bool
"Tag_4" %I2.0 Bool
"Tag_5" %I2.1 Bool
"Tag_6" %I2.2 Bool
"Tag_8" %I2.3 Bool

Network 5:
EXAMPLE 4:-Write a STL programme for a
heater of the boiler such that the
air valve should be closed, the
water valve should open and the
heater switch should make on.
0001 A "Tag_10"
0002 = %L20.0
0003 A %L20.0
0004 = "WATER"
0005 A %L20.0
0006 NOT
0007 = "AIR"
0008
0009
0010
0011
0012

Symbol Address Type Comment


"AIR" %Q3.1 Bool
"Tag_10" %I3.0 Bool
"WATER" %Q3.0 Bool

Network 6:
EXAMPLE 5:-Write a STL programme for a five
directional conveyor system such
that when any of the sensor from
the conveyors senses metal ores
then the inlet valve of the blast
furnace opens.
0001 O "Tag_7"
0002 O "Tag_9"
0003 O "Tag_11"
0004 O "Tag_12"
0005 O "Tag_13"
0006 = "Tag_14"
0007
0008

Symbol Address Type Comment


"Tag_7" %I4.0 Bool
"Tag_9" %I4.1 Bool
"Tag_11" %I4.2 Bool
"Tag_12" %I4.3 Bool
"Tag_13" %I4.4 Bool
"Tag_14" %Q4.0 Bool

Network 7:
EXAMPLE 6:-
Write the equivalent STL
programme for the given ladder
logic
0001 A "Tag_15"
0002 = "Tag_16"
0003
0004

Symbol Address Type Comment


"Tag_15" %I5.0 Bool
"Tag_16" %Q5.0 Bool

Network 8:
EXAMPLE 7:-Write the equivalent STL programme
for the given ladder logic.
0001 A "Tag_17"
0002 = %L20.0
Totally Integrated
Automation Portal

0003 A %L20.0
0004 = "Tag_18"
0005 A %L20.0
0006 = "Tag_19"
0007
0008

Symbol Address Type Comment


"Tag_17" %I6.0 Bool
"Tag_18" %Q6.0 Bool
"Tag_19" %Q6.1 Bool

Network 9:
EXAMPLE 8:-
Write the STL programme of the
given ladder logic.
0001 A "Tag_20"
0002 = %L20.0
0003 A %L20.0
0004 = "Tag_21"
0005 A %L20.0
0006 A "Tag_22"
0007 = "Tag_21"
0008
0009

Symbol Address Type Comment


"Tag_20" %I7.0 Bool
"Tag_21" %Q7.1 Bool
"Tag_22" %I7.1 Bool

Network 10:
EXAMPLE 9:-
Write the STL programme of the
given ladder logic.
0001 A "Tag_23"
0002 = %L20.0
0003 A %L20.0
0004 A "Tag_24"
0005 = "Tag_25"
0006 A %L20.0
0007 A "Tag_26"
0008 = "Tag_27"
0009
0010

Symbol Address Type Comment


"Tag_23" %I8.0 Bool
"Tag_24" %I8.1 Bool
"Tag_25" %Q8.0 Bool
"Tag_26" %I8.2 Bool
"Tag_27" %Q8.1 Bool

Network 11:
EXAMPLE 10:-
Write the STL programme of the
given ladder logic.
0001 A "Tag_28"
0002 = %L20.0
0003 A %L20.0
0004 A "Tag_29"
0005 = "Tag_30"
0006 A %L20.0
0007 A "Tag_31"
0008 = "Tag_32"
0009 A %L20.0
0010 = "Tag_33"
0011 A %L20.0
0012 A "Tag_34"
0013 = "Tag_35"
0014
0015

Symbol Address Type Comment


"Tag_28" %I9.0 Bool
"Tag_29" %I9.1 Bool
"Tag_30" %Q9.0 Bool
"Tag_31" %I9.2 Bool
"Tag_32" %Q9.1 Bool
"Tag_33" %Q9.2 Bool
"Tag_34" %I9.3 Bool
"Tag_35" %Q9.3 Bool

Network 12:
TASK ON INCHING/LATCHING:-
EXAMPLE 11:-When a push button is pressed the
3Ф motor gets on and gets off
when released. (Inching Circuit).
Totally Integrated
Automation Portal

0001 A "Tag_36"
0002 = "Tag_37"
0003
0004

Symbol Address Type Comment


"Tag_36" %I10.0 Bool
"Tag_37" %Q10.0 Bool

Network 13:
EXAMPLE 12:-When a start push button is
pressed the 3Ф motor gets on and
remains in on condition after
release of push button. The motor
can be stopped by stop push
button.
0001 AN "Tag_38"
0002 A(
0003 O "Tag_39"
0004 O "Tag_40"
0005 )
0006 = "Tag_40"
0007
0008
0009
0010

Symbol Address Type Comment


"Tag_38" %I11.0 Bool
"Tag_39" %I11.1 Bool
"Tag_40" %Q11.0 Bool

Network 14:
TASK ON SPDT AND XOR/XNOR
:-EXAMPLE 13:-Write a STL programme for two
toggle switches such that when
any of the switch is made on the
out put gets on. When both the
switches are made on or off the
output gets off.
0001 A(
0002 A "Tag_41"
0003 AN "Tag_42"
0004 )
0005 O
0006 A(
0007 AN "Tag_41"
0008 A "Tag_42"
0009 )
0010 = "Tag_43"
0011

Symbol Address Type Comment


"Tag_41" %I12.0 Bool
"Tag_42" %I12.1 Bool
"Tag_43" %Q12.0 Bool

Network 15:
EXAMPLE 14:-Write a STL programme for two
toggle switches such that when
both the switches are made off/on
the output gets on. If any of the
switch is made on the output gets
off.
0001 A(
0002 A "Tag_44"
0003 A "Tag_45"
0004 )
0005 O
0006 A(
0007 AN "Tag_44"
0008 AN "Tag_45"
0009 )
0010 = "Tag_46"
0011
0012

Symbol Address Type Comment


"Tag_44" %I13.0 Bool
"Tag_45" %I13.1 Bool
"Tag_46" %Q13.0 Bool

Network 16:
TASK ON MOVE AND COMPARATOR:-
EXAMPLE 15:-Write a programme on STL such
that when input byte 0 gets a
value of 10 it switch on a motor,
when the value of byte 0 exceeds
Totally Integrated
Automation Portal

10 the indicator light gets on,


when the value of byte 0 is under
10 the green indicator remains on.
0001 L "Tag_47"
0002 T "Tag_49"
0003

Symbol Address Type Comment


"Tag_47" %IB14 Byte
"Tag_49" %MW0 Word

Network 17:
COMPARATOR:- 15
0001 L "Tag_49"
0002 L 10
0003 ==I
0004 = "Tag_50"
0005

Symbol Address Type Comment


"Tag_49" %MW0 Word
"Tag_50" %Q14.0 Bool

Network 18:
COMPARATOR:- 15
0001 L "Tag_49"
0002 L 10
0003 >I
0004 = "Tag_51"
0005
0006
0007

Symbol Address Type Comment


"Tag_49" %MW0 Word
"Tag_51" %Q14.1 Bool

Network 19:
COMPARATOR:- 15
0001 L "Tag_49"
0002 L 10
0003 <I
0004 = "Tag_52"
0005
0006
0007

Symbol Address Type Comment


"Tag_49" %MW0 Word
"Tag_52" %Q14.2 Bool

Network 20:
EXAMPLE 16:-Write a programme on STL such
that when input byte1 does not
gets the value of 64 it will make a
lamp on; the lamp should remains
on if value of byte 1 is in between
the 32 and 96.
0001 L "Tag_53"
0002 T "Tag_54"
0003
0004

Symbol Address Type Comment


"Tag_53" %IB15 Byte
"Tag_54" %MW2 Word

Network 21:
COMPARATOR:- 16
0001 L "Tag_54"
0002 L 32
0003 >I
0004 L "Tag_54"
0005 L 64
0006 <>I
0007 L "Tag_54"
0008 L 96
0009 <I
0010 = "Tag_55"
0011
0012

Symbol Address Type Comment


"Tag_54" %MW2 Word
"Tag_55" %Q15.0 Bool
Totally Integrated
Automation Portal

Network 22:
TASK ON TIMER:-
EXAMPLE 17:-Develop the STL programme such
that an output light will turn on, 15
seconds after switch A has been
turned on.
0001 A "Tag_59"
0002 L S5T#15S
0003 SD "Tag_57"
0004 A "Tag_57"
0005 = "Tag_58"
0006

Symbol Address Type Comment


"Tag_57" %T1 Timer
"Tag_58" %Q16.0 Bool
"Tag_59" %I16.0 Bool

Network 23:
EXAMPLE 18:-Write a programme on STL such
that when we press the start push
button the star contactor starts
immediately and the delta
contactor starts after 15 second.
When delta contactor gets on the
star contactor gets off. To stop
the process press stop push
button.
0001 AN "Tag_60"
0002 A "Tag_61"
0003 = %L20.0
0004 A %L20.0
0005 AN "Tag_62"
0006 = "Tag_63"
0007 A %L20.0
0008 L S5T#15S
0009 SD "Tag_62"
0010 A "Tag_62"
0011 = "Tag_64"
0012
0013

Symbol Address Type Comment


"Tag_60" %I17.0 Bool
"Tag_61" %I17.1 Bool
"Tag_62" %T2 Timer
"Tag_63" %Q17.0 Bool
"Tag_64" %Q17.1 Bool

Network 24:
TASK ON COUNTER:-
EXAMPLE 19:-Develop the STL programme for a
light that will turn on , after switch
A has been closed 10 times. Push
button B will stop the light.
0001 A "Tag_66"
0002 CU "Tag_67"
0003 A "Tag_68"
0004 R "Tag_67"
0005 L "Tag_67"
0006 T "Tag_71"
0007 A "Tag_67"
0008
0009

Symbol Address Type Comment


"Tag_66" %I18.1 Bool
"Tag_67" %C1 Counter
"Tag_68" %I18.2 Bool
"Tag_71" %MW100 Word

Network 25:
EXAMPLE 19
0001 L "Tag_71"
0002 L 10
0003 ==I
0004 = "Tag_70"
0005
0006

Symbol Address Type Comment


"Tag_70" %Q18.0 Bool
"Tag_71" %MW100 Word

Network 26:
EXAMPLE 20:-Develop the STL programme such
Totally Integrated
Automation Portal

that when a push button (I0.0) is


first time pressed and released it
makes an out put (Q0.0) ON. For
the second time when the same
push button (I0.0) is pressed and
released it makes the same out put
(Q0.0) OFF.
0001 A "Tag_72"
0002 CU "Tag_73"
0003 A "Tag_74"
0004 R "Tag_73"
0005 L "Tag_73"
0006 T "Tag_75"
0007 A "Tag_73"
0008
0009

Symbol Address Type Comment


"Tag_72" %I19.0 Bool
"Tag_73" %C2 Counter
"Tag_74" %I19.1 Bool
"Tag_75" %MW110 Word

Network 27:
EXAMPLE 20
0001 L "Tag_75"
0002 L 1
0003 ==I
0004 AN "Tag_76"
0005 = "Tag_77"
0006
0007

Symbol Address Type Comment


"Tag_75" %MW110 Word
"Tag_76" %Q19.1 Bool
"Tag_77" %Q19.0 Bool

Network 28:

0001 L "Tag_75"
0002 L 2
0003 ==I
0004 = "Tag_76"
0005
0006
0007

Symbol Address Type Comment


"Tag_75" %MW110 Word
"Tag_76" %Q19.1 Bool

You might also like