FB_GetRouterStatusInfo
The function block FB_GetRouterStatusInfo can be used to read status information for the TwinCAT router from the PLC (available memory, number of registered ports etc.).
VAR_INPUT
VAR_INPUT
sNetId : T_AmsNetID := '';
bExecute : BOOL;
tTimeout : TIME := DEFAULT_ADS_TIMEOUT;
END_VAR
sNetId: Here you can enter a string with the network address of the TwinCAT computer whose TwinCAT router information is to be read (type: T_AmsNetID). If it is to be run on the local computer, an empty string can be entered.
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.
VAR_OUTPUT
VAR_OUTPUT
bBusy : BOOL;
bError : BOOL;
nErrId : UDINT;
info : ST_TcRouterStatusInfo;
END_VAR
bBusy: When the function block is activated this output is set. It remains set until a feedback is received.
bError: In the event of an error during the command transfer, this output is set once the bBusy output has been reset.
nErrId: Supplies the ADS error number when the bError output is set.
info: Structure variable with TwinCAT router status information (type: ST_TcRouterStatusInfo).
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) |