F_BA_OffsetPtr

The function F_BA_OffestPtr of return type PVOID adds an offset nOffset to the entered address pAddr and returns the result as return value of the function. This value then in turn represents an address.
The function distinguishes internally whether the runtime system used is of type x64 or x86: for the x64 system the offset is converted to a variable of type ULINT and added, for an x86 system to a variable of type UDINT.
Syntax
FUNCTION F_BA_OffsetPtr : PVOID
VAR_INPUT
pAddr : PVOID;
nOffset : DINT;
END_VAR
Inputs
Name | Type | Description |
---|---|---|
pAddr | PVOID | Base address |
nOffset | DINT | Offset |
Requirements
Development environment | Required PLC library |
---|---|
TwinCAT 3.1 4024.35 | Tc3_BA2_Common from V2.1.20.0 |