From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Several NI cards : choice of the Master Timebase

Hello everyone,

 

I'm computing a labview code to acquire simultaneously several NI cards (two 9222 - two 9215 - one 9234). To do this, I have a sub-VI permitting me to acquire data from cards, taking for entries parameters like frequency, path, samples number etc.

 

The 9234 NI card has a limited choice for its frequency (Timebase = 13,072 MHz, so the allowed frequencies are submultiples of 51,2 kHz) and this drive all the frequencies of other cards. For exemple, if I choose a frequency of 20kHz for the whole system, this frequency is automatically changed into 25,6 kHz (a submultiple of 50 kHz).

 

I'd like to know if there is a way to choose the frequence I want, or at least to change the Time base, to 12,8 Mhz for instance, so that I can have frequencies like 50 kHz or 25 kHz (it's more practical for my post-treatment). I tried to work on the source of the "DAQmx Timing.VI" but every time I get an error. I put here the sub-VI I use to acquire several cards

 

Thanks in advance for your help

0 Kudos
Message 1 of 4
(1,985 Views)

Don't have time for a complete reply, here are highlights.

 

The 9234 sample rate restriction is *hardware-based*.  It will only be able to sample in submultiples of 51.2 kHz.

 

Many boards of that type *can* export their sample clock and act as a master timebase for other boards.  (They cannot import another board's sample clock directly and importing a different precision timebase is a relatively advanced topic you might not be ready to tackle yet.)

 

I'd first try to export the 9234's sample clock for the other devices to use as their sample clock.  In this scheme, be sure to start the other devices' tasks first and start the 9234 "master timing" task *last*.  You'll also need to understand and compensate for the unavoidable delay caused by the 9234's delta-sigma style A/D converter.

 

Final thought: once you acquire at, say, 25.6 kHz you could do software resampling to a different round number frequency like 20 kHz.  In my experience this kind of thing both works pretty well and turns out to be not nearly as useful as I expected.  I usually end up preferring to just accept the non-integer sample rate.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 2 of 4
(1,962 Views)

Thanks a lot for your answer. It seems easier to me to keep the present VI and do with these forced frequencies. I will think about what you said about the delay due to the ADC and see what it implies.

 

Thanks again

0 Kudos
Message 3 of 4
(1,950 Views)

Posting by phone, but saw your VI earlier. It looks like you are using channel expansion where everything is taken of, including delays according to NI information. 

 

Your current problem is you have  one DSA module and multiple SAR modules. Your DSA module has its own clock, around 13MHz that it uses to get its sample rate. If you had another DSA module, like the 9239, you could use its clock, around 12.8MHz, to get sample rates of 50 kHz.

 

this is by memory so excuse me if I get some values wrong.

 

mcduff

0 Kudos
Message 4 of 4
(1,945 Views)