martin3885
Member
Hi,
I have a problem with addresses of a DB.
I have two DBs. In one(DB 10) I keep the address of the element from the second one(DB1000). What I want to do is to set a pointer on the element in DB1000 and than to do something with this element. In this case it is setting a bit. Something goes wrong and I cannot set this bit. I base on the S7Guy's program. As an attachement I attach my project.
Setting a bit is done with instructions:
L P##Zeiger
LAR2
S [AR2,P#0.0]
Zeiger keeps the address of the element from DB1000. At least it schould.(How can I know which address is stored in Zeiger? I mean the address of which DB, if I look into AR2 I can see only ie. 4.0, but byte 4 can be in every DB, so how can I be sure in which DB it is?)
What is the difference if I open a DB with instruction
auf DB
or I point at this DB with pointer and then I do sth with elements in ths DB? Is it possible at all to do sth with DB without opening it by using an instruction AUF DB?
I have a problem with addresses of a DB.
I have two DBs. In one(DB 10) I keep the address of the element from the second one(DB1000). What I want to do is to set a pointer on the element in DB1000 and than to do something with this element. In this case it is setting a bit. Something goes wrong and I cannot set this bit. I base on the S7Guy's program. As an attachement I attach my project.
Setting a bit is done with instructions:
L P##Zeiger
LAR2
S [AR2,P#0.0]
Zeiger keeps the address of the element from DB1000. At least it schould.(How can I know which address is stored in Zeiger? I mean the address of which DB, if I look into AR2 I can see only ie. 4.0, but byte 4 can be in every DB, so how can I be sure in which DB it is?)
What is the difference if I open a DB with instruction
auf DB
or I point at this DB with pointer and then I do sth with elements in ths DB? Is it possible at all to do sth with DB without opening it by using an instruction AUF DB?
Last edited: