Pointer to data in scl

Ah, you've spotted it - the one weakness in SCL! It has no POINTER or ANY datatype or instructions for handling a pointer.

But, you can make your own.

I don't have the reference info at this PC I'm at just now, but you need to check the structure of a full area-crossing pointer. The standard STEP7 online help, or the Berger book should suffice for this.

Then create a UDT which mimics this structure, assembled from several bytes, words and dwords. When you come to create a variable based on this UDT you can load each component element with appropriate values and then pass it to any FC or FB requiring a POINTER or ANY parameter.

It sounds a lot worse than it is.

Regards

Ken
 
Simon

Oops, thank you. I was over-stating the case in my eagerness. What it doesn't have is any mechanism for handling the ANY. (It's a bit like and ARRAY in Siemens STL - yes, the ARRAY type exists but don't ever try using it like a proper array. No variable indexed addressing available.)

Ken
 

Similar Topics

I need to send a pointer to an array to a function. The SCL manual gives that example: FUNCTION FC100 : VOID VAR_IN_OUT N_out : INT...
Replies
0
Views
4,915
Hi All, in many library function of TiaPortal some data must be write using the pointer format........ eg.: P#DB90.DBX0.0 WORD 10 is it...
Replies
5
Views
2,818
Is it possible to make I/O filed on HMI of POINTER data type? Pointer data type can be either temp, IN or IN_OUT variable inside FB. it would be...
Replies
1
Views
1,773
http://www.plccenter.cn/Siemens_Step7/Format_des_Parametertyps_POINTER.htm Since I can not declare inside DB or UDT POINTER data type, I made...
Replies
23
Views
5,591
Hi all, Can anyone tell me if the POINTER data type is available in TIA for S7-1200 and what the format looks like? It's not listed under Data...
Replies
2
Views
4,124
Back
Top Bottom