canopen icon indicating copy to clipboard operation
canopen copied to clipboard

TPDO for local node

Open mindlesstaucher opened this issue 3 years ago • 2 comments

Hi Christian,

I try to set up a test environment where I have to simulate several canopen sensors. So I thought I might give your canopen implementation a try. I manged to add 2 sensors as local nodes and my device under test is reading some sdo from it. Now these nodes have to tramsmit a cyclic pdo. Is there a way to do that?

Thanks for helping, Marco

By the way: great work!

mindlesstaucher avatar Apr 14 '21 12:04 mindlesstaucher

Hi @mindlesstaucher,

Have you tried to call the transmit()

Exemple:

  # the pdo object that holds the 0x60FF object, and the object it self
  self.rpdo_pointers[0x60FF].raw = self.m2counts(value)
  # transmite the pdo
  self.rpdo_pointers[0x60FF].pdo_parent.transmit()

Note: the code has some bits of code out of the scope of the canopen API

af-silva avatar Apr 20 '21 11:04 af-silva

Hi @mindlesstaucher ,

I try to do someting similar as you, but cannot even get to the point where the local node responds to the first SDO from the master asking for device type (0x1000). I guess I have missed someting fundametal in how to initialize a local slave node. Do you have any example code you can share to get me going?

Rgds Gunnar

gunstr avatar Sep 28 '21 20:09 gunstr