CONmtSetMode

Description

This function sets the requested CANopen NMT state machine mode.

Prototype

void CONmtSetMode(CO_NMT *nmt, CO_MODE mode);

ParameterDescription
nmtreference to NMT structure
modethe requested NMT mode

Returned Value

none

Additional Information

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

ValueDescription
CO_INVALIDDevice in INVALID mode, e.g. not initialized
CO_INITDevice in INIT mode
CO_PREOPDevice in PRE-OPERATIONAL mode
CO_OPERATIONALDevice in OPERATIONAL mode
CO_STOPDevice 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);
    :