LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to control a stepper motor via digital output

Hi everyone,

 

I know there are plenty of threads on the subject, but everything I am trying fails...

 

I have a usb 6008 and cannot get my motor to move step by step like once every 5seconds. I have attached my code which I think should just do that but it doesn't and I have no clue why. Could somebody enlighten me?

 

Thanks alot

0 Kudos
Message 1 of 7
(4,275 Views)

Why are you using the "Is Global" boolean property node for your digital output?  For a stepper motor, I would think you'd want to toggle a boolean value on and off every iteration.

 

Be sure to wire up your error wires as well.

0 Kudos
Message 2 of 7
(4,272 Views)

Hi,

 

Thanks for the reply. The reason is because I have been trying anything and everything and this was the last thing I tried. I  replaced it with a boolean value  and it still doesn't work, not even the first step.

0 Kudos
Message 3 of 7
(4,245 Views)

I seriously doubt that the digital outputs of the USB-6008 can drive enough current to control a stepper motor.  You will likely need a digital buffer of some sort to get some more current.

 

Measure the voltage coming out of the 6008 without a motor to make sure your program is working properly.  If you then hook up the motor, I'm guessing the output voltage will be really low (due to too much current draw).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(4,235 Views)

Hi,

 

I actually just solved my problem, see attached vi. I don't understand why everyone says USB6008 can't control a stepper motor, because it does, and quite well, at least for my needs.

 

Thanks for the help anyhow.

 

0 Kudos
Message 5 of 7
(4,230 Views)

So then you finally did what I told you and it happened to work.

 

Not "everyone says USB6008 can't control a stepper motor".  Crossrulz was correct to doubt that it could work.  Whether it works or not depends on the current requirements of your motor and whether the USB-6008 can supply that current.  For your particular situation, it apparently can.

 

(You still should wire up your error wires.)

 

Attached is a VI snippet of how to simplify the code further.

 

0 Kudos
Message 6 of 7
(4,218 Views)

Hi,

 

Once again thanks for the help. Actually, the main problem was that I used a global channel instead of a physical channel (so not just the boolean condition). The reason for that is that I didn't manage to get my digital output in physical channels (I still don't as a matter of fact), so I just copied paste the list of physical channel from another code and that did it.

 

Anyway, thanks for the simplified version of the code, I am still new to labview so my code is definitely not elegant. As for the errors, this was just a test vi so that's why they weren't wired but now that I can implement this piece of code in the final one, I will (promise!).

 

Thanks again for the help

0 Kudos
Message 7 of 7
(4,207 Views)