04-29-2013 11:41 AM
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
04-29-2013 11:56 AM
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.
04-30-2013 03:56 AM
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.
04-30-2013 05:58 AM
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).
04-30-2013 07:10 AM
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.
04-30-2013 09:53 AM - edited 04-30-2013 09:57 AM
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.
04-30-2013 10:18 AM
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