Current Position:Home > Why is measuring a frequency so slow?

Why is measuring a frequency so slow?

Update:11-30Source: network consolidation
Advertisement
If I don't measure a the two frequency's I can get the program to write data about 7 times a second, but with the frequnceys it is only 1 or 2 times. Take a look at the program to check this out. Also on the graph there seems to be a buffer over run, data is written the the wrong side of the graph first.
Attachments:
twin_turbo_wo_water_to_air_data_output.vi ‏192 KB
create_data_string_II.vit ‏24 KB
Measure_freq_--_Sub.vi ‏46 KB

The Best Answer

Advertisement
There is still a VI missing from your list so I could not run your code. In the future consider saving your top level VI with "save with options">> development distribution. This creates a library of all the VIs.
You are using write characters to file.vi. This VI opens a reference to a file, writes the data, then closes the file. This makes the VI very slow. Consider opening the file outside of the loop, writing to the file inside of the loop and closing when your are done. Open up the write character to file to get an idea of the VIs you will need.
This kind of operation is usually best done using parallel loops--one loop for acquisiton and one for data storage. The tricky part is that you will need to use queues to transfer the data between the l
oops. There are several excelent LabVIEW shipping examples of how to use queues. Open LabVIEW >> help >> examples >> optimizing applications >> sync. tasks.
The queues will speed your code and reduce the buffer overflows because your data will be pushed into the queue as it is aqcuired and can be written to file in larger pieces speeding the write process.
Jeremy
  • Why is measuring a frequency so slow? Update:11-30

    If I don't measure a the two frequency's I can get the program to write data about 7 times a second, but with the frequnceys it is only 1 or 2 times. Take a look at the program to check this out. Also on the graph there seems to be a buffer over run,

  • Help with measuring the frequency of a pulsing signal Update:11-30

    Hi, I am trying to use LabView to measure the flow from my ultrasonic flow meter. The meter sends a pulse for evey 10 litres of flow: I am picking up the signal in LabView without any trouble - it's basically a square wave that pulses at 10V and goes

  • How do I simultaneo​usly measure two frequencie​s using the two counters on a CompactDAQ chassis? Update:11-30

    I am using two encoders as speed wheels to compare two different speeds simultaneously.  I have the encoders connected to the two counter inputs of my CompactDAQ chassis using NI 9423 cards in order to measure the frequencies produced be each and the

  • Measure scan frequency using 2 e-series boards and an external clock. Update:10-11

    I am setting up a data acquisition system in which the user has the ability to select between multiple sources for the scan frequency. The user can choose either hardware based and select the scan frequency or an external source, in this case, an enc

  • I need to measure the frequency of a signal on Pin 39 (PFI 15) of a PXIe-6361 module. Update:10-11

    I need to measure the frequency of a signal on pin 39 (PFI 15) of a PXIe-6361 module.  All of the digital I/O pins are already assigned and in use.  The signal frequency range is 50KHz to 500KHz.  I have tried all of the sample programs for DAQmx Cou

  • NI-5122 measure trigger frequency of TTL trigger signal Update:11-30

    I have two signal channels and a TTL trigger signal on my NI-5122. The frequency of the tigger signal is between 5 and 30 Hz. Before I want to sample the two signal channels I need to know the actual trigger frequency to calculate and set sampling ra

  • Wiring a SCB-68 to measure the frequency of a TTL pulse signal Update:11-30

    Sorry if this is a basic question but could someone please help me and tell me how to wire up a SCB-68 connector block (connected to a AT-MIO-16 DAQ board) so that I can measure the frequency count of a series TTL pulses (signal from photon counting)

  • How to measure the frequency of the data plotted on the waveform chart Update:11-30

    i have made a virtual instrument in labview that acquire data (say sine wave) into a spreadsheet file and also on the chart from the function generator. I measured the frequency of the data from the chart but it is coming out to be very less. How can

  • Measure a frequency out of the trigger counter sample vi Update:11-30

    Hello, I want to measure the frequency of the simulated signal. I already succeeded in counting the pulse when rising. I probably need to integrate a wait until moduleso it will count the rising signal per time unit. I tried this but it didnt work ou

  • Measuring Superimposed Frequencies on a Sine Wave Update:11-30

    Hi, Just looking for advise on the best way to measure superimposed frequencies on my raw data. The raw data (voltage versus time) is ultimately a noisy sine wave with a frequency of 1Hz. I need to determine where the noise is coming from, i.e. is it