F_CreateHashTableHnd

The function initialises the hash table handle. The table handle must be initialised once by calling the F_CreateHashTableHnd function.
FUNCTION F_CreateHashTableHnd : BOOL
VAR_INPUT
VAR_INPUT
pEntries : POINTER TO T_HashTableEntry := 0; (* Pointer to the first entry of hash table database (element array) *)
cbEntries : UDINT := 0; (* Byte size (length) of hash table database (element array) *)
END_VAR
pEntries: Address of the first T_HashTableEntry array element. The address can be determined with the ADR operator.
cbEntries: T_HashTableEntry byte size. The byte size can be determined with the SIZEOF operator.
VAR_IN_OUT
VAR_IN_OUT
hTable : T_HHASHTABLE;(* Hash table handle *)
END_VAR
hTable: Hash table handle to be initialized. The handle is required for accessing the hash table from the function block FB_HashTableCtrl.
Return parameter | Description |
---|---|
TRUE | No error |
FALSE | Error |
Example: Please refer to the documentation for the FB_HashTableCtrl function block.
Requirements
Development environment | Target platform | PLC libraries to include |
---|---|---|
TwinCAT v2.10.0 Build > 1332 | PC or CX (x86, ARM) | TcUtilities.Lib |