Passing Pointer in Block Call

Join Date
Aug 2005
Location
Hasselt
Posts
60
Hi all,

I struggling for a few days now, with passing a pointer value in a block call.

In the following example I call FC650, BronDW & DoelDW are declared as pointers.


CALL "Send Data samenstellen"
BronDB :=#DBNr
BronDW :=P#12.0 // Declared as Pointer in FC650
DoelDB :=611 // Data Ring Buffer Send
DoelDw :=P#12.0 // Start Adress Send Buffer Declared as Pointer in FC650
DataLength :=W#16#8 // Panelnaam = 8 Char
TelegramType:=2
ButtonNr :=#Index_BtNr
StatusNr :=#Index_StatNr


When I try an load then the address register in the called FC, using on the following methods, it loads a different value in AR1 then the one I pass???
.
L P##BronDW
LAR1

And this method is not permitted.

LAR2 P##DoelDw

I also tried passing the value as an ‘Integer’ or as ‘any’, but still it doens’t work.

The only thing that Works is loading the address directly using LAR1 P#value.

I would definitely appreciate some help on this one.

Grtz,

GeHe

 
Last edited:
All FC parameters are passed as area pointers. When you pass a pointer type variable (db pointer to be correct), you are actually passing a pointer to a pointer. See example code below:

ppp9.JPG
 

Similar Topics

I'm using FactoryTalk ME version 13. I'm aware how to pass a parameter file once, but I was wondering if it is possible to do it twice...
Replies
4
Views
129
I inherited a project in which a ME application displays process measurements (temp, pressure, flow, etc) on a PanelView Plus display. The data...
Replies
4
Views
473
My first real attempt at utilising the AOI function in Compactlogix. The issue I'm having is, I have an array of INT[400], but in my AOI I'm only...
Replies
1
Views
439
Hi guys. Sorry for the dumb question but I am still new. I have learned to pass Parameters using an HMI tag so far. Can I write directly to the...
Replies
1
Views
893
Hi guys, A dumb question, but is it possible to pass values to tags using parameter files in Ftview SE ver 11? TIA
Replies
2
Views
1,428
Back
Top Bottom