CONodeGetErr
Description
This function returns the current error status of the given node. If an error was detected, the error is cleared with this function call.
Prototype
CO_ERR CONodeGetErr(CO_NODE *node);
Parameter | Description |
---|---|
node | pointer to the CANopen node object |
Returned Value
One of the error codes, described in the section "Error Identification"
Example
The following example demonstrates a diagnostic section of a CANopen startup sequence:
: CONodeInit (&AppNode, (CO_NODE_SPEC *)&AppSpec); err = CONodeGetErr (&AppNode); switch (err) { case CO_ERR_NONE: CONodeStart (&AppNode); break; case CO_ERR_CFG_1001_0: AppTraceLog ("Error: Error Register [1001:0] is Incorrect."); break; case CO_ERR_CFG_1017_0: AppTraceLog ("Error: Heartbeat [1017:0] is Incorrect."); break; : } :