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.
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.
06-25-2015 03:58 PM - last edited on 10-26-2015 04:54 PM by LiliMcDonald
I am trying to set the buffer size of my waveform graph to display 5 minutes of data. My data is coming from a different while loop. the data is fed into a queue and I dequeue it in this loop shown in the picture. I modify the waveform circular buffer.vi to change the buffer size of my data and plot it. keep in my data is flowing as waveform (1D array ), 3 elements (t0, dt,y). I have different channels that shows different plot. My problem is if I select more that one channels they dont start at the same time. does anyone know why and possibly helo me fix that issue.
pics of the code and my display is attached
Admin Note - Attachments removed per user's request
06-26-2015 07:16 AM - last edited on 10-26-2015 04:54 PM by LiliMcDonald
I forgot to attach the VI.
see attached
Admin Note - Attachments removed per user's request
06-26-2015 04:02 PM
When you say you did some modifications to the waveform circular.vi, what were them?
06-26-2015 04:37 PM
Is the first image an image of Circular Buffer? Please don't attach images -- we can't "play" with them, test them, fix them. Attach code (VIs, ZIP, or Snippets).
Your code is clearly not doing what you want it to do. Without looking at your code, can you please write a brief description (but not too brief -- it may take a dozen sentences or so, but it will be worth the modest effort) to describe what you are trying to do? The top loop is clearly for data generation: describe the data well enough that someone (like me) could write a tiny function to simulate/generate the data. we need to know the nature of the data, the sampling rate, the number of samples, and how much is going on the Queue how often.
The lower loop is for display and processing -- again, what parameters are there to the display, such as Every Point, decimated points, etc. Is it a Chart or a Graph? What do you want to do (other than plot it) with the data? What's with the Circular Buffer, what are you trying to accomplish there?
Once we understand what you want to do, we will have a better understanding of what you did do, and why it isn't working the way you hoped.
Bob Schor
06-26-2015 06:36 PM
The top loop is for data generation. The data type is a cluster of timestamps (to), sampling time interval( dt), and 2D array single precision (Y). d is set to 1/100 fixed. number of samples is 2000, data size is 3 x 2000. Naturally all of the 2000 samples go thru the queue every 1000 ms. But I do want the data to flow thru the queues at 100 samples every 1/10th of a sec. havent tried that yet.
The second loop used the same data parameters as the first loop for every points. no decimation and data is displayed via a waveform graph. I want to control the amoount of data displayed on the graph thats when the circular buffer comes in. I tried to use it to have about 5 min buffer long of data displayed. that's the goal.
Since I am working with multiple channels (columns) in my 2D array of data. If I ever select more that one channel (column) to display, I notice that they do not start at the same time on the graph. I notice each channel start about a couple seconds before the others.
My first time working with buffering data, if there is a simpler way I'd go for it.
Hope I was clearer this time around
06-29-2015 10:15 AM
06-29-2015 10:36 AM
You are using the circular buffer incorrectly. It only stores one set of data, but you are using it to store data from three different sources. Each time you add data to the circular buffer, regardless of the source, the buffer puts the new data at the end of its existing data. Your program does the following:
This is why it appears that data source three is starting earlier than the others. You are actually showing more data, which puts the start of the data closer to the front of the buffer.
06-29-2015 11:17 AM
06-29-2015 02:31 PM
06-29-2015 03:14 PM