LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

buffered data

Hi,

 

My acquisition device throws out chunks of data every 50 to 51 ms at a sample frequency of 2048 Hz.

I use a standard producer / consumer structure for acquisition and displaying of the data.

main.png

 

 

 

Now when my logging is "ON" i write 1 second of data to my harddrive every second (this works with a shift register), this time, my enqueue has a little delay, so my de-queue also have to wait to display the data...

 

Now i was thinking about a solution, i can buffer 3 pieces of data and then only de-queue the last piece, but if i use the count of the queue and i say the count has to be 3, i also get a delay, because then it waits untill the count is 3 again... so the i only shift the problem....

 

Difficult...

Best regards,

Thijs

0 Kudos
Message 1 of 2
(2,178 Views)

I would do your buffering in the display case. Don't bog down your acquisition with unnecessary processing. Simply post the data to the display task. Have the display task buffer the contents in a shift register and use the current time to indicate when the buffered data should be written to the file. Also, I would recommend that you get rid of the stacked sequence frame. I don't have LV 2012 installed but I am quite sure you could refactor your your code to eliminate the stacked sequence frame.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 2
(2,163 Views)