LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does queue works

Hello friends,

I have attached an labview file.

I generated a signal and added a time stamp to besides the amplitude measurement. I stored both of them to a measurement file. Moreover i am sampling at 1000hz. 

 

The problem here is: I am not receiving 1000 data points in my output file. I am receiving very less outputs. May 100-200 points. When i check the time stamp parallel to it, the time of data storage is not in order. (not in 0.001 sec interval) .

 

I heard that queing will help in these problem. Can I learn more about it.

 

Thanks.

0 Kudos
Message 1 of 3
(2,577 Views)
producer-consumer loop will help you it is in the labview templates
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
Message 2 of 3
(2,574 Views)

I think you have a few misconceptions and queueing will not solve the immediate problems.

 

Your "simulate signal" generates 100 points at a time every 0.1 seconds, exactly as desired. You might want to set it to simulate acquisition timing for more reproducible results. You are spinning as fast as the computer allows. Not recommended, because all bets are off regarding timing.

 

Then you take the max of 100 points, leaving you with exactly 1 point per iteration of the FOR loop.

 

You write to the file, appending one point to the end of the file. The number of points in the file will depend how long you run the program, nothing else.

 

If you want to see the timestamp of each point, you can configure the "write to measurement file" to include the time colum. You'll see that the points will be exactly 0.1 seconds apart as expected.

 

If performace really matters, you should not use express VIs, but lowlevel functions and write simple binary files.

 

0 Kudos
Message 3 of 3
(2,559 Views)