01-11-2011 10:31 AM
Hiya. I know the clock signal is decimated on the board in a couple places... is there a function in the linux c api to export a decimated signal? Can I choose any arbitrary decimation, or am I limited to the various timebases used on the card (an M series in my case)?
Thanks!
Solved! Go to Solution.
01-11-2011 04:38 PM
I'm assuming you're wanting to output this signal though a digital out/pfi line?
If so I know you can do this using DAQmxCreateCOPulseChanFreq and you can specify the exact frequency you want. This ends up consuming one of your onboard counters. The M-series manual talks about using an onboard frequency generator as well, although I I haven't found the function calls for that, if I do I'll post them.
01-11-2011 04:46 PM
Ok so I found this: http://digital.ni.com/public.nsf/allkb/0A3749841F401BC186256F90007C7F72
If you want to use the Frequency Generator instead of the Counter you need to do is specify: /Dev#/freqout instead of /Dev#/ctr#
This is slightly less flexible than using a counter as a frequency generator as there are on a few frequencies that the card is capable of generating.
01-11-2011 05:03 PM
Are you using DAQmx (either 8.0 or 8.0.1)? If so, you have a few options:
Counter Output: Available frequencies are {80 MHz, 20 MHz, 100 kHz, external} / {2 : 232-1}
Frequency Output: Available frequencies are {10 MHz, 100 kHz} / {1:16}
Export Clock from AI or AO Task: Available frequencies are {20 MHz, 100 kHz, external} / {2 : 232-1}, but going too fast will result in a hardware clocking error on the ADC or DAC.
On M Series DAQ there are two counters, a single Frequency Output, a single AI timing engine, and a single AO timing engine (if your board supports AO). Just pick whichever subsystem you have available. If you only need a constant 10 kHz then the Frequency Output is perfectly adequate, it's programmed similar to a Counter Output (reference Dev1/freqout instead of Dev1/ctr0).
If I recall correctly (I'm on Windows at the moment), on Linux the DAQmx ANSI C examples should be installed in \usr\local\natinst\nidaqmx\examples. There should be a continuous counter output example included.
Best Regards,
01-13-2011 08:50 AM
Thanks John and Stuart! I'm successfully using the counter output. Looks great!