s7-300 program example...

tulip

Member
Join Date
Oct 2005
Location
ist
Posts
236
How can I find a program example .it will be supply that a FB have got three inputs.One of them MW2 (Data block name) the other mw4 ( data block length) and last input is enable.
dw0:pointer of m0.0
dw2:time1
dw4:pointer of m0.1
dw6:time2
dw8:pointer of m0.2
dw10:time3
dw12:pointer of m0.3
..etc
dw40:pointer of m1.2
Let say mw2=10,mw4=40 ,when program is run by enable input ,plc must ( including pointer of m1.2 )firstly m1.2 set in dw40 after one cycle (including pointer of m1.1) m1.1 set in dw36.program is finished at DW0.that is m0.0 is set.thanks..
 
Post a screen shot showing the contents of DB10 and MW0 before and after the required processing.
 
s7 program example

When I press stop button program will begin (according to beginning address mw4 )DW516 ---->will be set M105.3 one second later (including address DW524),DW504 ---->will be set M105.2 one second later (including address DW512),,,,,,,,,,,at the end of loop DW0 ---->will be set M100.0 one second later (including address DW8),,,,is it clear?so all of related bits are set.
 
s7 program example

FC3:
segment1:
L P#M 100.0 // Last Q
T DB10.DBD 0
L P#M 100.1
T DB10.DBD 12
L P#M 100.2
T DB10.DBD 24
L P#M 100.7
T DB10.DBD 84
L P#M 101.0
T DB10.DBD 96
....
....
L P#M 104.7
T DB10.DBD 468
L P#M 105.0
T DB10.DBD 480
L P#M 105.1
T DB10.DBD 492
L P#M 105.2
T DB10.DBD 504
L P#M 105.3 // first Q
T DB10.DBD 516
segment2:
L 10
T MW 2 //Name of DB
L 44
T MW 4 // Length of DB
segment3:
A M 0.0
= L 0.0
BLD 103
A M 0.1
= L 0.1
BLD 103
CALL FB 4 , DB105
iRecipeDB:=MW2
bStopSeq :=L0.0
bEStopSeq:=L0.1
index :=MW4
NOP 0
 
s7-300 program example

DB10:
DW0:conveyor1_pQAddress DWORD DW#16#83000000
DW4:conveyor1_startRuntime TIME T#2S
DW8:conveyor1_stopRuntime TIME T#1S
DW12:conveyor2_pQAddress DWORD DW#16#83000000
DW16:conveyor2startRuntime TIME T#2S
DW20:conveyor2stopRuntime TIME T#1S
....
....
DW504:conveyor43_pQAddress DWORD DW#16#83000000
DW508.conveyor43startRuntime TIME T#2S
DW512:conveyor43stopRuntime TIME T#1S
DW516:conveyor44_pQAddress DWORD DW#16#83000000
DW520:conveyor44startRuntime TIME T#2S
DW524.conveyor44stopRuntime TIME T#1S
 

Similar Topics

OPN DB 36 L #IN0 // Constant number of drive L 12 *I + 8 SLD 3 LAR1 L...
Replies
3
Views
3,316
Let say We have got two alarm messages.How can I understand which alarm message comes first?Thanks in advance....
Replies
1
Views
2,152
Hello All I hope you are well and safe. I have a problem that I could use your appreciated input for: SW: SIMATIC MANAGER v5.5 SP3 HW1...
Replies
2
Views
1,223
Hey guys! I have a S7-300 plc and I wish to upload its program to my PG and create a backup. I have a siemens simatic pc and have set up the...
Replies
3
Views
1,880
I need to utilize the program of Panelview 300 standard into Panelview 7 plus. Can anyone plzz help in this regard??
Replies
2
Views
1,400
Back
Top Bottom