07-25-2023 04:55 PM
Hello,
I am new to LabView and trying to create an application that will control two servos simultaneously. I have found plenty of solutions online using Arudino as a mediator but I want to solely use NI USB-6009 DAQ as the control. I would really appreciate it if someone could help me out with a solution. I have linked the servo information below.
Thanks
Solved! Go to Solution.
07-25-2023 08:34 PM
USB-6009 may not have enough counters to generate the PWM signals to control the servos.
On the other hand, use the AO channels to drive the signal to the servos and it would work. All that you have to do is generate the PWM signal 20ms pulse cycle, 0.5-2.0ms high time using the AO channels.
07-26-2023 12:50 AM
Hi,
@santo_13 wrote:
USB-6009 may not have enough counters to generate the PWM signals to control the servos.
On the other hand, use the AO channels to drive the signal to the servos and it would work. All that you have to do is generate the PWM signal 20ms pulse cycle, 0.5-2.0ms high time using the AO channels.
The USB6009 does NOT support hardware-timed AO channels, all it brings are software-timed AO (at max 150Hz). So the approach to simulate PWM signals using AO pins with 20ms cycle/0.5ms ON is doomed to fail…
One of the more recent USB boxes (USB6002?) will fit slightly better for that task!
07-27-2023 02:05 PM
@GerdW wrote:
Hi,
@santo_13 wrote:
USB-6009 may not have enough counters to generate the PWM signals to control the servos.
On the other hand, use the AO channels to drive the signal to the servos and it would work. All that you have to do is generate the PWM signal 20ms pulse cycle, 0.5-2.0ms high time using the AO channels.
The USB6009 does NOT support hardware-timed AO channels, all it brings are software-timed AO (at max 150Hz). So the approach to simulate PWM signals using AO pins with 20ms cycle/0.5ms ON is doomed to fail…
One of the more recent USB boxes (USB6002?) will fit slightly better for that task!
Good catch, did not realize 6009 was very simple in feature. Better easier option would be Servo controller from Adafruit or Pololu with USB control.
07-27-2023 02:06 PM
Thank you so much for the reply and information Santosh,
I want to implement your solution but I am not sure how to go about creating the application to control the position of a servo. I am new to LabView so I would really appreciate it if you could write me a sample code for just like one servo using the solution you described.
Thanks again
07-27-2023 02:14 PM
Hi GerdW,
Thank you for your reply. Is there any possible way I can control the servos with the USB 6009 since this is the only DAQ I currently have access to? If not, what other NI options (similar to your recommendation of USB 6002) would you recommend me using.
Thanks a lot.