Using indirect adresses (Adres Register)

userxyz

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

I understand how this works, but when can u use stuff like this? :



L MW 100
T MW 210
L 11
T MW 75


LAR1 P#10.0
L MW [AR1,P#200.0]
T MW 220

LAR2 P#66.0
L MW [AR2,P#9.0]
T MW 230
 
I don't see any particular use to that piece of code other than to show someone definitively that indirect addressing really does work. The way this code is done you could just as easily have used direct addresses.


Keith
 
Indirect Adressing

Thats my point,

when can u use indirect adressing via the register ?

U have 2 registers, AR1 and AR2.


When do u use one of these registers ?

When can it be useful to use indirect adressing, can u give me an example..
 
One popular example would be when using look-up tables. Typically the location you are looking for is based on the value of some variable. By properly conditioning this variable using appropriate scaling and offsets, you can get an index into the look-up table.


I have attached a source file of a function block I wrote that interpolates between two members in a list of values. This might help. The value "Curve Byte Pointer" is a memory word that contains the byte offset.

Keith
 
I just spend 3 weeks at Siemens Training Centre in Brussels, we saw indirect adressing and adress register in detail. If you're interested I can mail you some test-project where we did some indirect adressing and where it made sence doïng this. Let me now if you're interested!
PS: kan ook in Nederlands,
Grtz,
Heino
 

Similar Topics

Hi, I have this code: LAR1 P##structy L 0 T LW [AR1,P#0.0] which resets all the bits in this struct called structy...
Replies
1
Views
640
So I have a problem that I am trying to overcome. I have X amount of motors (I'm trying to make the program scaleable). Let's say that a system...
Replies
5
Views
2,010
Hi, I am having trouble in the Intouch Application maping indirect real tags to IO real tags to grab information.
Replies
2
Views
3,408
I remember a while back somebody asking about how to Indirect address a Logix tag using a string. It is possible. I just stumbled across this tech...
Replies
0
Views
2,468
Hi, Im new to SCL, but decided to start learning it - if only to be able to do some simple jobs such as indirect addressing. got some simple...
Replies
3
Views
6,901
Back
Top Bottom