PRP Adapter Diagnosis

The diagnosis of the PRP adapter is done via the "Parameters (Online)".

These parameters and values are based on the standard "IEC 62439-3:2018" from chapter 4.2.7, table 2 and 3.

PRP Adapter Diagnosis 1:

Name

Type

Description

LinkStatus

TcPrpAdapterLinkStatus

Specifies information about the network interface. See at TcPrpAdapterLinkStatus structure the subelements.

NodeTableClear

BOOL

Allows emptying the "NodeTable".

NodeCount

UDINT

Indicates the current number of entries in the "NodeTable".

NodeTable

TcPrpNodeEntry[512]

Provides a table with information about all detected nodes in the network. See TcPrpNodeEntry structure for the details and subelements of this table.

TcPrpAdapterLinkStatus structure

The diagnosis from the network interfaces to LAN-A and LAN-B is done by the following structure via the parameter "LinkStatus".

Name

Type

Description

LinkSpeedA

UDINT

Specifies the transfer rate from the network interface to the LAN-A.

LinkSpeedB

UDINT

Specifies the transfer rate from the network interface to LAN-B.

bLinkA

BOOL

Indicates whether a connection was detected on the network interface to the LAN-A.

bLinkB

BOOL

Indicates whether a connection was detected on the network interface to LAN-B.

TcPrpNodeEntry structure

The diagnosis of the detected nodes in the network is done via the "NodeTable". This "NodeTable" consists of an array of structures with up to 1024 entries. A maximum of 64 entries are displayed in the TwinCAT XAE. The complete list can be retrieved via ADS. The current number of entries in this list is specified by the "NodeCount" parameter. The following describes the structure of the entries and its values.

Name

Type

Description

MacAddress

MAC_ADDRESS

Specifies the MAC address to the entry of the node.

bSanA

BOOL

Indicates whether the node was detected as a SAN (Single Attached Node) on the LAN-A.

bSanB

BOOL

Indicates whether the node was detected as a SAN (Single Attached Node) on the LAN-B.

CntReceivedA

UDINT

Specifies the number of frames received from LAN-A.

CntReceivedB

UDINT

Specifies the number of frames received from LAN-B.

CntErrWrongLanA

UDINT

Specifies the number of frames received from LAN-A indicating a wrong LAN indicator.

CntErrWrongLanB

UDINT

Specifies the number of frames received from LAN-B indicating a wrong LAN indicator.

CntDuplicateDiscardLanA

UDINT

Specifies the number of received duplicates and thus discarded frames from LAN-A.

CntDuplicateDiscardLanB

UDINT

Specifies the number of received duplicates and thus discarded frames from LAN-B.

CntSupervisionFrameLanA

UDINT

Specifies the number of PRP supervision frames received from LAN-A.

CntSupervisionFrameLanB

UDINT

Indicates the number of received PRP supervision frames from LAN-B.

CntRxErrLanA

UDINT

Specifies the number of errors when receiving frames from LAN-A.

CntRxErrLanB

UDINT

Specifies the number of errors when receiving frames from LAN-B.

CntTxErrLanA

UDINT

Specifies the number of errors when sending frames in LAN-A.

CntTxErrLanB

UDINT

Specifies the number of errors when sending frames in LAN-B.

TimeLastSeenA

UDINT

Specifies the time in milliseconds before which a frame was last received from these nodes on the LAN-A.

TimeLastSeenB

UDINT

Specifies the time in milliseconds before which a frame was last received from these nodes on the LAN-B.