LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Buffer with multiple data plots solutions

Solved!
Go to solution

Thanks, Would you please post that as Labview 12.0 for me.

0 Kudos
Message 11 of 29
(1,777 Views)

Or anyone else who can convert it from labview 14 to 12

0 Kudos
Message 12 of 29
(1,759 Views)

Here

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 13 of 29
(1,743 Views)

James,

           is there a way that buffer can be cleared or reset?

          My goal is to have the 5 min of data display on my waveform graph and your modification worked fine and thanks. But I cannot get my head around resetting or clearing the buffer. see attached! 

 

Admin Note - Attachments removed per user's request

0 Kudos
Message 14 of 29
(1,699 Views)

ritch_by_nature wrote:

           is there a way that buffer can be cleared or reset?

          My goal is to have the 5 min of data display on my waveform graph and your modification worked fine and thanks. But I cannot get my head around resetting or clearing the buffer. see attached! 


 

You should just be able add a boolean input to run the Initialize state again.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 15 of 29
(1,692 Views)

You did some weird stuff there with your waveform generation I think... Your combination of generating 2000 points and setting dt to 1/100 results in an impossible waveform. You should do an operation with the ms delay timer to get the actual dt value.

 

One thing should also be noted, this buffer will always be the length of the initialized value. That's why your waveform is always on the timescale of the length of the buffer. Also, that buffer size won't change even though you have the input wired because it uses a shift register within the VI once it's been initialized.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 16 of 29
(1,680 Views)

Your combination of generating 2000 points and setting dt to 1/100 results in an impossible waveform. You should do an operation with the ms delay timer to get the actual dt value

 -I'm not sure what you mean by that. I have no problem displaying my waveform. Are you saying the loop timer changed my dt value.

Also, so technically once initialized clearing the buffer is impossible.

One thing I notice is that even in my 2nd while loop, I try to flush the queue as to reset it that didnt work either. Because the next data set is a full buffer insterted in the queue to be processed and displayed.

So there's no way around it i suppose?

0 Kudos
Message 17 of 29
(1,664 Views)

Take a look at what I did to it. See what happens when you press the Init button.

 

You had it set to an impossible waveform, which causes the chart to jump when reinitialized. The graph is doing it's best at combining the waveforms, that's why you can't tell anything is going on since it throws out conflicting data. Creating a set of data with t0=0, dt=0.01, and 2000 data points like you have it, results in 20 seconds of data.... but you're doing this once every second and each new t0 value is 1 second apart.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


Download All
0 Kudos
Message 18 of 29
(1,650 Views)

Thanks James.

I guess I was so focused on displaying new data every second on the graph that I couldnt see how I was messing the dt. but with that dt algorithm I can only display a minimal set of data. When set my buffer size to 5min, it crash because of memoty issues/.

0 Kudos
Message 19 of 29
(1,619 Views)

There is a limit to the memory you can keep. I just realized I gave you the application back with it set to 2000 data points every 100ms... that's 20kHz, which is pretty fast and will fill up a buffer pretty fast.

20kHz for 5 minutes, with 4 channels, is 24 million data points. At 64 bits per DBL (ignoring the few bits for t0, dt, and the array), that's 192MB you're trying to store in that buffer.

 

I don't know the purpose of your buffer, but I'm assuming you don't need that sample rate. The slower you sample, the easier it will be for the buffer to keep up. If you need a high sample rate and a longer buffer, you could downsample your buffer sample rate, just so you can have a longer buffer length. Another option is to use a Chart to display your data instead of a Graph. This would eliminate your need for the buffer if all you care about is the display.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 20 of 29
(1,610 Views)