View Full Version : S7 and symbolic or absolute adressing.

March 18th, 2004, 08:05 AM
Greetings S7 fetishists :)

Here is a little problem that is annoying me all the time.

When I write code within an FB, the adressing follows the symbolic names of the associated instance DB.
When I write code outside an FB, the code follows the absolute adresses of the DB.
If I change the declarations of the STAT variables so that existing variables changes position, then the code inside the FB is OK because it uses the symbolic adresses, but the code outside the FB gets screwed up becuse it still refers to the absolute DB adresses.
Its a nice source for programming errors.

To counter this I currently use spare placeholders in the DB declaration, or I append new declarations to the end of the DB.

Is there a neater or smarter way around this ?
Am I missing a point completely ?

March 18th, 2004, 08:09 AM
Jesper, what a coincidence... :)

I am just getting ready to post a sample project in another thread that addresses your problem exactly (I think). Basically, you need to change the priority to "Symbolic". Take a look and let me know if that is what you mean.

March 18th, 2004, 08:21 AM

Its under the project tree ... blocks ... properties ... "blocks" tab ... Adress Priority.

It just one of the many things that you are supposed to know.
I find more and more with S7, that all the functionality is in there somewhere, the tricky part is to find it.

I am going to check it out immediately.
Edit: Have checked it now, and works exactly as I want it to.