FB_GetSystemId 1:

The function block reads the system ID as GUID (see "About TwinCAT..." at the TwinCAT icon in the system tray).


    bExecute  : BOOL;
    tTimeout  : TIME := DEFAULT_ADS_TIMEOUT;
    sNetId    : T_AmsNetId;

bExecute: the block is activated by a positive edge at this input.

tTimeout: States the length of the timeout that may not be exceeded by execution of the ADS command.

sNetId: This parameter can be used to specify the AmsNetID of the TwinCAT computer whose system ID is to be read (type: T_AmsNetID). If it is to be run on the local computer, an empty string can be entered.


    bBusy      : BOOL;
    bError     : BOOL;
    nErrorId   : UDINT;
    stSystemId : GUID;

bBusy: When the function block is activated this output is set. It remains set until a feedback is received.

bError: If an error should occur during the transfer of the command, then this output is set once the bBusy output was reset.

nErrorId: Supplies the ADS error number when the bError output is set.

stSystemId: Supplies the system ID as GUID.


Development environment

Target platform

PLC libraries to be integrated (category group)

TwinCAT v3.1.0

PC or CX (x86, x64, ARM)

Tc2_Utilities (System)