FB_GetRouterStatusInfo

FB_GetRouterStatusInfo 1:

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.).

FB_GetRouterStatusInfo 2: Inputs

VAR_INPUT
    sNetID   : T_AmsNetId;
    bExecute : BOOL;
    tTimeout : TIME := DEFAULT_ADS_TIMEOUT;
END_VAR

Name

Type

Description

sNetID

T_AmsNetID

A string with the network address of the TwinCAT computer whose TwinCAT router information is to be read can be specified here. For the local computer an empty string may be specified.

bExecute

BOOL

The function block is enabled by a positive edge at this input.

tTimeout

TIME 

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

FB_GetRouterStatusInfo 3: Outputs

VAR_OUTPUT
    bBusy       : BOOL;
    bError      : BOOL;
    nErrID      : UDINT;
    info        : ST_TcRouterStatusInfo;
END_VAR

Name

Type

Description

bBusy

BOOL

When the function block is enabled, this output is set and remains set until a feedback is received.

bError

BOOL

If an error occurs during the transmission of the command, this output is set after the bBusy output is reset.

nErrID

UDINT

Returns the ADS error number when the bError output is set.

info

ST_TcRouterStatusInfo

Structure variable with TwinCAT router status information.

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)