Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following example demonstrates a diagnostic section of a CANopen startup sequence:


Code Block
languagecpp
    :
    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;
          :
    }
    :