CANopenNode / CANopenEditor

CANopen Object Dictionary Editor
GNU General Public License v3.0
144 stars 64 forks source link

More than 3 TPDOs #41

Closed PascalGuthof closed 1 year ago

PascalGuthof commented 2 years ago

I have another problem/question. But this is better placed in a new issue. When I try to set up more than 3 TPDOs, it works in the editor. But the device makes an error when it tries to send this last PDO. As EMCY message comes "CO_EMC_CAN_OVERRUN" together with "CO_EM_EMERGENCY_BUFFER_FULL". As soon as I delete the TPDO, the configuration works as planned.

If anyone knows advice, I have uploaded the xdd files and the OD files.

3PDOs.xdd: https://filehorst.de/d/eazcilwe 4PDOs.xdd: https://filehorst.de/d/eiFsCFgu OD_3PDOs.c: https://filehorst.de/d/efxqekDa OD_3PDOs.h: https://filehorst.de/d/eBJdufbz OD_4PDOs.c: https://filehorst.de/d/enkgGsiJ OD_4PDOs.h: https://filehorst.de/d/eevfnJEb

CANopenNode commented 1 year ago

It seems, object dictionary is correct. There must be something else with the device. Can you provide some CAN messages?

PascalGuthof commented 1 year ago

Thanks for the reply. Yes I actually also think that the OD is correct. But the successful running of the program depends on that alone. Never mind. I have recorded a trace. The 4 PDOs have the ID 1A0, 2A0, 3A0 and 4A0. PDO 1-3 send numbers, PDO 4 is 0. The last message is the mentioned EMCY message. 4PDOs.txt

I hope this is helpful.

trojanobelix commented 1 year ago

4PDOsnew.xdd.txt Can you check this one, ignoring the warnings. (rename to xdd)

CANopenNode commented 1 year ago

This is certainly a strange behavior. There may be something wrong inside the driver. I think, this is not CANopenEditor issue.

  1. Fourth byte inside the emergency message is 0x14.
  2. inside CO_emergency.h: CO_EM_CAN_TX_OVERFLOW = 0x14U,
  3. follow CO_EM_CAN_TX_OVERFLOW inside CO_emergency.c, where errors from driver are verified.
  4. then follow CO_CAN_ERRTX_OVERFLOW inside the driver ...

Otherwise, wrongly configured object dictionary should not trigger CAN TX overflow.

trojanobelix commented 1 year ago

Should we move the issue to the CanOpenNode?

CANopenNode commented 1 year ago

Currently there is not enough information about the bug. Is it inside a driver? Custom driver or which?

Alrick-gr commented 1 year ago

Hello, I have the same bug and I can t find why, in CO_CANsend I have the error CO_ERROR_TX_OVERFLOW When i put a breakpoint before CO_process_TPDO, then it works and send all TPDOS, but the device will no longer receive any commands.

CANopenNode commented 1 year ago

Must be something with the driver. Please ask there.