CONmtSetMode

Description

This function sets the requested CANopen NMT state machine mode.

Prototype

void CONmtSetMode(CO_NMT *nmt, CO_MODE mode);

ParameterDescription
nmt reference to NMT structure
mode the requested NMT mode

Returned Value

none

Additional Information

The following table shows the possible values of the type CO.MODE:

ValueDescription
CO_INVALID Device in INVALID mode, e.g. not initialized
CO_INIT Device in INIT mode
CO_PREOP Device in PRE-OPERATIONAL mode
CO_OPERATIONAL Device in OPERATIONAL mode
CO_STOP Device in STOP mode

Example

The following example shows how to switch the CANopen node AppNode in operational mode without a CANopen master network command:

    :
    CONmtSetMode (&(AppNode.Nmt), CO_OPERATIONAL);
     :

End of topic