Analysis of the box states

Directly below the PROFINET controller protocol there is a collective PROFINET error and a collective PROFINET status. Both indicate the number of devices in which a problem has occurred or in which a diagnosis is available, i.e. the error indicates possible problems with the establishment of a connection or reasons for an abort. The diagnosis provides status information about an existing connection.

Analysis of the box states 1:
TwinCAT tree, inputs for analysis

PnIoError    -    number of PROFINET IO devices that have an error
PnIoDiag    -    number of PROFINET IO devices where a diagnosis is available

It is possible to check at a glance which device or box has a problem in the protocol under Box States.

Analysis of the box states 2:
"Box states" tab

Presently the following error messages are displayed under the “PnIoState”.

Number

Text

Description

Remedial action / reason

0

No error

No error

No error

1

PROFINETDevice state machine is in boot mode

PROFINET Device State Machine is still in the start-up phase

Not an error, wait

2

Device not found

Device does not reply to the Identify Request

Check connection, device connected, was the device called by its correct name?

3

The stationname is not unique

The station name is not unique

There are two or more devices in the network with the same PROFINET name.
A correct identification cannot take place.

4

IP could not set

IP address could not be set

The PROFINET device has rejected the IP settings for some reason.
Check whether the IP settings are correct.

5

IP conflict

An IP conflict has occurred in the network

A possible cause is that several devices have the same IP address.

6

DCP set was not successful

There was no reply or an erroneous reply to a DCP Set

Check connection, device connected, was the device called by its correct name?

7

Watchdog error

The connection was broken off with a Watchdog error

Check the cycle time, check the connection, if necessary increase the Watchdog factor.

8

Datahold error

The connection was broken off with a Datahold error

Frame Data status was invalid for the length of the DataHoldTimer. Restart the device if necessary.

9

RTC3: Sync signal could not started

For IRT only: the Sync signal could not be started.

Is EtherCAT Sync signal correct or has Sync0 started?

10

PROFINET Controller has a link error

The PROFINET controller has no link

Check cable and connection.

11

The aliasname is not unique

The alias name is not unique

There are two or more devices in the network with the same alias name. This is made up of the neighbourhood information (PortId.ChassisId). A correct identification cannot take place.

12

The automatic name assignment isn't possible - wrong device type

The automatic name assignment is not possible

The expected PROFINET device is not in the projected position (VendorId or DeviceId does not correspond). Hence, no automatic naming and thus no device start is possible.

31

Only for EtherCAT gateways: WC-State of cyclic EtherCAT frame is 1

For EL6631 only: EtherCAT WC State is 1

Check the mode on the EtherCAT master & slave (OP?).

 

As opposed to the state, more than one status can be displayed in the “BoxPnIoDiag”, i.e. the whole thing is bit-coded and up to 16 pieces of information can be displayed. The following statuses are currently displayed.

0x0000 = No diagnosis
0xXXX1 = IOC-AR is not established
0xXXX2 = IOC-AR is established
0xXXX4 = IOC-AR is established but no ApplReady
0xXXX8 = IOC-AR is established but module difference
0xXX1X = At least one AlarmCR get diagnosis alarm
0xX1XX = At least one InputCR is invalid
0xX2XX = At least one InputCR Provider is in stop
0xX4XX = At least one InputCR Problemindicator is set
0x1XXX = At least one OutputCR is invalid
0x2XXX = At least one OutputCR Provider is in stop
0x4XXX = At least one OutputCR Problemindicator is set

On the one hand information about the status of the IO Controller Single AR is displayed here. In addition, collective statuses are formed from the Frame Data statuses of the individual CRs. This applies to the input and output CRs (currently only one CR is possible, in future several). Furthermore a PROFINET alarm is also displayed in “PnIoDiag”

Readout via ADS

The Box Status can be read out via an ADS Read.

ADS Read:
NetId = AMSNETID des PROFINET Controllers
Port = BoxPort (0x1000 + BoxId)
Indexgroup = 0xF829
IndexOffset = 0
Length = sizeof(TPnIoDeviceDiagData);

 

where:

typedef struct
{
WORD pnioState;
WORD pnioDiag;
WORD NrOfInputCRs;
WORD NrOfOutputCRs;
WORD reserved[8];
} TPnIoDeviceDiagData, *PTPnIoDeviceDiagData;

Readout via CoE (for EL663x)

The Box Status can also be read out via CoE for the EL663x. The index 0xAyy0 (where yy is the Adaptor / Device number) and the subindex 0x001 must be taken for this.