Seimens regiser indirect addressing help..

Matchu04

Lifetime Supporting Member
Join Date
Mar 2013
Location
Northampton
Posts
287
Some of you guys may remember I was getting some help on a roller door project a few months.. Lets say learning the ropes of what can be done within S7. Well alot of stuff was new to me so I decided to revisit some bits but would like some clarity...

So what ive leant with indirect addressing it fallS into two sections;

1- memory indirect addressing - where the pointer to the operand is stored within memory eg A I[MW 4]


2- Register-indirect addressing - Where it uses an address register to determine the address of the address (not sure that makes sense)

The register-indirect addressing is then split again.

a) Area internal

b) Area-crossing

The bit im not sure on is the area inernal. In the picture I have attached when carring out this comand the accum is loaded with the pointer of 123.0 not the a value of 123 is this correct??? other wise the value of the accum would be

00000000 00000000 00000000 11110011

instead of

10000011 00000000 00000011 11011000

Is my logic correct??

internal.jpg crossing.jpg
 
The big difference is where you define which memory area to access: either at pointer creation or memory access. Area internal doesn't specify which type of memory it refers to in the pointer, just an offset. Area crossing specifies the offset AND the memory area.

So, to use the code from the area internal example, you could load MB123 and IB123 with:

Code:
L P#123.0
T MD4
L MB[MD4]
L IB[MD4]

This loads the pointer offset 123.0, stores it in memory, and then uses the value to load MB123. You have to provide both a length (B for byte) and memory area (M), for the pointer to have any meaning. You could then follow with to load the value IB123.


On the other hand, area crossing pointers store the both the offset amount AND the memory area in the pointer. You only need to provide the pointer length. To re-use the sample code:

Code:
L P#M123.0
T MD4
L B [MD4]

This stores the pointer in MD4 again, but this time when it is called, because the memory area is included, you only need to specify the length (B). You do not have the option of trying to call it as MB or IB, because the area is already included.

I know that's a lot of text, does that help?
 

Similar Topics

opening up a copy of my HMI program I can go to where the passwords are created but they are all asterisks. How can I view what is there? I see...
Replies
4
Views
1,091
I have installed ver 16 of tia portal and I am running in the 21 days grace period. My question is this, is it fully functional during that 21...
Replies
8
Views
3,057
Hi; In our corrugator plant, there are one Corrugator and five Flexo graphic printing machines. One of them is a BOBST brand French made...
Replies
1
Views
1,903
We have these in our shuttles. The IP Address is stored on the SD card for the unit. We had a card go bad and I am trying to copy another card...
Replies
3
Views
1,147
Good morning, experts! I have a Siemens PLC and IO that I need to cross to Rockwell, and I have zero experience with the Siemens line of products...
Replies
2
Views
1,545
Back
Top Bottom