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: 

Time step for frequency measurement

I have to capture sound pressure from a microphone using one channel of USB-4431 and frequency (counter input) from a mass flow meter using one channel of USB-6341. Both the devices are connected to a laptop.  I wish to get the output data at a sampling frequency of 6000 Hz (0.000167 s time step). The sound pressure output is in 0.000167 time step whereas, the frequency result is in 3.4 s. Could any one please suggest a method to get both the results in the same time step of 0.000167 (6000 Hz). Also the start time for the first measurement has to be same for both the devices. The LabVIEW code and the result are attached.

 

Many thanks

AP

Download All
0 Kudos
Message 1 of 4
(2,773 Views)

Actually, the frequency is getting one sample per iteration of the loop so your sampling rate will be dependent on how fast the loop iterates and that is subject to the whims of the operating system.  If you want them to sample at the same rate you need to set them to do that.  You have the 4431 sampling at 6kHz and the 6341 doing single samples.  I'm not familiar with these devices but you should be able to either synchronize them or use two separate channels on one device for your inputs.

 

Kelly Bersch
Certified LabVIEW Developer
Kudos are always welcome
Message 2 of 4
(2,724 Views)

Thank you for your reply. I have tried using two channels of 6341. One was used to measure an analogue input (voltage) and another for counter frequency input. There is an option in the DAQ assistant which measures analogue input to set the sampling rate as 6000 Hz. Whereas I could not get the measurements at a rate of 6000 Hz even if I use continous sample option for counter frequency measurement.  

0 Kudos
Message 3 of 4
(2,703 Views)

Could anyone help me with the solution please.

0 Kudos
Message 4 of 4
(2,582 Views)