POST No. 2407782
Torque Mode path following help
2020-03-20 07:25:45 Aportan


I am working on validating my equation of motion for a project and want to do this by having my L54-50-S500-R follow a torque curve (at the moment I am using the DYNAMIXEL Wizard 2.0, for my input software, though I am open to trying something new).  I was planning on measuring the final angle to see whether or not my equation works.  So my question is, does anyone know how to get my motor to follow this torque path?  I have attached an image.  I believe I can do this by doing something with the packets in the torque control mode, but am unsure how to approach it.

2020-03-20 07:25:45
2020-03-20 13:28:18 Andrew

Hey!  Thank you for getting back to me on this!  Looking at the user manual for the the particular motor, I have the general equation for getting the mA output for a given torque (Motor Current = Goal_Torque*33000/2048)  so that will give me the point by point current for each given torque (as I generated the curve in matlab I can get all the x-y coordinates).  Just entering them in one Goal_Torque at a time manually wouldnt give me the appropriate kinematics, and it would take forever (as the curve has 200+ points).  Is it possible to give the system the array of torques and have the motor follow the path sequentially? So the goal would be, I enter in the array of points, and over the desired time span, the motor will move following the torque curve.

2020-03-20 13:28:18
2020-03-20 15:57:48 Will Son


DYNAMIXEL is basically running based on the Control Table value. 

It reads the Control Table values and use them to operate the core motor while iterating its internal control algorithm.

This process is repeating quite fast (much faster than 1Khz) so when we need to follow a certain trajectory(in case of Position Control), we set our embedded controller(or PC) control frequency to 8~10 msec and keep sending the array of data to DYNAMIXEL.

2020-03-20 15:57:48
2020-03-23 09:08:48 Will Son


Software library can differ by your controller, but when controlling DYNAMIXEL from PC via U2D2, I'd recommend using DYNAMIXEL SDK in order to create such function.

You can refer to cpp_read_write_protocol_2_0 example.

In the example, it writes two different Goal Position so that DYNAMIXEL can repeat between them.

You'll need to modify the address that the example reads and writes from Goal Position & Present Position to Goal Torque & Present Current.

Notice that Position data is 4 byte while Torque & Current data is 2 byte.

This means you need to use read2ByteTxRx and write2ByteTxRx instead of *4ByteTxRx functions as well as using int16_t type of data to send and receive Torque values.

2020-03-23 09:08:48
2020-03-20 09:35:33 Will Son


In order to run DYNAMIXEL as Torque Control Mode, you can use Goal Torque value to roughly calculate the required torque based on the performance graph.

By reading the Current value on Y axis from the performance graph at a certain Torque on X asix, you can get an estimated Goal Torque value(The unit of Goal Torque for L54-50-S500-R is 16.11328[mA])

Unfortunately, the conversion constant for Torque to Current is not available.

2020-03-20 09:35:33
2020-03-21 02:16:16 Andrew

Hi Willson,  thank you for your response!  Okay, so it sounds like that the motor can do what I want it to.  So, how do I do it?  is there an import function someplace in the DYNAMIXEL Wizard 2.0, and if there is do you know how to interact with it, so that I can input my torques all together?

2020-03-21 02:16:16
2020-03-23 10:22:47 Andrew

Hi Willson! 

Thank you!  I will give this a shot and let you know how it goes!



2020-03-23 10:22:47
웹에디터 시작 웹 에디터 끝