Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

CONmtSetNodeId

Description

This function sets the requested CANopen Node-ID within the NMT module.

Prototype

void CONmtSetNodeId(CO_NMT *nmt, CPU_INT08U nodeId);

ParameterDescription
nmt reference to NMT structure
nodeId the requested NMT node ID

Returned Value

none

Additional Information

The following errors are detected within this function:

ValueDescription
CO_ERR_NMT_MODE the CANopen device is not in INIT mode
CO_ERR_BAD_ARG the given nodeId is invalid (e.g. zero)

If one of these errors is detected, this function call will change nothing.

Important: After successful operation, the function CONmtReset() must be called to re-initialize the internal SDO and PDO tables.

Example

The following example shows how to set a dynamically determined node-ID for the CANopen node AppNode:

  • No labels