12-06-2013 11:57 AM
Hello!
I have this code snippet, with shift registers, it draws the last 20 plot to the same graph as you see on the botton of the picture. Any of you have an idea how to make this code more compact? Or somebody have a solution to make it scalable, for example if i want to use the last 100 plots?
Thank you in advance!
Solved! Go to Solution.
12-06-2013 12:07 PM
This is not a snippet, but a plain image. We cannot simplify images, so please attach your VI instead.
Yes, this can be dramatically simplified by using a single 2D array in a single shift register and replacing the oldest row when new data arrives.
12-06-2013 12:14 PM
It's a big project, i meant snippet as the part of the image. But can you post a code like you described?
12-06-2013 12:17 PM
I am sure there are already examples here. Will check later (currently posting by phone).
12-06-2013 12:28 PM - edited 12-06-2013 12:29 PM
It look like you are actually making an array of clusters. So make the shift register an array of these clusters. You can then increment which waveform to replace with each iteration.
12-06-2013 01:48 PM
Thank you!
12-06-2013 02:03 PM
What is on the input of initialize array? I have LV 2012 so i couldnt opne the snippet.
12-06-2013 02:36 PM
Cluster constant.
12-06-2013 02:43 PM
@gbvbalint wrote:
What is on the input of initialize array? I have LV 2012 so i couldnt opne the snippet.
It is a constant of the waveform. Create a constant from where you get your spectrum data and wire that into the Initialize Array.
12-06-2013 02:44 PM
Its not really working tho 😕