24.08.2013 Views

CANopen Manager / Slave Manual - esd electronics, Inc.

CANopen Manager / Slave Manual - esd electronics, Inc.

CANopen Manager / Slave Manual - esd electronics, Inc.

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>CANopen</strong>-<strong>Slave</strong><br />

An error situation or an repaired error is indicated to the application layer and on the CAN bus in<br />

the following ways:<br />

- The error is indicated in the mandatory Error Register Object (0x1001)<br />

according to /1/.<br />

- An Emergency (EMCY) Object according to /1/ is transmitted on the CAN-Bus.<br />

The details of the EMCY object is described below. The CAN identifier of this<br />

object can be configured with the parameter ulEmcyCobId of the structure<br />

SLAVE_NODE_INFO which is described together with<br />

canOpenCreateNodeEx().<br />

- If the slave is initialized to support an error history via the Pre-defined error<br />

field (0x1003), the latest error event is inserted at the top of this array.<br />

- If the error is detected internally because of a communication or configuration<br />

problem in addition to the previous operations the error is indicated to the<br />

application via the node’s event handler.<br />

The 8 byte EMCY object according to /1/ has the following structure:<br />

2 Bytes 1 Byte 5 Byte<br />

Emergency Error Code Error Register Manufacture-specific error code<br />

A list of pre-defined Emergency Error Codes is described in /1/ and defined in the header<br />

scanopen.h starting with the prefix EMCY. If an error event is caused by the application calling the<br />

API functions canOpenSetError() or canOpenResetError() the 5 bytes of manufacturer-specific<br />

error information can be used without any restrictions. If the EMCY object is transmitted because<br />

of an internal communication or configuration error the 5 bytes are used in the following way:<br />

Temporary Bits Sticky Bits Reason Info1 Info2<br />

The Temporary Bits indicate temporary error conditions which are reset if the error is repaired:<br />

Bit Description<br />

0 NMT Error Control (Guarding/Heartbeat error).<br />

1 CAN Controller Passive.<br />

2 CAN Controller Bus Off<br />

3-4 Reserved for future use by the <strong>CANopen</strong> stack.<br />

5-7 Application specific temporary error.<br />

<strong>CANopen</strong> <strong>Slave</strong> Software <strong>Manual</strong> • Doc. No.: C.2002.21 / Rev. 2.2 Page 41 of 65

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!