08-14-2012 11:14 AM
I am in need of some suggestions . I have a sampling block with five ports. I am moving between ports using a stepper motors for the upward and downward motion. At present I can move the injector block just fine. However I would like to know how to move between ports and then reset to the original position So A to B , B to C , C to D , D to E and then E back to A). The injector block moves when the sample vial is full ( I think I can figure this part out on my own). I am using NI-DAQmx functions.
08-15-2012 08:39 AM
What NI hardware are you using to interface with the stepper motors?
08-15-2012 10:47 AM
NI USB-6008
08-15-2012
10:52 AM
- last edited on
02-11-2025
10:11 AM
by
Content Cleaner
Sounds like you need State Machine.
08-15-2012 01:21 PM
I know but I guess a better question is how do i set up the state machine.
08-15-2012 01:32 PM
You should find it in "New..." under Templates.
Are you using a motor driver between your 6008 and your motor? Do you need to drive much current into it? Some require current that far exceeds the 6008, but others only need a control signal and have a separate power line.
08-15-2012 01:47 PM
I am not sure if you referred to the link I posted. It has the details about how to set up a state machine and there is an example code attached at the end of it. Also, I have attached a simpler example that is close to your application.
08-15-2012 05:22 PM
Sorry I did not realize you had a link in your reply. Anyway I am using this driver.
08-17-2012
04:35 PM
- last edited on
02-11-2025
10:17 AM
by
Content Cleaner
Ok – I was curious as to whether you were trying to drive the motor directly. Your driver should be able to accept a signal from just about any one of our digital cards.
There is a complication with using the 6008 for this kind of motor control, however. It’s just that it wasn’t designed for this sort of application. With the output being software timed, you would have 5ms of jitter in your timing of your pulses (as a rough lower bound, depending on the computer you are running this on, since its software timed). Depending on how fast you plan to run your motor, it may not be a big deal. But you most likely won’t be able to get pulses any faster than the 100 to 150 Hz range. And if you do, the jitter may put the steps
If you are interested in a card that is designed for motor control, you might consider looking at the 73xx line. The 733x, 734x, and 735x are the different models, and the last digit is the number of axes the controller supports, such as the 7332. The motion cards will also take care of all of the PID control for you, which will be much more cumbersome if you choose to implement it yourself. If you don’t want to go all the way to one of these, I would at least recommend something with hardware timed digital output, such as the 6218.
08-17-2012 04:53 PM
Thanks Andy, I will look into the cards you referenced. My main goal at the moment is to optimize the system I have and use that as a pivot to get approved for more efficient hardware.