11-23-2020 07:41 AM
You misunderstood me.
I just want to know if something needs to be changed in the picture.
Array (2d) of data comes from 1. From 2, averaging occurs. Everything works here. But I want to check - right or wrong. To do this, I want to collect several arrays from 3 and write them to txt (excel).
I can't invent of how to take a 1d array from each iteration and write to a file. Or make a multidimensional array of 1d arrays and then save it.
11-23-2020 07:52 AM
Is this the same question as the previous thread? https://forums.ni.com/t5/LabVIEW/Collect-data-into-an-array-and-average-it/m-p/4097795?profile.langu...
To save Your data array, use https://zone.ni.com/reference/en-XX/help/371361R-01/glang/write_delimited_spreadsheet/
It is the first VI in the "File" palette.
11-23-2020 08:39 AM - edited 11-23-2020 08:50 AM
Hi Fizikaman,
@Fizikaman wrote:
I just want to know if something needs to be changed in the picture.
The counter used to compare with "Kol-wo ciklow" should be an integer. No need for any orange float here.
As has been said before: the inner while loop is non-sense! Anchor the shift registers at the outer loop border!
Why don't you attach your VI? We cannot debug or edit images using LabVIEW…
@Fizikaman wrote:
I can't invent of how to take a 1d array from each iteration and write to a file. Or make a multidimensional array of 1d arrays and then save it.
Learn the LabVIEW basics: using an autoindexing tunnel converts your 1D array into a 2D array.
Read the help on WriteDelimitedFile function to learn how to save 1D or 2D arrays…
Edit after merging your threads:
11-24-2020 12:24 AM
Nearly. In that thread, I asked how to average the data.
And in this thread I am asking how to check the averaging I wrote.
The fact is that it will not be possible to simply save, since the last array is saved, and I need all the arrays. That is, 10 measurements pass and I need to save 10 arrays in order to independently check the data averaging.
11-24-2020 12:35 AM
I think you will understand my VI for a long time.
Local variables cannot be discarded. Or, I just don't know how to do it.
I am enclosing VI version 16.
11-24-2020 12:38 AM
Perhaps I am not explaining exactly. I don't just need to save the file (I have already implemented such a code and it works with a single measurement). I need to run 10, 20, 50, 100 cycles and save each cycle to check if the averaging works correctly.
11-24-2020 05:13 AM
@Fizikaman wrote:
Perhaps I am not explaining exactly. I don't just need to save the file (I have already implemented such a code and it works with a single measurement). I need to run 10, 20, 50, 100 cycles and save each cycle to check if the averaging works correctly.
I assume that you want to save the data only to look at it once, check the algorithm for correctness and then delete the file.
The fastest way to do this is like in the image below. It is not a good way to do this. I have alread posted the link to the VI above.
11-25-2020 01:38 AM
Yes, you understand correctly. I want to look all arrays and compare with the final one.
Thanks. Now I will try to do so.
11-25-2020 01:41 AM
By the way, what about the remain of the VI code? I'm just learning how to work in labview.