03-26-2009 03:34 PM
Hello.. I'm trying to create a data buffer but I can't...(I don't understand very well how to use the shift registers, feedback, auto-index, etc.) I receive real-data from 16 sources and I want the buffer to allocate 20 samples or so... (20 x 16 matrix or array). I'm trying to simulate the sources and using replace array subset, but I can't do what I want.. (that a single data fill the space in index 0, and when a value reaches index 19, the next number replace the one in index 0 and so on....)
I want to create a buffer for when some disturbance ocurrs, I want to save the data from 1 or 2 seconds before the event. I think that I can use too a history data property node, but I'm not using a waveform chart anymore, because I want also the time stamp of the data in the xscale.. and with the chart I didn't manage to do it... (I tried with an offset property node.. but eventually the time in the xscale lagged the real time, I think that happens because the rate sample is not constant... but that's another problem.. =S)
Thanks in advance for all your help... Mitzi
PS. I attach my attempt...
03-26-2009 03:57 PM
03-26-2009 06:05 PM
If you want a build a 20x16 array with only the 20 most recent values, what you can do is use the build array function to concatenate on the end of the data (you will need a shift register for this).
Next take the output of the build array and get the last 20 columns using the array subset function.
(There's a real clever way to do this involving reversing the arrays, but I'm not going to confuse you with that).
If you're still not getting it when I get home, I'll write up a VI and post it. What version are you using?
03-27-2009 02:15 PM
Hi... thanks for the answers... I´m using LabVIEW 8.2... Ohh... I will be so glad if you could write me an example.. I still can´t do it... =S
Have a nice day..
Mitzi
03-27-2009 04:28 PM
You could also use a 'Lossy Queue'.
Set the size of the queue to only be 20 elements long.
It will then act as a FIFO array, with a constant length of 20 elements.
03-28-2009 01:18 PM
Ohh... That would be great.. ! But I searched in my LabVIEW version and it's not there!! I'll try to find it in internet.... but thanks!! That would work!
Mitzi
03-28-2009 11:58 PM - edited 03-28-2009 11:58 PM
mia.lara wrote:Ohh... That would be great.. ! But I searched in my LabVIEW version and it's not there!! I'll try to find it in internet.... but thanks!! That would work!
Mitzi
Ahh, I forgot to check what version you were using, yes I believe that is a newer function (8.6 ?)