canopen icon indicating copy to clipboard operation
canopen copied to clipboard

How to capture sent message

Open blairfancy opened this issue 3 years ago • 4 comments

Hi any way to capture sent message for file logging purpose? With can library it is easy has can message are clear but in canopen has we manipulate only object we do not have access to real can message sent. What i do in can is to put all sent and received message to a queue object for further traitement. Can we do the same in canopen?

hope my question is clear enough.

blairfancy avatar Dec 01 '20 07:12 blairfancy

Which CAN interface are you using? Some of them support receive_own_messages and in combination with a listener you could be able to log all messages.

christiansandberg avatar Dec 01 '20 20:12 christiansandberg

I use Ixxat USB can interface. 'receive_own_messages = True' seems usable on this interface.

blairfancy avatar Dec 02 '20 13:12 blairfancy

Then you should be able to add receive_own_messages=True to network.connect(), then add a callback function to network.listeners. Let me know if you need more guidance.

christiansandberg avatar Dec 02 '20 19:12 christiansandberg

Ok after several attempt i got SDO tx message in my log but unfortunately it does not work with NMT messages.

blairfancy avatar Dec 04 '20 14:12 blairfancy