CAN TPDO configuration

5 years 3 months ago #29533456 by jking@foriauto.com
Hello,

I'm looking to program, over CANopen, the TPDOs to periodically send me data from the drive/motor such as speed, current draw, etc. I would like to do this without having to write a Microbasic script if possible. But I'm struggling to understand the CAN command structure used to set the User Var to the speed or current or what have you. Could you please give me an example of a CAN message to do this?

Thank you.

Please Log in or Create an account to join the conversation.

5 years 3 months ago - 5 years 3 months ago #29533457 by Gabriel_Isko
Replied by Gabriel_Isko on topic CAN TPDO configuration
We give an example of an SDO that reads the battery volts on the second half of page 185 of the User Manual . A full reference of SDOs can be found in Table 17-3: Motor Controllers Object Dictionary.

For a quick reference, here is the raw data of the for reading battery voltage taken from the User Manual Example. The User Manual explains how they are constructed in depth.

SDO for reading battery Volts on the controller at Node 1:
601h 8 48 0D 21 02 00 00 00 00
Note: There is a typo in the user manual regarding the data bytes. (it says 0A instead of 00)


Response from a controler that is 40.0 volts (signed integer 400, or 0x190) :
581h 8 48 0D 21 02 90 01 00 00

Please Log in or Create an account to join the conversation.

5 years 3 months ago - 5 years 3 months ago #29533459 by jking@foriauto.com
Sorry this didn't answer my question. I've been attempting to use the manual already before I got on here so I've seen the examples. I want to set up the TPDO user Var to send me queried data and the manual is a bit confusing for this. If I could see an example of the command to set the TPDO to read the battery voltage that would be helpful.

Also right now, looking at the RoboRun+ utility I can see that I have an UnderVoltage Fault on the drive (I expect this because I am on a test bench with 24V) so I attempted to query for the fault flags. On table 17-3 in the manual the index for the fault flags is 0x2112 but in Section 18, the Commands Reference, it is 0x6406 (the query for temperature also has 2 different indexes FYI 0x210F and 0x6403). It would be nice to know which reference is correct...

So I attempted both and received two different responses:
601h 4C 12 21 00 00 00 00 00
response:
581h 4F 12 21 00 04 00 00 08

601h 4C 06 64 00 00 00 00 00
response
581h 80 06 64 00 00 00 00 08

since the css = 8 for 0x6406 I've concluded that is an error so the correct ID is 0x2112. Can I trust the object dictionary to be more correct than the command references? or is there something else I'm missing?
thank you.

Please Log in or Create an account to join the conversation.

5 years 3 months ago #29533461 by Gabriel_Isko
Replied by Gabriel_Isko on topic CAN TPDO configuration
Sorry for the misunderstanding, I thought you were referring to TPDOs sent from your master can device, not from our controllers.

I believe Blake spoke to you on the phone, but just to confirm - there is currently no way to configure our controller's TPDOs. They are dedicated to sending out our user variables. You can set the user variables to any value within a microbasic script.

Please Log in or Create an account to join the conversation.

5 years 3 months ago #29533463 by jking@foriauto.com
Yes I spoke to Blake and ok I understand now. Thanks for getting back to me

Please Log in or Create an account to join the conversation.

Moderators: tonysantoni
Time to create page: 0.070 seconds