12-03-2013 03:32 AM
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
12-03-2013 06:06 AM
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.
12-04-2013 03:34 AM
Thank you, would you mind converting it so I can view on LabVIEW 2009?
12-04-2013 04:40 AM
I can't go back that far. Here is a screen capture.