01-11-2013 08:40 AM - edited 01-11-2013 08:50 AM
I want to fill up a 1d array while adjusting a vertical pointer slide control. I tried using a user's solution here: forums.ni.com/t5/LabVIEW/build-1D-array-dynamically-with-data-from-for-loop/m-p/758715/highlight/true#M347601 but when I tried it, I only got the current values filling up the array. I want the past values to be just pushed once a new value comes from the slide control. Can anyone help me on this? Thanks.
01-11-2013 09:00 AM
01-11-2013 09:51 AM
Hi GerdW! This is what I've done so far. I want this VI to be controlled in an "environment" VI, together with other VIs like a buck converter model VI and an algorithm VI that controls the converter. As I said what happens right now is that only the most recent value is filled in the array, what I want is past values to be stored in an array. For a shift register, I should use a while loop right?
Thanks
01-11-2013 10:01 AM - edited 01-11-2013 10:11 AM
Your VI creates a new 3D array with 100k points from scratch containing all identical elements, reshapes it to a 1D array, and then stops. There is no intereacticity. Are you using contiunous mode to run this? (Don't!)
First of all, you are creating way too many dimensions. You would get the same result if you would simply wire the scalar into the inner most loop and leave the initialize array out of the picture or initialize a 1D array of lenght 100k. No loops needed.
Yes, you need an outermost while loop containing a shift register. Initialize the shift register with a 1D array and append new data inside the looop as desired.
01-25-2013 07:04 AM
I'm sorry, but can you please explain how to initialize the shift register? Do I connect the vertical control to an initialize array, then connect it to the shift register in the while loop?