Pointers in Step 7...

Borte

Member
Join Date
Feb 2004
Location
Norway
Posts
238
Hello everybody!

I have a question regarding pointers in step7...

As far as I see this is some of the harder things to understand using the S7 plc's. I've been reading the Siemens help on "pointers" and "any" and I've been using dynamic "pointers" (buildt my own) in the past. So I know what to put in what byte and so on to make it work. But I'm still confused about what to use when. Like what is the real difference between "any" and "pointer" and when to use them? Usually I use "any" but...??? Ah... just confused!

Also according to the Siemens help file I can add a number to the AR1 using the +AR1 command, but what does this do? How can I use it? Will it change the byte address or will it change the bit number..

So input would be helpful.

Regards
Borte
 
Hi Borte


Well, I'll bet you get lots of replies on this topic! And every one will have their own ideas!

The difference between a POINTER and an ANY data type? A POINTER just identifies a memory location - it 'points' to an address somewhere. An ANY data type adds to this by allowing you to identify the type of data and the amount of data to be found at that address. So for example a POINTER could identify 'DB20.DBB20' and nothing else would be known. Any ANY could identify '6 REALS starting at DB20.DBB20'

When to use them? Well, it depends on what you want to do. Do you need to refer to a quantity of data or just a data location?

The AR1 contents only represent a portion of a full POINTER or ANY. It is only 32-bits long and can hold the memory area (M, I, Q, DB etc) plus byte and bit address. Yes, you can adjust the values here by addition or subtraction etc. And as a result you can alter the location to which the POINTER points.

Just some ideas to start with ... Let's see how this develops.

Ken.
 
Would have given a reply but am confused myself..:oops:
Can I use pointers say for example as a Shift register?
Can anybody give an example on how to use pointers in shift register applications? thanks..
 

Similar Topics

Hi, I program S7-300 CPUs but I'm not skilled in it yet. Now I'm facing the problem with comparing static array values with dynamically changing...
Replies
10
Views
4,503
Hello, I'm new with siemens step 7 (PLC : S7 300) and i have a question about using pointers. I have created a 5 DW shift register for an...
Replies
5
Views
4,591
Hello, I've just came out of a call where a program that was modified two weeks ago threw the processor into fault. The program has been done...
Replies
9
Views
3,470
I'm trying to get a 5069-L306er to talk to a Automation Direct ProSence Controller by using RA's AOI for modbus client but its stuck not getting a...
Replies
9
Views
1,881
The last time I did anything with Wonderware was just after the dot com bust. Boy, I feel old. Anyway, it looks like I will get the chance to...
Replies
3
Views
1,520
Back
Top Bottom