Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

cdaq-9185 external clock from NI-9402 channel

We have a cDaq-9185 chassis with a NI-9402 and a NI-9223 module plugged in. We would like to use an external clock (for example from a function generator (10MHz (which is too high))) which we connect to a channel from NI-9402. This doesn't work and I can also not use the "TimeBase divider" function in the "Timing" vi from the cDaq. I attached a version of my vi,which works, when I use "onboard clock".

How can I use an external clock using NI-9402 channel as source?

0 Kudos
Message 1 of 2
(2,137 Views)

Hi Jenny,

 

I had a look at your code and tested it with a simulated device. It works fine for me if I use a PFI as a timebase. What kind of error do you see when running the VI?
One thing I saw was, that you use the PFi as Sampleclock-Source, as well as Timebase-Source. This seems to not cause an error with external clocks, but its still not really the way to got. Consider use the DAQmx Timing.vi and set the properties there, you just have to configure the clock and pass a (big enough, must not be exact) Samplerate-Value to the VI. Maybe your error resides here, you pass 1000Hz to the Propertynode, this means DAQmx will reserve either 2000 or 10000 Samples as a buffersize. If you run a samplerate thats way higher than 1kHz you may see buffer overflow errors. Just set the samplerate-input to the maximum clock rate you would expect. This value does not need to be exact, if you use an external clock its just used to calculate the default buffer-size for the acquisition.

 

Hope this helps, let me know if you are still facing erros.

 

Best,

Jan Göbel

Staff Applications Engineer

National Instruments

Message 2 of 2
(2,078 Views)