Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Running two stepper motors together

It depends on your code. You can set the code to run them together or separately. If you have the code to run the motors together, you can easily run one at a time by setting the number of steps to zero on the second stepper.

Message 11 of 18
(3,476 Views)

Ok. Thank you. 🙂

0 Kudos
Message 12 of 18
(3,464 Views)

@frank1333 wrote:

@spica wrote:

Hi

 

Thank you so much. I will purchase another Arduino UNO to try again. Btw, in this case, the two motors will be running simultaneously, won't they? Can I control each individual motor seperately?

 

Cheers...Smiley Happy


Spica,

 

Which way did you wnt with? and how did that work out?

 

Regards,

Frank

Motion Marketplace


Hi Frank

 

I have already purchased another UNO. But I got busy with other projects and didn't get around to working on this motor control yet. But I will do it pretty soon. will keep you updated.

 

Thanks and regards Smiley Happy

 

0 Kudos
Message 13 of 18
(3,426 Views)

Hi Mudithadias

 

I bought another UNO and tried to run two motors together. But as soon as I connect the two USB cables to my PC, one of the motors will vibrate and rotate with jerks erratically for unknown reason. I have checked the device manager of my PC and the two Arduino are properly listed under Ports(COM and LPT). But it seems that LabVIEW could not differentiate the two boards when connected at the same time. Do you know how to connect both of them to my PC and make them function properly with a separate GUI controls? What type of modification in the LabVIEW program must I do other than copying the original example program to control them? 

 

Thank you very much.

 

To other experts, I'd appreciate if you all can join in the discussion as well.  

 

Regards.

 

0 Kudos
Message 14 of 18
(3,335 Views)

Hey,

Are the two stepper motors on two separate COM ports? Also I hope you upload the LIFA code on Arduino before runnig the program. Also the example code given is for one stepper. So for two steppers you need to have a copy of the same code (on the same VI) and change the COM ports accordingly in 'Arduino initialize'. I've attached a snapshot of the code I use at the begining of this thread.

0 Kudos
Message 15 of 18
(3,329 Views)

Hello mudithadias

 

Thanks a lot for your help. After some head scratching and tinkering, I found out that the root cause was due to the broken wire of the motor control pins.

 

Now, both motors are nice and quiet while being connected to my PC. But I am having some problems connecting to both arduinos simultaneously. I copied the origional program and tried to change the VISA Resource in "Arduino Init" but instead, when i clicked "run", I received an error prompt informing me of missing resources as follows:

 

Error -1073807343 occurred at VISA Clear in LabVIEW Interface for Arduino.lvlib:Init.vi->Arduino Stepper Motor_TWO.vi

Possible reason(s):

VISA: (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present in the system.

 

 

All these despite the device manager correctly identifying the two Arduino ports.

 

Thanks.

 


@mudithadias wrote:

Hey,

Are the two stepper motors on two separate COM ports? Also I hope you upload the LIFA code on Arduino before runnig the program. Also the example code given is for one stepper. So for two steppers you need to have a copy of the same code (on the same VI) and change the COM ports accordingly in 'Arduino initialize'. I've attached a snapshot of the code I use at the begining of this thread.


 

0 Kudos
Message 16 of 18
(3,281 Views)

Hey,

If your arduinos are properly connected, the COM ports should appear under the VISA resource in Arduino Int. When you upload the 'LIFA_base' on the Arduino software, does it say which com port the Arduino board is connected?

Also check if you've selected the correct board type and serial port in the Arduino software.

 

0 Kudos
Message 17 of 18
(3,252 Views)
Hello Mudithadias
Thanks a lot. I will go though the check list and try again. 🙂
 

mudithadias wrote:

Hey,

If your arduinos are properly connected, the COM ports should appear under the VISA resource in Arduino Int. When you upload the 'LIFA_base' on the Arduino software, does it say which com port the Arduino board is connected?

Also check if you've selected the correct board type and serial port in the Arduino software.

 


 

0 Kudos
Message 18 of 18
(3,234 Views)