F_CreateLinkedListHnd

F_CreateLinkedListHnd 1:

The function initialises the Linked List Handle. The List Handle must be initialised once by calling the F_CreateLinkedListHnd function.

FUNCTION F_CreateLinkedListHnd : BOOL

VAR_INPUT

VAR_INPUT
    pEntries : POINTER TO T_LinkedListEntry := 0; (* Pointer to the first linked list node (element array) *)
    cbEntries : UDINT := 0; (* Byte size (length) of linked list node array *)
END_VAR

pEntries: The address of the first T_LinkedListEntry array element. The address can be determined with the ADR operator.

cbEntries: The size of the T_LinkedListEntry array in bytes. The byte size can be determined with the SIZEOF operator.

VAR_IN_OUT

VAR_IN_OUT
    hList : T_HLINKEDLIST;(* Linked list handle *)
END_VAR

hList: Hash table handle to be initialized. The handle is required for accessing the list from the function block FB_LinkedListCtrl.

Return parameter

Description

TRUE

No error

FALSE

Error

 

Example: See the documentation for the FB_LinkedListCtrl function block.

 

Requirements

Development environment

Target system type

PLC libraries to include

TwinCAT v2.10.0 Build >= 1339
TwinCAT v2.11.0 Build >= 1524

PC or CX (x86, ARM)

TcUtilities.Lib