Output Description

../_images/915495f1e38ad9920a33139000eba54e

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.

STATE_BITS

Data type: DPM_STATE_BITS_TYPE

STATE_BITS outputs atypical communication states at the PROFIBUS DP .

STAT_BITS is only valid, if EN = TRUE and ERR = FALSE. The structure of the type DPM_STATE_BITS_TYPE is defined in the PROFIBUS DP library as described below.

DPM_STATE

Data type: BYTE

At output DPM_STATE, the DP master state is output according to the standard. The following states are defined:

OFFLINE  00HEX / 00DEC
STOP     40HEX / 64DEC
CLEAR    80HEX / 128DEC
OPERATE  C0HEX / 192DEC
DPM_STATE = OFFLINE

The PROFIBUS DP Communication Module is in initialization state, if DPM_STATE has the value OFFLINE. After the initialization phase is completed, the Communication Module changes to STOP state.

DPM_STATE = STOP

The Communication Module is completely initialized, if DPM_STATE has the value STOP. In this state the Communication Module is ready to receive configuration data. No data are exchanged with the DP slaves. The Communication Module has this state, if no user program is running.

DPM_STATE = CLEAR

When starting the user program, the Communication Module changes from STOP into CLEAR state and begins, via the bus, to parameterize (set into operation) the DP slaves assigned during configuration. When the setup has been completed successfully, the Communication Module moves to OPERATE state. If an error occurs during parameterization, the Communication Module changes back to STOP state.

DPM_STATE = OPERATE

Normally, the Communication Module is in OPERATE state, while a user program is running. In this state, the DP master exchanges I/O data with the DP slaves. If an error occurs during this process, and if Auto Clear Mode was selected during configuration, the Communication Module changes back to CLEAR state and tries to parameterize the DP slaves again.

If Auto Clear Mode was not selected, the Communication Module remains (in case of an error) in OPERATE state. When stopping the user program, the Communication Module also changes back to STOP state.

DPM_STATE is only valid, if EN = TRUE and ERR = FALSE.

COM_ERR

Data type: DPM_COM_ERR_TYPE

Output COM_ERR outputs possible communication errors. COM_ERR is only valid, if EN = TRUE and ERR = FALSE.

The structure of the type DPM_COM_ERR_TYPE is defined in the PROFIBUS® library and described in the following chapter together with the possible errors.

BUS_ERR

Data type: WORD

BUS_ERR outputs the number of serious bus errors since system startup, such as transmission line short circuits.

BUS_ERR is only valid, if EN = TRUE and ERR = FALSE.

TIME_OUT

Data type: WORD

TIME_OUT outputs the number of timeout errors since system startup. A timeout error occurs, if a DP slave does not respond to a DP master’s request within the configured time.

TIME_OUT is only valid, if EN = TRUE and ERR = FALSE.

Note

The values BUS_ERR and TIME_OUT are operated different for Communication Modules CM572-DP and CM592-DP.

On CM572-DP BUS_ERR and TIME_OUT are operated independently and will count error events one by one basically.

On CM592-DP BUS_ERR and TIME_OUT are incremented always at once. Due to internal handling of error events the counters are updated with steps greater one always.