Hello everyone, for a school assignment I had to make a VI that would accumulate prime numbers using a previously made prime number finder, and then save them in a 10x10 array, for that to eventually be exported to excel (however that is not the issue here).
I really struggle with arrays in LabVIEW, so I decided to save all my numbers in a 1x100 array and then to use the 'Reshape Array' function to shape it into a 10x10 array. However, whenever the VI reaches this step it uses all my memory and eventually crashes.
Does anyone know a workaround or does anyone have a more elegant solution for my issue? I have attached my VI below.
Left on the image is the 1x100 array and to the right is the 'Reshape Array' function attached to a 10x10 array.
Solved! Go to Solution.
Sorry, it was looking at it on the phone screen earlier, you were actually only creating a 10 dimensional array. a 10x10x10x10x10x10x10x10x10x10 I64 array is about 80GB 😄
("Reshape array" pads (or truncates) to the final size, so that's what it was trying to allocate! 😄 )
Here's all you really need:
Your array indicator seems to have the wrong representation. Do you really need I64 integers? Maybe there are some other unreasonable code decisions. Feel free to share the rest of your code...