STATE_BITS DPM_STATE_BITS_TYPE

The structure STATE_BITS includes four Boolean variables which display different communication states. Within the PROFIBUS DP library, the data type DPM_STATE_BITS_TYPE is declared as follows:

TYPE DPM_STATE_BITS_TYPE:
STRUCT
    CTRL:       BOOL;
    AUTO_CLR:   BOOL;
    NO_EXCH:    BOOL;
    FATAL:      BOOL;
    EVENT:      BOOL;
    TIMEOUT:    BOOL;
END_STRUCT
END_TYPE

CTRL

Data type: BOOL

If this bit is TRUE, a parameter setting error occurred. During normal operation, CTRL should be FALSE. If this is not the case, the parameter and configuration data have to be checked.

AUTO_CLR

Data type: BOOL

This bit is only valid, if Auto Clear Mode was set during the configuration. If AUTO_CLR is true, an error occured during communication with at least one DP slave. As a result, the Communication Module stopped the data exchange with all DP slaves and changed back to CLEAR state (see DPM_STATE).

NO_EXCH

Data type: BOOL

This bit is set to TRUE, if process data exchange with one or several DP slaves is not possible. The error can be caused by the configuration data or by the DP slaves.

Note

The state bit NO_EXCH is operated different for Communication Modules CM572-DP and CM592-DP in case of starting PROFIBUS DP communication.

If no slave devices are connected, the Communication Modules signal different state information:

  • On CM572-DP:

    the bit NO_EXCH is set to TRUE value.

  • On CM592-DP:

    the bit NO_EXCH remains not set and has FALSE value.

FATAL

Data type: BOOL

If FATAL is TRUE, no communication via the PROFIBUS DP is possible due to a serious bus error (e.g. bus line short circuit). In this case, all bus lines have to be checked.

EVENT

Data type: BOOL

This bit is set to TRUE, if a bus short circuit was detected. The number of detected short circuits can be read at the BUS_ERR output. After setting the bit once, its state remains TRUE.

Note

State bit EVENT is not supported by Communication Module CM592-DP. EVENT is always set to FALSE .

TIMEOUT

Data type: BOOL

This bit is set to TRUE, if a telegram timeout was detected. The number of detected timeouts can be read at the TIME_OUT output. After setting the bit once, its state remains TRUE.