Ask Your Question
0

How do I do the PDO mapping in EDS/DCF files?

asked 2019-09-10 12:12:00 -0500

Nochika gravatar image

updated 2019-09-12 12:12:26 -0500

Hi,

I have some questions regarding how to configure ros_canopen. Moreover, I’m willing to write a tutorial on ROS Wiki of this package based in my experience since there is none. The only step-by-step post I’ve found is the following. My question is regarding step 3:

“3. Prepare EDS/DCF, take special care for the PDO mapping, use transmission type 1 (every sync) ”

In this step, I just need to change PDOmapping=0 to PDOmapping=1 of each object in the eds file? Here is my eds file. What about the “Drive operation modes" in this webpage? What are those? And do I have to use them to control my motor controller?

Best,

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-09-11 10:20:18 -0500

Mathias Lüdtke gravatar image

updated 2019-09-12 09:02:53 -0500

Moreover, I’m willing to write a tutorial on ROS Wiki of this package based in my experience since there is none.

This would be highly appreciated!

In this step, I just need to change PDOmapping=0 to PDOmapping=1 of each object in the eds file?

No. Please do not touch the PDOmapping flags. They just reflect the device's support for mapping the respective object. ros_canopen uses this flag for config validation only.

The actually PDO mapping is configured in the ParameterValues of the objects 1600 to 17FF (RPDO of the device, sent by ros_canopen) and 1A00 to 1BFF (TPDO of the device, read by ros_canopen). (https://www.can-cia.org/can-knowledge...)

For each item, you have to specify the number of entries (sub0) and the mapping values (sub1 to subN), which encode the target object and its size. The canopen_402 wiki lists these values for common objects. An example can be found here.

In general I would recommend to use a tool like CANeds to configure the PDO mapping and to check the file for errors.

Special care must be taken, because ros_canopen assumes that the device uses the mapping as encoded in DefaultValue and sometimes these values are wrong. On the other hand, if you are lucky, the defaults already fit your needs and you don't have to change anything.

What about the “Drive operation modes" in this webpage? What are those?

CANopen 402 supports different modes for their control loops. The vary in input types (position, velocity), velocity profiles (ramps) and data managements (set points, cyclic). The supported operation modes are reflected (bit-wise) in object 6502, which is mandatory for CANopen 402 drives, if I am not mistaken.

And do I have to use them to control my motor controller?

Yes, otherwise the motor will not run.

edit flag offensive delete link more

Comments

The EDS I found on internet for the motor controller I have doesn’t have the communication and the mapping parameters. Furthermore, it doesn’t even have defined the “Drive operation modes” listed here. it only has the mandatory, optional and manufacturer objects. I'm guessing I need those parameters and dictionary objects plus the mapping to the PDOs to be able to use ros_canopen with my motor controller. I wonder if I can use CANeds to add those missing configurations and dictionary objects.

Nochika gravatar imageNochika ( 2019-09-12 03:28:18 -0500 )edit

I cannot access your EDS via codeshare. Please consider uploading it to Github Gist or alike.

Mathias Lüdtke gravatar imageMathias Lüdtke ( 2019-09-12 09:07:21 -0500 )edit

This EDS does not seem to be complete. Or the manufacturer does not support PDOs and CANopen 402.

Mathias Lüdtke gravatar imageMathias Lüdtke ( 2019-09-12 11:37:09 -0500 )edit

Ok, I updated my question with the EDS file in pastebin since I couldn’t update the comment. Well, at least I know that the motor controller supports CANopen. I’m not sure if it supports CiA 402. Unfortunately, the manufacturer hasn’t given me much information. Let’s say that supports CANopen but it doesn’t support CiA 402. Could I still use some packages of ros_canopen to send commands to the motor controller using the dictionary objects available in the EDS? Like for example, socketcan_bridge, socketcan_interface and canopen_motor_node?

Nochika gravatar imageNochika ( 2019-09-12 16:18:56 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-09-10 12:12:00 -0500

Seen: 63 times

Last updated: Sep 12