LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Fixing counter sample rate?

Hi,

 

I am currently performing a multi-function data acquisition task that involves 4 AI voltages (30k S/s), 5 AI voltages (2k S/s), and 7 K-type thermocouples (1k S/s).  My hardware is PXIE-6358, PXI-6143S, NI9213, NI9265, and NI9203 modules.  My software is Labview 2009.

 

I have one loop collecting the data from these inputs at 100 Hz (300 samples for the 4AI voltages, 20 samples for the 5AI voltages, and 10 samples for the thermocouples every iteration).  I have a counter input that I would like to use to determine frequency.  I cannot sample one point per loop (100 Hz) as that does not provide a high enough frequency resolution.  I would like to obtain at least 30k S/s signal from the counter.

 

One thing I have noticed is that the sample rate only improves accuracy, i.e. how often the hardware checks for the rising or falling event, while the actual sample rate is dictated by the rate the events themselves happen.  This makes the sample rate a function of the speed.  I would like to have either a known sample rate or at least know the times at which these samples occur as I need to link this speed information to the AI inputs.  Is there a way to have a fixed sample rate much like we have with AI signals or a way to stamp the time from a counter for each sample?

 

Thanks in advance,

 

Greg

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

If you are measuring frequency using a counter there should be no sample rate???  The clock is intrinsic, that is you are just counting a clock between edges so the accuracy of the frequency is governed by the clock (usually 20Mhz so very little jitter). 

Set up a task to do buffered period or frequency measurment and periodically read the buffer which contains the last n periods or frequencies.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 4
(3,263 Views)

Paul,

 

I understand that a counter does not have a sample rate.  I am using the counter to measure frequency, or rotational speed.  I need to plot this rotational speed with respect to time.  Therefore, I need to know the time at every frequency point I measure from the counter.  Do yuou have any suggestions for this?  I am fine with buffering  this information and pulling it out during the 100 Hz loop, I am just struggling to conceptually determine how to do this.  Any suggestions are much appreciated.

 

Thanks,

 

Greg

0 Kudos
Message 3 of 4
(3,255 Views)

See the example under Daq>Counter Measurments->Period or Pulse width->Meas Pulse Width-Buffered-Continious.

The read loop does not have to real at 100 Hz, just fast enough to prevent buffer overflows. Running this at 10 hz should be fine, the buffer will return an array of periods (1/p = freq).  This is where I would start.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 4
(3,234 Views)