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 ?
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 ?