Output Description

../_images/5d8c0cd0e3899f9f0a33139000eba54e

DONE

Data_Type Default_Value Range Unit
BOOL - - -

Output DONE indicates  the processing state of the Function Block. After completion or abortion of processing (due to an error), DONE is set to TRUE. This 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

Data_Type Default_Value Range Unit
BOOL - - -

Output ERR indicates whether an error occurred during 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

Data_Type Default_Value Range Unit
WORD - - -

Output ERNO provides an error identifier if an invalid value has been applied to an input or if an error occurred during Function Block 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. Encoding of the error messages output at ERNO is explained in a separate table Error messages Error Messages of the Function Block Libraries of the Function Block libraries.

STATE_BITS:   CANOM_STATE_BITS_TYPE \

Output STATE_BITS indicates atypical communication states of the CANopen® Communication Module. STATE_BITS is only valid if EN = TRUE and ERR = FALSE.

Some of the error indications in STATE_BITS can be reset using the Function Block CANOM_RES_ERR CANOM_RES_ERR.

The structure STATE_BITS consists of six boolean variables displaying different communication states. In the CANopen® library, the data type CANOM_STATE_BITS_TYPE is defined as follows:

TYPE CANOM_STATE_BITS_TYPE:
STRUCT
   CTRL:      BOOL;
   AUTO_CLR:  BOOL;
   NO_EXCH:   BOOL;
   FATAL:     BOOL;
   EVENT:     BOOL;
   reserved1: BOOL;
   TIMEOUT:   BOOL;
   reserved2: BOOL;
END_STRUCT
END_TYPE

CTRL

Data_Type Default_Value Range Unit
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

If AUTO_CLR is set to TRUE, the Communication Module stopped data exchange with all slaves due to communication errors and changed back to CLEAR state (see also CANOM_STATE).

Data_Type Default_Value Range Unit
BOOL - - -

NO_EXCH

This bit is set to TRUE, if no exchange of process data can be performed with one or several slaves. The error can be caused by the configuration data or the slaves themselves.

Data_Type Default_Value Range Unit
BOOL - - -

FATAL

If FATAL is set to TRUE, no communication via CANopen® is possible due to a fatal internal error.

Data_Type Default_Value Range Unit
BOOL - - -

EVENT

EVENT is set to TRUE, if the Communication Module detects transmission errors. The number of occurring transmission errors is displayed at the corresponding outputs BUS_ERR and BUS_OFF. If the EVENT bit is set to TRUE, reset is only possible via the Function Block CANOM_RES_ERR CANOM_RES_ERR.

Data_Type Default_Value Range Unit
BOOL - - -

reserved1

This bit is reserved and currently not in use.

Data_Type Default_Value Range Unit
BOOL - - -

TIMEOUT

If TIMEOUT is set to TRUE, transmission of at least one telegram failed. The transmission of this telegram was aborted and its content is lost. TIMEOUT = TRUE is an indication that the communication partner could not be contacted via the bus. The number of failed transmissions is displayed at output TOUT_ERR. If the TIMEOUT bit is set to TRUE, reset is only possible using the Function Block CANOM_RES_ERR CANOM_RES_ERR.

Data_Type Default_Value Range Unit
BOOL - - -

reserved2

This bit is reserved and currently not in use.

Data_Type Default_Value Range Unit
BOOL - - -

CANOM_STATE

Data_Type Default_Value Range Unit
BYTE - - -

CANOM_STATE outputs the general communication state of the CANopen® master. The following states are defined:

State Meaning
Dec Hex  
0 00 OFFLINE
64 40 STOP
128 80 CLEAR
192 C0 OPERATE

CANOM_STATE = OFFLINE

If CANOM_STATE is set to OFFLINE, the CANopen® Communication Module performs an initialization. After the initialization phase is completed, the Communication Module changes to STOP state.

CANOM_STATE = STOP

If CANOM_STATE has the value STOP, the Communication Module is completely initialized. In this state the Communication Module is ready to receive configuration data. There is no data exchange with the slaves. The Communication Module has this state if no user program is running.

CANOM_STATE = CLEAR

If the user program is started, the Communication Module changes from STOP to CLEAR and starts to establish the connections defined 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.

CANOM_STATE = OPERATE

