indirect addressing and pointing a DB with pointer

martin3885

Member
Join Date
Aug 2005
Location
Saarland
Posts
144
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?
 
Last edited:

Similar Topics

Howdy folks, I am an Allen Bradley guy currently living in an Emerson world. Working with Rx3i on PacSystems Machine Edition v. 9.6? i think...
Replies
3
Views
611
Hello, I'm very new to programming with absolutely zero schooling in this field and pretty hands off training in my new role, it's been fun...
Replies
4
Views
663
Hello Friends, I am trying to index M Bits, however GX Works2 is not allowing it with following message. https://ibb.co/zPcqj6M...
Replies
3
Views
1,372
Hi All, which the best way to do the indirect addressing in an optimize DB? Ccurrently this is my partial code inside an FB...
Replies
7
Views
2,267
Hey everyone, Just used the PLC5/Logix migration utility to convert a program, and while addressing the PCEs, I noticed a lot of errors for "XIC...
Replies
12
Views
1,951
Back
Top Bottom