Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Small Servo Control with NI USB-6008

I am trying to use a USB-6008 for control of a small off the shelf Futaba servo using LabView 8.5.  I am extremely new to LabView, and haven't been able to make much sense of the help I have found so far.  The basic idea is just to have LabView move the servo from its neutral position to 90 degree deflection and back to neutral indefinately until I turn the system off.  I understand PWM, but am having trouble coding the software.  If anyone can point me in the right direction or has generated a code that will perform this task and would not mind letting me use it would be greatly appreciated! 
0 Kudos
Message 1 of 7
(6,179 Views)
Servos require pulses be sent to them at approximately 50 Hz rate.  The pulse width determines the servo angle.  1 msec = 0 degrees, 2 msec = its full rotation typically.  Since the NI USB-6008 does not have hardware timed digital or analog output and does not have counter outputs, you can only do software timed pulse generation.  I do not think LabVIEW will have precise enough control of software delays to generate pulses that vary between 1 and 2 msec.
0 Kudos
Message 2 of 7
(6,170 Views)
Thanks for the insight Steve!
0 Kudos
Message 3 of 7
(6,167 Views)

Hey Csossi,

 

The USB-6221 supports hardware timed DIO and will be able to control this servo.  Also, if you use a counter to control the servo, the USB-6501 will work as well.  If you just have one servo to control, the 6501 is going to be the cheapest option; if you have multiple servos to control, the 6221 might be a better choice.

Message Edited by Knights Who Say NI on 11-19-2008 03:02 PM
-John Sullivan
Problem Solver
0 Kudos
Message 4 of 7
(6,161 Views)
Thank you John!
0 Kudos
Message 5 of 7
(6,136 Views)
The servo bank I have set up contains six servos, if I want all six servos to perform the same operation, can the 6501 still be used?  Thanks!
0 Kudos
Message 6 of 7
(6,108 Views)

Hey Csossi,

 

Earlier I recommended using the 6501's counter to interface with your servo.  Unfortunately, this will not work due to the fact that we only have access to the counter source input line; we need access to the counter output line.  Sorry for this mistake.  For best results, I would still recommend the 6221 because it has hardware timed digital I/O.  We could also use the 6210's counter lines, but the hardware timed DIO of the 6221 is a much easier route.  

 

Since both of our products are rather expensive, as an alternative I would recommend using a serial to Servo PWM controller.  These can cost less than 50 dollars and can control multiple servos.  We can use basic serial read/write commands in LabVIEW to set the motor position.  This requires no NI DAQ cards and uses the PC's serial port.  Our devices are more than capable of controlling your servos, but a hard-wired servo controller will get the same job done for less money.  

-John Sullivan
Problem Solver
0 Kudos
Message 7 of 7
(6,088 Views)