07-15-2015 10:18 AM
I have a buffer that is generating 5 min worth of data and feed it to a queue. The data is later dequeued into a seperate while loop and plot in a graph.
My goal is programmatically refresh the buffer. I tried to used flush queue after the data is being enqueued, it did not work because after the flush the buffer adds last previous data set plus a new one into the queue. I want the buffer to start back at zero, meaning get rid of all the previous data and enqueue in new ones in the queue. Flushing the queue does not work
Thanks
07-15-2015 10:41 AM
07-15-2015 10:45 AM
I am using a waveform graph but wiring a constant into it does not solve the issue. At the next iteration, the buffer enqueue about 30000 samples again.
07-15-2015 10:48 AM - edited 07-15-2015 10:49 AM
Are you wiring an empty constant?
"Perhaps you can post some code to show what is happening?" - It is almost impossible to help you without you posting your VI or a screenshot of the code - anything else is just guessing/speculation.
07-15-2015 01:05 PM - last edited on 10-26-2015 04:57 PM by LiliMcDonald
here's a screenshot of the code
Admin Note - Attachments removed per user's request
07-15-2015 07:04 PM - edited 07-15-2015 07:08 PM
Please attach your actual VI and subVIs, we cannot debug pictures.
07-16-2015 07:51 AM
Ritch,
Please do not attach Screen Shots, attach actual VIs. In order to test/query/understand a Screen Shot, we have to actually create the VI "by hand" ourselves, something that is a little bit unreasonable for you to ask of us if you are asking for our help. Help us to help you by providing your effort to us and attaching the VI.
Note that if you want to attach just part of a VI, you can attach a Snippet, which "looks like" a picture, but can be dragged onto a Block Diagram and become LabVIEW code.
Bob Schor
07-16-2015 08:09 AM - edited 07-16-2015 08:13 AM
I actually prefer people to post pictures - most of the time it's fairly easy to see what's wrong and it means I don't have to make sure I have the latest version of LabVIEW installed. When people post VIs I have to make sure I have the right version installed, download the VI (which is often missing dependencies anyway) and then wait for LabVIEW for open.
Agree that snippets are probably best though.
In this case, I would imagine that the circular buffer VI is holding an amount of data which doesn't get cleared when you flush the queue. If you were to enqueue an waveform constant with no data in the top loop I think that would clear the graph. You will need to see if there is a way to 'reset' the circular buffer vi (have an extra 'reset?' input and when true, clear the data inside the VI).
07-16-2015 10:05 AM - last edited on 10-26-2015 04:58 PM by LiliMcDonald
All, here are the attached Vis
Admin Note - Attachments removed per user's request
07-16-2015 10:06 AM - last edited on 10-26-2015 04:58 PM by LiliMcDonald
Here's the buffer.vi vi
Admin Note - Attachments removed per user's request