Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

simultaneous motor control

Hi everyone,

 

I am building a robot with tank treads that has two motors: one for the left side and one for the right.  I am using an arduino, xbee communication, and this motor driver. I would like for both motors to turn on at the exact same time, but there is a slight delay in one of them, causing the robot to not drive straight.  I am not sure if this issue is due to labview, the xbee, the motor driver, or arduino.  I have attached a copy of my vi.  Do you guys have any idea as to why this is happening?

 

Thanks,

 

mvilla

0 Kudos
Message 1 of 4
(5,797 Views)

The Arduino VI's are not re-entrant, so only one can be communicating at a time.  You have them wired for "parallel" operation, but that will never happen.  Each one will run in an undetermined order.  Here is a quick example of how I would do it.  Write to the port instead of the pin.  I am not sure if I have the index numbers correct for the Replace Array Subsets.  Not sure if the Arduino pins are zero or one based.

Message 2 of 4
(5,793 Views)

Thank you, would you mind converting it so I can view on LabVIEW 2009?

0 Kudos
Message 3 of 4
(5,780 Views)

I can't go back that far.  Here is a screen capture.

0 Kudos
Message 4 of 4
(5,778 Views)