REGSTRING_TO_GUID

REGSTRING_TO_GUID 1:

This function converts a registry GUID string variable (enclosed in curly brackets) into a structured GUID variable.

FUNCTION REGSTRING_TO_GUID: GUID

VAR_INPUT

VAR_INPUT
    in : STRING(38);
END_VAR

Return value

Meaning

'{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}'

No error (‘x’ is a hexadecimal half-byte)

'{00000000-0000-0000-0000-000000000000}'

No error, GUID has the initial value (all bytes are zero)

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)