Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Control multi dynamixel AX-12 with LabView

I need help controlling 2nd Dynamixel AX-12 from LabView based on "Dynamixel Sync Write Example" code.

 

We used one USB2 dynamixel to control one dynamixel ax-12 from Labview. It worked well.

 

Recently I added another ax-12. The two ax-12 are in series. USB2dynamixel is set to TTL. The Labview code generated dual control front panal automatically. Controlling one unit is good. But controlling the 2nd ax-12 is a problem:

 

The ID seems incorrect according to USB2dynamixel chart: the unit next to the USB should be #0, the one in series with #0 should be #1 and so on. On my setup, I couldn't find a correct ID associated with the unit next to the USB. The one in series with it is #1. Only #1 responds correctly to front panel control.

 

When click "run" 1st time ax-12 #1 will rotate according to set positions. click "run" again, the other ax-12 will rotate according to #1's set positions, not its own positions. The other unit's ID can be set any number, and results are the same.

 

Has anyone used the same LabView code to control more than one ax-12 with USB2Dynamixel? Anything I have missed? Appreciate your inputs.

 

 

 

 

Download All
0 Kudos
Message 1 of 6
(9,120 Views)

Hi Anne Z,

 

Have you read through and attempted to use the code located on the Robotis Dynamixel Actuators in LabVIEW DevZone?  I notice that your code is very similar, but lacks the while loop from the example.  If you input the while loop, does it perform as suspected or does it still only move one motor?

0 Kudos
Message 2 of 6
(9,095 Views)

Thanks, Drew

 

You are correct that the code is from NI example less while loop. I did repeated runs, results are the same as two single runs.

 

I just traced the executions and recorded header and checksum parameters for ID #1 and #2 for debugging. I placed two sets of positions to separate ID#1 and ID #2:

 

         Control      Dial      Position      Manual pos

ID#1      0           off         60              160

ID#2      1           on        100             200

 

There is only one set of header and checksum value being passed in the program. That might explain only one set of position (ID#1) was set, the other one (ID#2) was ignored.

 

Does that make sense?

 

Anne

0 Kudos
Message 3 of 6
(9,088 Views)

Hi Anne,

 

I was looking through the manual for the motors I believe you're using (located here).  Have you compared the generated string with what you think the proper string should be? I don't have the hardware to duplicate your setup, but I deleted the VISA commands and put the while loop around the rest of the code and was able to notice the Dynamixel Serial data changing when I changed either of the two controls, so it seems that it's updating the string properly. Again, I'm unfamiliar with this hardware so this may be a silly question, but are they wired together correctly?

0 Kudos
Message 4 of 6
(9,064 Views)

Thanks, Drew

 

The problem is finally solved. Identical ID was the cause. Actuator manufacture pre-sets all units' ID to 1, which explained that only positions set for ID #1 was executed.

 

 

0 Kudos
Message 5 of 6
(9,033 Views)

Excellent!  I'm glad to hear you got it working, and thank you for letting us know what the issue was.

0 Kudos
Message 6 of 6
(9,031 Views)