L-force | plc designer – Lenze PLC Designer PLC Designer (R3-1) User Manual
Page 1029

L-force | PLC Designer
Programming Reference
DMS 4.1 EN 03/2011 TD29
1027
Template :
Declaration part:
// Implicitly generated code : DO NOT EDIT
FUNCTION CheckPointer : POINTER TO BYTE
VAR_INPUT
ptToTest : POINTER TO BYTE;
iSize : DINT;
iGran : DINT;
bWrite: BOOL;
END_VAR
Implementation part:
// No standard way of implementation. Fill your own code here
CheckPointer := ptToTest;
When called the function gets the following input parameters:
• ptToTest: Target address of the pointer
• iSize: Size of referenced variable; the data type of iSize must be integer-compatible
and must cover the maximum potential data size stored at the pointer address
• iGran: Granularity of the access, that is the largest not-structured datatype used in
the referenced variable; the data type of iGran must be integer-compatible
• bWrite: type of access (TRUE=write access, FALSE= read access); the data type of
bWrite must be BOOL
Return value: Address which is used for dereferencing the pointer, thus at best the one
that has been passed on as the first input parameter (ptToTest).