LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

load/save a 4D array

I want to store a 4D array, so that I can retrieve it later for further analysis.

For that purpose, I store the data in a file, with 4 "for loop´s", using the index numbers as a "key". This first part of the problem works, but not the second one to load it. I tried it in many ways (with "insert into array" and "replace array subset" functions), i get the value and the index numbers, but no way to write the value on the array. Where is the mistake?

I attach both subVI´s (save_array_4D and load_array_4D) in a zip file.

Thanks!
0 Kudos
Message 1 of 10
(3,852 Views)
Gabrielet,

Are you sure that you need to save your 4darray into INI-file formatted structure?
May be solution with binary file will be better?
In any case this solution faster and more easy.
See attached file for example (LV 7.1.1).

with best regards,

Andrey
Message 2 of 10
(3,834 Views)
Thanks a lot, Andrey. I didn´t know about this function. And, definetly, is much faster and easier.

Best Regards,

Gabi
0 Kudos
Message 3 of 10
(3,824 Views)
my saved files are in unsigned 16 bite 2-D array. I try to use the vi you suggested but the out of the binary string always "???" and the retrieved array is always empty. Is there modification to be done for my case?
thanks in advance!
Can a computer learn how to program?
0 Kudos
Message 4 of 10
(3,798 Views)
Another nice way would be to use datalog format. Here you could even add additional 4D array data records later, then retrieve them by index.

Kevinhi, you could just convert it all to 2D arrays of U16 to solve your problem.
0 Kudos
Message 5 of 10
(3,797 Views)
Thanks, but 😞 it doesn't work as I have tried to change it to 2D U16. here is my saved file and it should be 2D array. I have also attached the save image.vi as well.
Can a computer learn how to program?
0 Kudos
Message 6 of 10
(3,779 Views)
opps, the file is too big
Can a computer learn how to program?
0 Kudos
Message 7 of 10
(3,774 Views)
it seems that the saved files are over 6mb each and can't be zipped, I can't post them.
Can a computer learn how to program?
0 Kudos
Message 8 of 10
(3,772 Views)
Try this instead. Seems to work.
0 Kudos
Message 9 of 10
(3,770 Views)
That is right, it does work! altenbach you ROCK!

kevin
Can a computer learn how to program?
0 Kudos
Message 10 of 10
(3,758 Views)