Step 7 "OPN"

cottagewood

Member
Join Date
Oct 2005
Location
Kent
Posts
179
Hi

I'm trying to decypher some step7 code which all seems pretty straight forward except that there are several instances of OPN DB100 but no transfer of move commands associated with it, for example
Network 1
OPN DB 100
AN "23K1 Kneader Estop"
S M 51.5
= M 16.1
A M 100.1
R M 51.5
R M 24.1

and further on

Network 12
OPN DB 100
A M 104.1
AN DBX 207.0
S DBX 207.0
A DBX 207.0
AN M 102.5
S M 104.0
O M 166.3
ON DB10.DBX 13.5
OPN DB 100
S M 67.1
A M 67.1
= M 18.2
ON "KneaderGuard Common alrm"
ON "KneaderGuard Sensor1"
ON "KneaderGuard Sensor2"
ON "25K6 Crammer saftey OK"
ON "26K6 Crammer 2 saftey OK"
ON "261K6 Crammer 3saftey OK"
S M 67.2
A M 67.2
= M 18.3
A "KneaderGuard Common alrm"
A "KneaderGuard Sensor1"
A "KneaderGuard Sensor2"
A "25K6 Crammer saftey OK"
A(
ON M 113.5
O "261K6 Crammer 3saftey OK"
)
A(
ON M 106.6
O "26K6 Crammer 2 saftey OK"
)
R M 67.2
R M 18.3
R M 26.3
A M 100.1
R M 67.1
O M 166.2
O M 26.2
= M 67.0
O M 67.2
ON "23K7 Control On"
ON "23K1 Kneader Estop"
O M 67.1
O T 11
O T 121
O M 69.1
O M 71.1
O
AN M 166.4
AN M 50.0
O
A M 67.2
AN DBX 219.0
R DBX 207.0
AN DBX 207.0
R M 104.0
A M 104.0
= "28K9 Enable Keader"

Can anyone tell me what the relevance of DB100 is

Thanks
 
as an example......


Network 12

OPN DB 100
A M 104.1
AN DB100.DBX 207.0
S DB100.DBX 207.0
A DB100.DBX 207.0
AN M 102.5
 
OPN opens a DB, any reference to DBX, DBB, DBW, DBD without specifying any other DB, will be made towards the currently open DB.

You should take care though.
Adding a simple A DB101.DBX12.4 for instance will open DB101 until another DB is specified, this will result in unexpected behavior as the next DBX, DBB, DBW, DBD references will point to DB101 and NOT DB100.

It smells of S5 code. :D
You should try to fix it.
Doing it like that also makes it impossible to use symbolic naming.
 

Similar Topics

I am having a step7 v5.4 program where the blocks are encrypted and locked. And the manufacturer is stopped the support. Is there any ways to...
Replies
2
Views
181
Good Morning, Hoping someone with some Siemens experience can give me a hand with this one. Customer has a S7-200 cpu, which has a 6GK7...
Replies
0
Views
251
HI! HOW COULD I OBTAIN THE NAMES OF THE STEPS OF A ROUTINE IN SFC LANGUAGE IN STUDIO5000? Or is there a system variable that gives me those...
Replies
0
Views
343
I'm just trying to figure out the right method of adding a DO card to an existing rack. It's not the *next* open slot, but I have to move the AO...
Replies
5
Views
556
Hi Siemens Experts, I am hoping someone can shed some light on my issue. I have uploaded the code from a S7-300 (317-2PN/DP) using Step 7...
Replies
9
Views
688
Back
Top Bottom