PROFIBUS diagnostic data
The decentralized CX8031 controller enables you to send diagnostic data from the PLC. You may write your own diagnostic message for the master and fill it individually with data (see device-specific diagnostic data).
DP Diagnostic Data (DiagData)
The DP diagnostic data consists of six bytes of DP standard diagnosis, along with up to 238 bytes of device-specific diagnostic data.
When the DP diagnostic data changes, the slave reports this fact to the master, and the master will automatically fetch the changed diagnostic data. This means that DP diagnostic data is not included in the DP process data in real-time, but is always sent to the controller a few cycles later.
In TwinCAT the DP diagnostic data is read from the DP Master interface (FC310x, CX1500-M310) using ADS (see the section describing Slave Diagnosis in the FC310x documentation).
DP standard diagnostic data
Offset |
Meaning |
---|---|
0x00.0 |
StationNonExistent: slave did not reply to the last telegram |
0x00.1 |
StationNotReady: slave still processing the Set_Prm / Chk_Cfg telegram |
0x00.2 |
CfgFault: slave signalling a configuration error |
0x00.3 |
ExtDiag: extended DiagData available and valid |
0x00.4 |
NotSupported: slave does not support a feature requested via Set_Prm or Global_Control |
0x00.5 |
InvalidSlaveResponse: slave response not DP-compatible |
0x00.6 |
PrmFault: slave reports a parameterization error |
0x00.7 |
MasterLock: slave currently exchanging data with another master |
0x01.0 |
PrmReq: re-parameterise and reconfigure slave |
0x01.1 |
StatDiag: slave signalling static diagnosis / DPV1 slave application not yet ready for data exchange |
0x01.2 |
PROFIBUS DP slave |
0x01.3 |
WdOn: DP watchdog on |
0x01.4 |
FreezeMode: DP slave in freeze mode |
0x01.5 |
SyncMode: DP slave in sync mode |
0x01.6 |
reserved |
0x01.7 |
Deactivated: DP slave has been deactivated |
0x02.0 |
reserved |
0x02.1 |
reserved |
0x02.2 |
reserved |
0x02.3 |
reserved |
0x02.4 |
reserved |
0x02.5 |
reserved |
0x02.6 |
reserved |
0x02.7 |
ExtDiagOverflow: too much extended data present |
0x03 |
MasterAdd: station address of master with which slave is exchanging data |
0x04, 0x05 |
IdentNumber |
from 0x06 |
Device-specific diagnostic data (extended DiagData) |
Device-specific diagnostic data
Device-specific diagnostic data
The ADSWRITE block is used for sending diagnostic data. The current DP diagnosis sent to the bus can be read via ADSREAD. Please note that an additional 6 bytes (PROFIBUS standard DP diagnosis) are required for reading, i.e. the number of bytes that are read exceeds the number of bytes that were written by 6. The ADS parameters for the read process are identical.
Input parameters |
Description |
---|---|
NETID |
local NetId of the PROFIBUS device |
PORT number |
0x1000+slave address |
IDXGRP |
16#F481 |
IDXOFFS |
0 |
LEN |
max. 244 |
SRCADDR |
Pointer to diagnostic data |
![]() | Transmission of the diagnostic telegram A diagnostic telegram is only transferred to the controller when the diagnostic data have changed. |
![]() | Transmission of user-specific diagnostic data Byte 0 of the data must contain a 0x08. Bytes 1 to 5 are overwritten by the CX. Byte 6 and higher can contain your own diagnostic data. Make sure that your own diagnostic data conforms to the PROFIBUS standard for user-specific diagnosis. |