Is it possible to send NMT commands in Powerlink?

Hi everyone,

I’m currently integrating two Bronkhorst devices over POWERLINK with a B&R PLC and I’m facing an issue related to CPU state transitions.

At machine startup (cold start), everything works fine. The devices are detected correctly and cyclic I/O data is exchanged without any problem.

However, if the CPU switches to SERV mode, or if I perform a WarmRestart, when the CPU goes back to RUN, the situation is the following:

  • Module OK = TRUE

  • Cyclic I/O data = all values remain at 0

So the POWERLINK nodes seem to be present and not in error, but no cyclic data is exchanged anymore.

After contacting Bronkhorst support, they suggested sending NMT commands to the devices.

My questions are:

  • Is it possible to send NMT commands manually from a B&R PLC in a POWERLINK network?

  • If yes, what is the correct way to do it (function block, library, configuration setting, etc.)?

  • Is there a recommended way to force the nodes back into Operational state after a WarmRestart?

Thanks in advance for your help.

Hello,

It is not possible to send NMT commands as a user - there is simply no library function available which offers NMT commands

All you could do is to send a SDO to the device if there is a register on this device which would then trigger a restart/Op-Preop switch or similar.

(This would be done via the AsEPL library)

Nevertheless I would rather say that the device is not according to specification if it does not send data without a restart or similar

best regards

Oliver

3 Likes

Hello Oliver,

Thank you for your feedback.

That was also my understanding after the research I’ve done — I couldn’t find any library or standard way to send NMT commands directly from the user application.

I will check with Bronkhorst whether it is possible to trigger the requested behavior via SDO, possibly using the AsEPL library as you mentioned.

Best regards,

Brendan

1 Like

You are welcome !

Probably you could then let us know the outcome

Thanks

best regards

Oliver

1 Like

Hi,

this should be done automatically by the MN (managing node) following the defined NMT state machine, and should never need any user interaction.

So I agree to Oliver and I think, that the CN (the slave) is in the wrong NMT state machine step (should be in CS_NMT_PREOPERATIONAL_1 after loss of frames of the MN → this is what’s initially happening, when MN is rebooted but CN not).

For the B&R controller acting as MN it makes no difference if it’s a warmstart (from SERV or RUN) or a power-off (which also leads to a warmstart that is executed after power-on) regarding to the boot-up sequence that is executed to configure the complete PL network and all CNs in there.

I’m not sure if the NMT state can be changed directly (don’t think so), but as I understood in the PL spec. there’s a standardized SDO for resetting a node:

Additionally, the actual state of the NMT state machine should be readable by a SDO:

EDIT:
forgot to post the values :wink: … all screenshots are out of the POWERLINK communication profile specification (accessible here: https://www.br-automation.com/en/technologies/powerlink/service-downloads/technical-documents/)


5 Likes

Hi,

Thank you very much for these valuable explanations.

Based on your feedback, I performed the following tests via SDO:

  • Reading object 0x1F8C – NMT_CrrNMTState_U8

  • Writing object 0x1F9E – NMT_ResetCmd_U8

1- Initial condition (after WarmRestart, I/O not working)

  • Module OK = TRUE

  • NMT_CrrNMTState_U8 = 2#1111_1101 → NMT_CE_OPERATIONAL

  • I/O = Null

So according to the object dictionary, the device reports CE_OPERATIONAL, even though no cyclic data is received.

2- After writing NMT_ResetCmd_U8 (whatever its value 0x28 / 0x29 / 0x2A / 0x2B)

The behavior is always the same:

  • Module OK = FALSE

  • NMT_CrrNMTState_U8 = 2#0101_1101 → NMT_CS_PREOPERATIONAL2

  • I/O = Null

After a short time, the device automatically returns to:

  • Module OK = TRUE

  • NMT_CrrNMTState_U8 = 2#1111_1101 → NMT_CE_OPERATIONAL

  • I/O = still Null

So the reset command does trigger a state transition, but it does not restore cyclic communication.

3- Reference state (when everything works correctly)

When the Bronkhorst device is in a normal operating condition:

  • Module OK = TRUE

  • NMT_CrrNMTState_U8 = 2#1111_1101 → NMT_CE_OPERATIONAL

  • I/O = OK

From my point of view, this is quite strange because:

  • The device reports CE_OPERATIONAL

  • The MN seems to complete the boot sequence

  • But no cyclic I/O frames are exchanged


Additionally, I tested sending a reset command while the module was in the normal reference state (I/O working correctly). After sending the command, the device falls back into the same “Initial condition” state described above (Module OK = TRUE, CE_OPERATIONAL, but I/O = Null).


Thanks to your valuable input, I now have solid technical information to provide to Bronkhorst. As Oliver already pointed out at the beginning, the device does not seem to behave according to the expected specification.

Best regards,

Hi,

I totally agree, this sounds very strange, for example like as the device does react on the SoC (start of cycle) commands but does not provide IO data anymore…
… please keep us updated, I think it’s very valuable for the whole Community (independent of where the cause is located, but more about how to determine and analyze such things).

Really appreciate it, thanks and good luck!

1 Like

A WireShark trace with or without X20ET8819 could be helpfull.