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

ParamDescription
indexIndex of the PLC PAL instance. Only one instance (index 0) supported.

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.