Handling Broken PROFINET Connections

It is important in many industrial applications to detect faults quickly. One such fault is losing PROFINET I/O communication. PROFINET supports a configurable timeout value, which is expressed in terms of a multiple of the update time. The default multiplier is 3 for most IO Controllers. For example, for an update time of 16 ms and a timeout multiplier of 3, the connection timeout will be 3 x 16 ms or 48 ms.

When either the IO-Controller or IO-Device does not receive a packet from the other device for the timeout interval, it closes the connection and typically indicates this condition to the main program. The method of indicating this condition depends on the actual device. This topic describes the methods used by the RMC and Siemens TIA Portal.

Handling Broken I/O Connections in the RMC

The RMC has tags that indicate the state of the I/O connections. The user can use these registers to qualify whether certain operations in the User Programs can be done, or they can use these registers in the Program Triggers to respond to the change in state of the connection.

To find these tags when editing the Program Triggers or a User Program, use the Address Selection tree and browse to:

Controller > Communication Settings > Ethernet

 

RMC75/150 Tag Name

RMC200 Tag Name

Description

_Enet.CCStatus.Active

_Enet.PNIOConnStatus.Active

I/O Connection Active

This bit is set as long as an I/O connection is currently active. If the connection is closed or timed out, this bit will be cleared.

_Enet.CCStatus.TimedOut

_Enet.PNIOConnStatus.TimedOut

I/O Connection Timed Out

This bit is set when an I/O connection timed out. Notice that this is only one method of a connection being closed (another example is the PLC intentionally closing it). This bit is cleared when the I/O connection is re-opened. The user can look for the rising edge of this bit in the Program Triggers to respond to a time-out.

A time-out can occur when the cable is disconnected, or when the client is powered off or reset.

This bit is not used for PROFINET on the RMC75/150.

_Enet.PLCStatus

_Enet.PNIOConnPLCState

I/O Connection PLC State

This register indicates the state of the controlling PLC. This register (DINT data type) can hold one of three values: Unknown (0), Run (1), and Program (2). The Unknown state applies whenever no PROFINET I/O connection is active.

Handling Broken I/O Connections in Siemens TIA Portal

One method of handling broken connections in the Siemens TIA software is via the DeviceStates instruction.

To set up the DeviceStates instruction:

  1. Set the LADDR input to the hardware identifier of the PROFINET IO.

  2. Set the MODE input to 5 (you may wish to use 2 instead - see the TIA help).

  3. Connect the STATE input to an array of booleans capable of holding the state for each IO device.

  4. Connect the Ret_Val output to a data block to record any errors in executing the instruction.

 

 

Once this block has been set up, the first boolean in the State array will indicate whether a connection fault is present, and the remaining portion of the array will indicate which connection has a fault.

 

Example:

A PROFINET IO system has connections to three IO devices with numbers 1, 2, and 3. The connection with device number 1 is faulty.

The following will be written to the state array.

Bit 0 = 1: A fault exists for at least one of the IO slaves

Bit 1 = 1: IO device with device number 1 is faulty

Bit 2 = 0: IO device with device number 2 is not faulty

Bit 3 = 0: IO device with device number 3 is not faulty

 

 

See Also

PROFINET Overview | I/O Connection Status | I/O Connection PLC State


Send comments on this topic.

Copyright © 2025 Delta Computer Systems, Inc. dba Delta Motion