1.4.3.3 PAL_PLC_HandleGet Function
C
PAL_PLC_HANDLE PAL_PLC_HandleGet(const SYS_MODULE_INDEX index);
Summary
Returns a handle to the requested PLC PAL instance.
Description
This function returns a handle to the requested PLC PAL instance.
Precondition
The PAL_PLC_Initialize function should have been called before calling this function.
Parameters
Param | Description |
---|---|
index | Index of the PLC PAL instance. Only one instance (index 0) supported. |
Returns
Handle (PAL_PLC_HANDLE type) to the requested PLC PAL instance.
PAL_PLC_HANDLE_INVALID is returned if the index parameter is invalid.
Example
PAL_PLC_HANDLE myPalPlcHandle;
myPalPlcHandle = PAL_PLC_HandleGet(PAL_PLC_INDEX_0);
if (myPalPlcHandle != PAL_PLC_HANDLE_INVALID)
{
// Found a valid handle to the PLC PAL instance
}
Remarks
The handle returned by this function is needed to call other functions of the PLC PAL module.