FB_PN_GET_PORT_STATISTIC

FB_PN_GET_PORT_STATISTIC 1:

When called, this module supplies the statistical data for the ports of a PROFINET device.

VAR_INPUT

VAR_INPUT
    bStart  : BOOL;
    NETID   : T_AmsNetId;(* AMS Net ID from Controller *)
    PORT    : T_AmsPort; (* Port used by Controller to communicate with Device *)
END_VAR

bStart :    The block is activated by a rising edge on this input

NETID :     AMS Net ID of the controller

PORT :     Port via which the controller communicates with the device (port = Device ID + 1000hex )

VAR_OUTPUT

VAR_OUTPUT
    bBusy            : BOOL;
    str_RemotePort_1 : str_GetPortStatistic;
    str_RemotePort_2 : str_GetPortStatistic;
    bPort1           : BOOL;
    bPort2           : BOOL;
END_VAR

bBusy :    When the function block is activated this output is set. It remains set until a feedback is received. While Busy = TRUE, no new command will be accepted at the inputs.

str_RemotePort_1:    This structure contains the statistical data for Port 1.

str_RemotePort_2:    This structure contains the statistical data for Port 2.

bPort1:    Is TRUE if the port has a link.

bPort2:    Is TRUE if the port has a link.

Requirements

Development environment

Target platform

PLC libraries to be linked

TwinCAT v2.11.0 R3

PC or CX (x86, ARM)

TcProfinetDiag.Lib