Skip to main content

NMT Commands

Network Management protocol defines the communication and operational modes of the modules


Network Management (NMT) is a CANopen protocol for sending commands to modules, changing their operational states, and managing overall network behavior. The effect of these commands is to change the mode of the device (or devices collectively on the network). The command table is maintained as a list of #defines in the CanFest code base. Each module in the COSMIIC system maintains its own version of def.h in the application source code for each of the modules at canFest/include/def.h, and not all NMT commands are implemented by every module.


Triggering an NMT Command

Users can control the use of NMT commands through NNP-API on MATLAB and using .nnpscripts. NMT commands must specify the target node, the specific hex code of the command, and relevant parameters.

  • node: Target node ID (0 = broadcast, 7 = PM, 115 = RM)
  • command: NMT command as a hex string (e.g., '95') or decimal integer
  • param1, param2 (optional): Additional parameters (0–255)

NMT in NNP-API

The NNP-API MATLAB library provides the nmt function in NNPCORE for sending NMT commands directly to any node on the network.

dataOut = nnp.nmt(node, command)
dataOut = nnp.nmt(node, command, param1)
dataOut = nnp.nmt(node, command, param1, param2)

Examples:

nnp.nmt(7, '95')       % Turn network ON (PM)
nnp.nmt(7, '8D', 1) % Run script ID 1 on PM

NMT in .nnpscript

Within a .nnpscript file, use the NMT0, NMT1, or NMT2 opcodes depending on the number of parameters required.

NMT0 <NODE> <CMD> 
NMT1 <NODE> <CMD> <PARAM1>
NMT2 <NODE> <CMD> <PARAM1> <PARAM2>

Examples:

NMT0 7 0x95       % Turn network ON (PM)
NMT1 7 0x8D 1 % Run script ID 1 on PM

NMT Command Reference Table

Filter by device:
87 commands
Command NameValuePMPG4BP2
NMT_Start_Nodes0x01
NMT_Stop_Nodes0x02
NMT_Enter_Patient_Operation0x03
NMT_Enter_X_Manual0x04
NMT_Enter_Y_Manual0x05
NMT_Enter_Stop_Stim0x06
NMT_Enter_Wait_Mode0x07
NMT_Enter_Patient_Manual0x08
NMT_Enter_Produce_X_Manual0x09
NMT_Do_Save_Cmd0x0A
NMT_Do_Restore_Cmd0x0B
NMT_Enter_Record_X0x0C
NMT_Enter_Charging_Mode0x0F
NMT_Return_Node_Table0x10
NMT_Return_Single_Node0x11
NMT_Group_On0x20
NMT_Group_Off0x21
NMT_All_Groups_Off0x22
NMT_Reset_Node0x81
NMT_Reset_Comunication0x82
NMT_Enter_Bootloader0x83
NMT_Start_Sync0x84
NMT_Stop_Sync0x85
NMT_Start_PDO0x86
NMT_Stop_PDO0x87
NMT_Set_RTC0x88
NMT_Set_Alarm0x89
NMT_Reset_Watchdog0x8A
NMT_Radio_WOR_ON0x8B
NMT_Radio_WOR_OFF0x8C
NMT_Run_Script0x8D
NMT_Enable_Script(s)0x8E
NMT_Disable_Script(s)0x8F
NMT_Delete_Script0x90
NMT_Erase_Serial_Eprom0x90
NMT_Radio_Address0x92
NMT_Wake_Remote_Modules0x93
NMT_Network_On0x95
NMT_Network_Off0x96
NMT_Halt_RTC0x97
NMT_Clear_CAN_Errors0x98
NMT_Set_Radio_Power0x99
NMT_Init_NV_Memory0x9A
NMT_Init_CAN0x9B
NMT_Reset_Radio_Counters0x9C
NMT_Reset_OD_Defaults0x9D
NMT_Reset_Module0x9E
NMT_Enter_Low_Power0x9F
NMT_Network_On_Only0xA0
NMT_Load_Pattern0xA5
NMT_Read_Pattern0xA6
NMT_Reset_Global_Vars0xA7
NMT_Turn_OFF_Alarms0xA8
NMT_Start_Script_Debug0xAB
NMT_Stop_Script_Debug0xAC
NMT_Single_Step_Debug0xAD
NMT_Stop_Script0xAE
NMT_Run_Script_Once0xB3
NMT_Set_Script_Delay_Time0xB4
NMT_Abort_Scripts0xB5
NMT_Clear_Startup_Script0xB6
NMT_Clear_Shutdown_Script0xB7
NMT_Flush_Log_Files0xB8
NMT_Init_File_System0xB9
NMT_Enable_Encryption0xBA
NMT_Erase_PM_Blocks0xBB
NMT_BlankCheck_PM_Flash_Mem0xBC
NMT_Set_VSYS0xBE
NMT_Exit_Low_Power0xBF
NMT_Enable_ForceAnodeOn0xC0
NMT_Disable_ForceAnodeOn0xC1
NMT_Update_Scheduler0xC2
NMT_Set_Gains0xD0
NMT_Set_AntiAliasing_High0xD1
NMT_Set_AntiAliasing_Low0xD2
NMT_Set_Analog_Pin_Config0xD3
NMT_Read_Script_Lengths0xE0
NMT_Read_Script_Revs0xE1
NMT_Read_Script_IDs0xE2
NMT_Read_Script_CRCs0xE3
NMT_Calculate_Script_CRCs0xE4
NMT_Read_Memory_Now0xE8
NMT_Set_nBOOT_HighOut0xF0
NMT_Set_nBOOT_LowOut0xF1
NMT_Set_nBOOT_In0xF2
NMT_Enable_Gyro0xF3
NMT_Disable_Gyro0xF4

Coming Soon...

Some NMTs have a System Mode dependency and Target Node dependency. In other words, the NMT may be non-functional under certain system modes or if sent to an incompatible node. We will be adding more detailed information about these dependencies for each command in the future.