Normally, the Communication Module is in OPERATE state while a user program is running. In this state the master exchanges I/O data with the slaves. If an error occurs during this process and if ‘Auto Clear Mode’ has been selected during configuration, the Communication Module changes back to CLEAR state and tries to establish the connections again. If ‘Auto Clear Mode’ has not been selected during configuration, the Communication Module remains in OPERATE state in case of an error. If the user program is stopped, the Communication Module also changes back to STOP state.

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

CANOM_ERR:   CANOM_COM_ERR_TYPE

Output CANOM_ERR indicates possibly occurring communication errors. CANOM_ERR is only valid, if EN = TRUE and ERR = FALSE.

Using CANOM_ERR, it is possible to locate communication errors more precisely. The output CANOM_ERR is represented as a structure of the type CANOM_COM_ERR_TYPE. In the CANopen® library this data type is declared as follows:

TYPE CANOM_COM_ERR_TYPE:
STRUCT
   ADDRESS: BYTE;
   EVENT:   BYTE;
END_STRUCT
END_TYPE

ADDRESS

In case of an error, ADDRESS contains the node address of the faulty device. If ADDRESS has the value 255, the error is located in the Communication Module itself.

Data_Type Default_Value Range Unit
BYTE - - -

EVENT

In case of an error, EVENT contains the error causing event. The event refers to a single node address (ADDRESS <> 255) or the Communication Module itself (ADDRESS = 255).

ADDRESS <> 255  Error at subscribers with node address ADDRESS

Event Meaning Error source Cause / Remedy
30 Slave monitoring timeout Slave Check connection and node address of the slave
31 Slave aborted operational mode Slave Reset slave
32 Sequence error in node guarding protocol Slave Reset slave
33 No response to configured remote frame PDO Slave Check whether slave remote frames are supported
34 No slave response during configuration Slave Check whether the slave is connected and ready for operation
35 Actual device profile of the slave differs from the configured device profile Configuration Check the profile supported by the slave
36 Actual device type of the slave differs from the configured device type Configuration Check the services supported by the slave
37 Unknown SDO response received Slave Slave does not meet the CiA protocol specifications
38 Length indicator of a received SDO response is not equal to 8 Slave Slave does not meet the CiA protocol specifications
39 Slave is not processed. It is in the STOP state. Configuration/ Communication Module Deactivate the ‘Auto Clear Mode’

ADDRESS = 255  Communication Module error

Event Meaning Error source Cause / Remedy
52 Unknown process data handshake mode Configuration Contact customer support
56 Invalid data transfer rate Configuration Contact customer support
60 Node address configured twice Configuration / other device Check node addresses of all devices specified in configuration data
210 No configuration data Configuration / Communication Module Load configuration data into Communication Module
212 Error while reading database Configuration / Communication Module Load configuration data into Communication Module again, contact customer support
220 Watchdog error Controller Contact customer support
Data_Type Default_Value Range Unit
BYTE - - -

BUS_ERR

Data_Type Default_Value Range Unit
WORD - - -

BUS_ERR outputs the number of occurred bus failures. A bus failure occurs if the internal error frame counter exceeds a specific value. BUS_ERR is only valid if EN = TRUE and ERR = FALSE.

BUS_ERR can be reset using the Function Block CANOM_RES_ERR CANOM_RES_ERR.

BUS_OFF

Data_Type Default_Value Range Unit
WORD - - -

BUS_OFF outputs how often the Communication Module has been excluded from bus activities. An exclusion from the bus activities is performed, if an overflow of the internal error frame counter occurs. The Communication Module is automatically re-initialized after each overflow. BUS_OFF is only valid, if EN = TRUE and ERR = FALSE.

BUS_OFF can be reset using the Function Block CANOM_RES_ERR CANOM_RES_ERR.

TOUT_ERR

Data_Type Default_Value Range Unit
WORD - - -

TOUT_ERR outputs the number of telegrams that could not be transmitted successfully. The transmission of a telegram is considered as failed, if it could not be transmitted within 20 ms, for instance because the communication partner could not be contacted via the bus. TOUT_ERR is only valid, if EN = TRUE and ERR = FALSE.

TOUT_ERR can be reset using the Function Block CANOM_RES_ERR.

LOST_REC

Data_Type Default_Value Range Unit
WORD - - -

LOST_REC outputs the number of received telegrams that were rejected because they could not be processed successfully due to a CAN chip overload. LOST_REC is only valid, if EN = TRUE and ERR = FALSE.

LOST_REC can be reset using the Function Block CANOM_RES_ERR CANOM_RES_ERR.