FB_PN_GET_PORT_STATISTIC

When called, the function block FB_PN_GET_PORT_STATISTIC provides the statistical data on the ports of a PROFINET device.
 Inputs
 Inputs
VAR_INPUT
  bStart       : BOOL;
  NETID        : T_AmsNetId;
  PORT         : T_AmsPort;
END_VAR| Name | Type | Description | 
|---|---|---|
| bStart | BOOL | The function block is enabled by a positive edge at this input. | 
| NETID | T_AmsNetId | AMS Net ID of the controller | 
| PORT | T_AmsPort | Port via which the controller communicates with the device (port = Device ID + 1000hex). | 
 Outputs
 Outputs
VAR_OUTPUT
  bBusy             : BOOL; 
  str_RemotePort_1  : str_GetPortStatistic;
  str_RemotePort_2  : str_GetPortStatistic;
  bPort1            : BOOL;
  bPort2            : BOOL;
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. 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 | BOOL | Is TRUE if the port has a link. | 
| bPort2 | BOOL | Is TRUE if the port has a link. | 
Requirements
| Development environment | Target platform | PLC libraries to include | 
|---|---|---|
| TwinCAT v3.1.4018 | PC or CX (x64, x86, ARM) | Tc2_ProfinetDiag |