Electrical – CANopen transmission to multiple IDs at the same time

canmicrocontrollerrobotics

I am asking myself, whether it is possible that I simultaneously send multiple signals to my robot via CANopen.


Edit:

Enter image description here

I am trying to build a CANopen connection with my robot. I can turn the motor up by sending a message (8A 00 0A 00 00 00 00 FB) to ID 181h. Now, I am trying to control the movement of the robot via CANopen. However, it does not repond at all.

Here is what I did:

I first move the robot with my control module. Since I have to press down two buttons at the same time to move the robot, I checked how the data values of each IDs changed for each button press.

For example, when I press down the button A, the data value of ID 181h changed like 00 00 00 00 00 00 00 FB -> 00 00 00 FE 00 00 00 FB. When I press down the button B, the data value of ID 301h changed like 00 00 00 00 00 00 00 FB -> 00 00 00 00 32 00 00 FB.

So now I tried to move the robot via the CAN connection as the one in the picture. I first wrote "00 00 00 FE 00 00 00 FB" to ID 181h and after that I wrote "00 00 00 00 32 00 00 FB" to ID 301h.

However, there isn't any response at whatsoever. Am I missing something?


EDIT:

Enter image description here

Pressing button A changes the value of 181h to 0A 00 09 00 00 00 00 FB and pressing down button B changes 281h to 00 00 00 FA 6F BD 00 FB. So I sent those messages to the TPDOs 181h and 281h, respectively. However, still no response.

Best Answer

In order to succeed with this project, you need to know both how CANopen works and how the specific device works. For example, if you are able to read Object Dictionary item 1000h, it will reveal which device profile the robot is using.

All data in CANopen is sent through PDOs (process data objects). Messages coming out of a CANopen node are called TPDO (transmit PDO) and messages coming in to a node are called RPDO (receive PDO). This does of course mean that one node's TPDO must be another node's RPDO.

Some insights on reverse-engineering CANopen:

  • 181h is the standard CAN id for the first TPDO of node 1.
  • 301h is the standard CAN id for the second RPDO of node 1.

This is in accordance to for example the most common device profile DS401 "generic I/O module", but may match other device profiles too.

Notably though, it is unlikely that 181 and 301 have similar functionality. I would expect one of them to be incoming data and the other to be outgoing data.

If this is device profile DS401, then 181h will be digital data going in one direction, while 301h will be analog data going in the other direction. It is unlikely that these 2 correspond to 2 different buttons (digital). In device profiles like DS401, it is specified how data should be stored. In a generic CANopen application, this isn't specified, but data could be mapped into PDOs in custom ways.

Thus what you describe doesn't seem to make any sense. It is also unclear why these two PDOs have value 0xFB in the end. This is also some kind of data - checksums are handled by hardware.