Diagnostics

Ethernet State

In many cases it is important to know whether the communication with the higher-level master is still OK. To this end, link the FieldbusState variable with your PLC program.

Diagnostics 1:
Ethernet fieldbus state

Fieldbus State

Error number

Description

Remedy

0

No error

-

1

Watchdog error

Communication interrupted

Ethernet Type

Here it is possible to determine which Ethernet protocol is accessing the PLC variables, and thereby triggering the watchdog (for example, the data in the Default Config area starting from addresses %IB1000 and %QB1000).

Diagnosis number

Description

Remedy

0x0000

No protocol is accessing the PLC variables

-

0x0001

ADS TCP

Communication via ADS TCP/IP

0x0002

ADS UDP

Communication via ADS UDP/IP

0x0010

ModbusTCP

Communication via Modbus TCP/IP

Reading fieldbus state by ADS

The fieldbus status can be read through ADSREAD in the default configuration or in the TwinCAT configuration (under development).

Parameter ADSREAD function block

Description

NetID

local – empty string

Port

 

IndexGroup

 

IndexOffset

 

LEN

 

State of the K-bus

An internal bus or Bus Terminal error is indicated in the K-bus state. A more precise fault description can be obtained via a function block (in preparation). To this end, link the K-bus-State variable with your PLC program.

Diagnostics 2:
State of the K-bus

Error bit

Description

Error type

0

No error

No ERROR

Bit 0

K-bus error

ERROR

Bit 2

K-bus is re-triggered

NOTE

Reading K-bus state by ADS

In default or TwinCAT configuration the fieldbus state can be read via ADSREAD.

Parameter ADSREAD function block

Description

NetID

local – empty string

Port

1

IndexGroup

16#0006

IndexOffset

16#000C_9000

LEN

1