F_CreateHashTableHnd

F_CreateHashTableHnd 1:

The function initializes the hash table handle. The table handle must be initialized once by calling the F_CreateHashTableHnd function.

FUNCTION F_CreateHashTableHnd: BOOL

VAR_INPUT

VAR_INPUT
    pEntries   : POINTER TO T_HashTableEntry := 0;
    cbEntries  : UDINT := 0;
END_VAR

pEntries: Address of the first T_HashTableEntry array element. The address can be determined with the ADR operator (type: T_HashTableEntry).

cbEntries: T_HashTableEntry byte size. The byte size can be determined with the SIZEOF operator.

VAR_IN_OUT

VAR_IN_OUT
    hTable : T_HHASHTABLE;
END_VAR

hTable: Hash table handle to be initialized (type: T_HHASHTABLE). The handle is required for accessing the hash table from the function block FB_HashTableCtrl.

Return parameter

Description

TRUE

No error

FALSE

Error

Example:

See: Example: Hash table (FB_HashTableCtrl).

Requirements

Development environment

Target platform

PLC libraries to be integrated (category group)

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_Utilities (System)