07-01-2015 07:04 AM
Thanks, Would you please post that as Labview 12.0 for me.
07-01-2015 08:12 AM
Or anyone else who can convert it from labview 14 to 12
07-01-2015 09:08 AM
Here
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-20-2015 02:50 PM - last edited on 10-26-2015 04:56 PM by LiliMcDonald
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
07-20-2015 03:01 PM
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> ---'
07-20-2015 03:29 PM
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> ---'
07-20-2015 03:55 PM
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?
07-20-2015 04:04 PM - edited 07-20-2015 04:07 PM
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> ---'
07-21-2015 08:38 AM
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/.
07-21-2015 09:02 AM
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> ---'