Pointers in Step7

Terra70

Member
Join Date
Nov 2006
Location
Westcoast
Posts
10
Is it not possible to use pointers to "TEMP" variables inside a FB or FC?

When the variable("SomeDWord" in the example) is located in the "STAT" folder inside a FB it is working, but when the variable is located inside the "TEMP" folder nothing is happening....


LAR1 P##SomeDWord

A DIX [AR1,P#0.7]
S DIX [AR1,P#1.3]
 
Note that DIX refers to the currently open instance data block. If you want to refer to local data then use:

A [AR1,P#0.7]
S [AR1,P#1.3)

as the LAR1 p##SomeDWord will have set AR1 to point to the local area.
 

Similar Topics

Hi every one. I am trying to verify the following: A DINT can be converted to a POINTER by simply shifting the double word left by 3 bits. i want...
Replies
3
Views
2,066
Hello, I try to understand a function block where a string is copied from an address (source) to another address (destination) by using...
Replies
4
Views
7,480
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,456
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,871
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,501
Back
Top Bottom