Seeking help with CANOpen and using TPDO to report values

3 months 3 weeks ago - 3 months 3 weeks ago #29536290 by mpthompson
Our robots are using RoboteQ SBLM2360T BLDC controllers with the v2.0 firmware.

I've been using basic CANOpen SDO commands to control two BLDC motors, but recently we have a need for more sophisticated operation from the RoboteQ. Ideally, we would like to start using TPDO to report motor encoder and status without polling for these values. Following the information in the CAN Networking Manual, I'm following the example in the section of the Transmit Process Data Object.
  1. Destroy TPDO1 by setting the invalid bit of COB-ID (0x1800_01):
    [Id:601] 23 00 18 01 81 01 00 C0
  2. Disable TPDO1 mapping by setting number of entries mapping parameter to 0 (0x1A00_00).
    [Id:601] 2F 00 1A 00 00 00 00 00
  3. Modify TPDO1 mapping by changing (0x1A00_01-02):
    • 0x2100_01: Motor amps for channel 1 (U16).
    [Id:601] 23 00 1A 01 10 01 00 21
    • 0x2100_02: Motor amps for channel 2 (U16).
    [Id:601] 23 00 1A 02 10 02 00 21
    • 0x210D_01: Internal voltage (U16).
    [Id:601] 23 00 1A 03 10 01 0D 21
    • 0x210F_01: MCU temperature (U8).
    [Id:601] 23 00 1A 04 08 01 0F 21
  4. Enable TPDO1 mapping by setting number of entries mapping parameter to 04 (0x1A00_00).
    [Id:601] 2F 00 1A 00 04 00 00 00
  5. Create TPDO1 by setting the invalid bit of COB-ID to 0 (0x1800_01).
    [Id:601] 23 00 18 01 81 01 00 40
The steps above should configure TPDO1 to return 4 values (Motor current, voltage and MCU temperature).  After each command the response is a success.

I then send the following commands to get the data flowing:
  1. Set the CANOpen TPDO send rate to 10 milliseconds
    ^CTPS 1 10
  2. Set the CANOpen TPDO Transmission type to asynchronous
    ^CTT 1 255
  3. Set the CANOpen heartbeat to 200 milliseconds (found this to be needed to get data flowing)
    ^CHB 200
  4. Set the NMT operation state (also needed to get the TPDO data flowing)
    [Id:000] 01 01
With following done above, I can see a TPDO packet every 10 milliseconds and the heartbeat packet every 200 milliseconds on the CAN bus.

However, the TPDO packets every 10 milliseconds are all zeros as shown below.  No amp values, no voltage values and no MCU temperature.

[Id:181] 00 00 00 00 00 00 00 00 

The heartbeats every 200 milliseconds look correct at:

[Id:701] 05

I feel I'm very close to getting things working, but missing an essential piece of information to get the TPDO to report the desired values.

Below is the CAN configuration after the above initialization as viewed by RoboRun+


Any help would be greatly appreciated.

Thanks,

Mike Thompson

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

3 months 3 weeks ago #29536291 by mpthompson
With the help of the a person in RoboteQ support I found that the use of the following two commands reset the TPDO1 mapping back to the defaults.
  1. Set the CANOpen TPDO send rate to 10 milliseconds
    ^CTPS 1 10
  2. Set the CANOpen TPDO Transmission type to asynchronous
    ^CTT 1 255
Therefore, these must be done before the TPDO1 remapping is performed.

Once the change to the sequence of operations was made remapping TPDO1 worked as intended.

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

Moderators: tonysantoni
Time to create page: 0.070 seconds