LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sampling block

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.

0 Kudos
Message 1 of 11
(3,743 Views)

What NI hardware are you using to interface with the stepper motors?  

0 Kudos
Message 2 of 11
(3,710 Views)

NI USB-6008

0 Kudos
Message 3 of 11
(3,705 Views)

Sounds like you need State Machine.



------------------------------------------------------------------------------------------------------
Kudos are (always) welcome for the good post. 🙂
0 Kudos
Message 4 of 11
(3,700 Views)

I know but I guess a better question is how do i set up the state machine.

0 Kudos
Message 5 of 11
(3,694 Views)

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.

0 Kudos
Message 6 of 11
(3,688 Views)

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. 



------------------------------------------------------------------------------------------------------
Kudos are (always) welcome for the good post. 🙂
Download All
0 Kudos
Message 7 of 11
(3,680 Views)

Sorry I did not realize you had a link in your reply. Anyway I am using this driver.

0 Kudos
Message 8 of 11
(3,663 Views)

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.  

Message 9 of 11
(3,643 Views)

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.

0 Kudos
Message 10 of 11
(3,638 Views)