Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Sampling at 1000 S/s with a NI 9237 module

Solved!
Go to solution

Hello,

I have a cDAQ 9185 chassis with a NI 9237 module. The manual for the 9237 states that the lowest possible acquisition rate is… “down to 1.613 kS/s depending on the value of n. When using an external timebase with a frequency other than 12.8 MHz, the NI-9237 has a different set of data rates.” I need to be able to sample at 1,000 S/s,

How can I access other timebases which I assume in my case is provided by the cDAQ 9185? If I try to select an external timebase, for example, if I try to create a NI-DAQmx task for a load cell, when selecting Advanced timing tab, and changing the Sample clock type to external, any timebase or sample clock gives me an error. I also select “Let NI-DAQ Choose” the timing engine, as I don’t know the meaning of selecting a specific one.A similar message pops-up if I try to do this from a .vi.


I thought of sampling at 2kS/s and decimate the results, but is seems inelegant.
Thanks everyone.

Download All
0 Kudos
Message 1 of 4
(1,124 Views)
Solution
Accepted by topic author lvilla

Inelegant, sure, but effective.  Go ahead and decimate.

 

Here's an approach I'd consider:

- sample at 10k or 25k (integer divisors of device's 50k max, integer multiples of desired 1k rate)

- apply software low-pass filtering with a cutoff somewhere in the neighborhood of your 1k sample rate.

- decimate using a factor of 10 or 25 as needed

 

The function for continuous waveform resampling can do most of the dirty work for you.  But it isn't hard to do the filter and decimation steps separately if you want more control over the filtering method.

 

 

-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).
0 Kudos
Message 2 of 4
(1,093 Views)

Thank you!
I'm not sure if the group etiquette is to post .vi or images.

 

I tried to implement your suggestion. If the user selects 1k S/s I go to 2k S/s, assuming 2k is a simple multiple and things will run faster. In my example I used decimate and in parallel Sample compression to compare both functions. The control graph generates 20k samples (2kS/s * 10s). The decimated graph .lvm also generates 20kS and shows a deltaX of 0.0005 and the Sample Compression  .lvm file generates 10kS and shows a deltaX of 0.001. 
I'm confused because I don't know how to assemble my decimate routine correctly.

 

-lvilla

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

Just came across this again after my browser restored recent tabs.  I meant to reply, but now realize why I merely queued it up instead -- the combo of express VI's and a mere screencap of the code makes it pretty much impossible to diagnose from afar.

 

So did you get things figured out?   I can help better if you post an actual vi with reasonable default values, back-saved to LV 2020 or earlier.  I'd prefer a version that uses "regular" functions rather than Express VI's if you've got one.

 

 

-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).
0 Kudos
Message 4 of 4
(893 Views)