FB_PN_READ_PORT_DIAG

FB_PN_READ_PORT_DIAG 1:

The function block FB_PN_READ_PORT_DIAG retrieves the diagnosis information of the ports of a PROFINET device.

FB_PN_READ_PORT_DIAG 2: 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).

FB_PN_READ_PORT_DIAG 3: Outputs

VAR_OUTPUT
  bBusy             : BOOL;
  str_RemotePort_1  : str_GetPortStatistic;
  str_RemotePort_2  : str_GetPortStatistic;
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

str_GetPortStatistic

This structure contains the statistical data for Port 1.

str_RemotePort_2

str_GetPortStatistic

This structure contains the statistical data for Port 2.

Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT v3.1.4018

PC or CX (x64, x86, ARM)

Tc2_ProfinetDiag