Output DescriptionΒΆ

../_images/0d0765d9e38ad9250a33139000eba54e

DONE (done)

Data type: BOOL

Output DONE indicates the state of the job processing.

After completing or aborting the processing (due to an error), DONE is set to TRUE for one cycle. For that reason, the output always has to be considered together with output ERR. If ERR is TRUE, an error occurred. In this case, the error number can be read at output ERNO.

ERR (error)

Data type: BOOL

Output ERR indicates whether an error occurred during the Function Block processing.

This output always has to be considered together with output DONE. If DONE is TRUE and ERR is TRUE, an error occurred. In this case, the error number can be read at output ERNO.

ERNO (error number)

Data type: WORD

Output ERNO provides an error identifier, if an invalid value was applied to an input or if an error occurred during the request processing. ERNO always has to be considered together with the outputs DONE and ERR. The value output at ERNO is only valid, if DONE is TRUE and ERR is TRUE.

The error messages Error Messages of the Function Block Libraries encoding at output ERNO are explained at the beginning of the library description.

STAT_1 (station status)

Data type: STATIONSTATUS_1_TYPE

STAT_1 outputs the first octet of the DP slave diagnostic data.

STAT_1 is only valid, if DONE = TRUE and ERR = FALSE. The structure of the type STATIONSTATUS_1_TYPE corresponds to the octet Stationstatus_1 defined in the standard as described below.

STAT_2 (station status)

Data type: STATIONSTATUS_2_TYPE

STAT_2 outputs the second octet of the DP slave diagnostic data.

STAT_2 is only valid, if DONE = TRUE and ERR = FALSE. The structure of the type STATIONSTATUS_2_TYPE corresponds to the octet Stationstatus_2 defined in the standard as described below.

STAT_3 (station status)

Data type: STATIONSTATUS_3_TYPE

STAT_3 outputs the third octet of the DP slave diagnostic data.

STAT_3 is only valid, if DONE = TRUE and ERR = FALSE. The structure of the type STATIONSTATUS_3_TYPE corresponds to the octet Stationstatus_3 defined in the standard as described below.

MSTR (master)

Data type: BYTE

MSTR outputs the bus address of the DP master to which has done the configuration of this slave.

MSTR is only valid, if DONE = TRUE and ERR = FALSE. Using the Function Block DPM_SLV_DIAG, diagnostic data for all DP slaves can be polled which are connected to the bus. If the diagnostic data are requested by a DP slave which was assigned to the PLC during configuration, the PLC bus address is output at MSTR.

In multi-master systems it is possible that diagnostic data are also requested by DP slaves which are assigned to other DP masters. In this case, MSTR outputs the bus address of the DP master to which the requesting DP slave is assigned.

EXT_DIAG_LEN (extended diagnostic data length)

Data type: BYTE

EXT_DIAG_LEN outputs the number of valid bytes, following in EXT_DIAG_DAT.

If EXT_DIAG_LEN = 0, no extended diagnostic data are available. Otherwise, EXT_DIAG_DAT[1] to EXT_DIAG_DAT[EXT_DIAG_LEN] contain the extended diagnostic data reported by the DP slave. EXT_DIAG_LEN is only valid, if DONE = TRUE and ERR = FALSE.

EXT_DIAG_DAT (extended diagnostic data)

Data type: ARRAY[1..238] OF BYTE

At output EXT_DIAG_DAT the extended diagnostic data reported by the DP slave are applied as a byte array.

The data in EXT_DIAG_DAT are only valid, if DONE = TRUE, ERR = FALSE and EXT_DIAG_LEN > 0. The extended diagnostic data are structured according to the standard. Since the meaning of these data strongly depends on the used devices, no automatic interpretation by the Function Block is possible at this point.

The evaluation of the data must be performed by the user, with the aid of the particular device description and the GSD file respectively. The general structure of the extended diagnostic data (according to the standard) is described in Structure of DP slave diagnostic data.