Discussion:
Which DAQ to use to generate 8 PWM signals?
(too old to reply)
Marek
2008-07-11 12:10:08 UTC
Permalink
My application requires 8 PWM signals (up to 20KHz) to be used to control my hardware.
 
Which DAQ should I buy from NI that would be able to generate 8 PWM signals?
 
How do I generate a PWM signal using the DAQ?
Kevin Price
2008-07-11 14:10:11 UTC
Permalink
Offhand, I'd think the <a href="http://sine.ni.com/nips/cds/view/p/lang/en/nid/1123" target="_blank">PCI-6602</a> might be just the ticket.&nbsp; It's got 8 counters and you can control your PWM freqs and duty cycles independently and update them&nbsp;on-the-fly without stopping.
You can check the shipping examples for "generating digital pulses" or search the site for stuff like <a href="http://zone.ni.com/devzone/cda/tut/p/id/2991" target="_blank">this</a> or <a href="http://zone.ni.com/devzone/cda/epd/p/id/5493" target="_blank">this</a>.
-Kevin P.
Marek
2008-07-11 14:10:12 UTC
Permalink
I'm not using LabView.&nbsp; I'm either going to do it directly though Matlab/Simulink if it supports timers/counters and if not, then I'll write my own C++ code.&nbsp; Is there any reference code that shows how to control the timers through C++ available?
Steve_B
2008-07-14 21:10:11 UTC
Permalink
Hi Marek,
Are you going to generate continuous pulses or were you planning on generating a finite pulse train? The finite pulse train requires 2 counters for each pulse train but a continuous pulse train can be done with 1 counter per pulse train. I would recommend that you look at the ANSI C examples as a guide for programming the device in C++. I have also included a link to a KnowledgeBase that discusses the location of the examples. I would also recommend that you reference the NI-DAQmx C Reference Help that can be found by going to Start&gt;&gt;Programs&gt;&gt;National Instruments&gt;&gt;NI-DAQ&gt;&gt;NI-DAQmx C Reference Help. This is a very useful guide for programming your DAQ device in a C language.
Location of ANSI C NI-DAQmx Shipping Examples and DAQmx Library File for Windows<a href="http://digital.ni.com/public.nsf/allkb/FB26BDA52FFFD4EE86257124005C36C3?OpenDocument" target="_blank">http://digital.ni.com/public.nsf/allkb/FB26BDA52FFFD4EE86257124005C36C3?OpenDocument</a>
Marek
2008-07-14 21:40:07 UTC
Permalink
I would like to generate a continous pulse train that I can vary the frequency of while it is running.
&nbsp;
Kevin Price
2008-07-15 18:10:08 UTC
Permalink
Can't help with any C programming syntax, but can verify that the 6602 board and the free DAQmx driver definitely *do* provide you the ability to generate 8 independent continuous TTL PWM signals, and you can vary the freq / duty cycle on the fly without stopping.
-Kevin P.

Loading...