CONodeStop

Description

This function will stop all communication activities and removes the CANopen node from the CAN bus interface.

Prototype

void CONodeStop(CO_NODE *node);

ParameterDescription
nodepointer to the CANopen node object

Returned Value

none

Additional Information

To reactivate a stopped CANopen node, the functions CONodeInit() and CONodeStart() must be called again.

Example

The following example shows the sequence for restarting a CANopen node AppNode. Assuming the CANopen stack is initialized and started before, we just need to stop and re-initialize the stack to reset the node.


    :
    CONodeStop (&AppNode);
    :
    CONodeInit (&AppNode, (CO_NODE_SPEC *)&AppSpec);
 
    err = CONodeGetErr (&AppNode);
    if (err == CO_ERR_NONE) {
        CONodeStart (&AppNode);
    } else {
 
        /* error handling and diagnostics */
    }
    :


Attention: This procedure is NOT the standard node reset, which can be requested from the CANopen master or via the API function CONmtReset(). This sequence will transmit the boot-up message.