DB100 = integervalue ? Step 7 question

userxyz

Member
Join Date
May 2002
Location
any
Posts
2,768
Hi,

I am doing something like this in my stl code:

L #DB_DATA


DB_DATA is an in of an FC and is Data Type Block_DB

If u entered 100, then DB_DATA is DB100

But now I want to have the DB number in an integer value...

I want:

L #DB_DATA

L MW5


If u entered 100 in DB_DATA, then I want to see 100 as integer value in MW5...

can this be done ?
 
ddd

L D[AR2 said:
Do you mean something like this ?

Code:
	 OPN #DB_DATA
	 L	 DBNO
	 T	 MW	 5

sddssqsq.JPG
 
L D[AR2 said:
Do you mean something like this ?

Code:
	 OPN #DB_DATA
	 L	 DBNO
	 T	 MW	 5

Do as above, ensure DBnr is an integer, then before the block call


L DBNO
T DBnr

Well, you guys are right, DBNO is the way to go, sorry for my misunderstanding.

It works,

Thanks guys
 

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
169
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
243
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
339
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
544
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
658
Back
Top Bottom