LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error Code Hex (0x2) stopped at Initialize Array on block diagram NIMS_V=zeros(I32,I32).vi:2980004

Dear all,

I have the following problem. Within an Main Labview VI, I want to call an SubVI (see attachment) including showing the front panel.

Yet when I call the SubVI I get the following error message:

LabVIEW: (Hex 0x2) Memory is full.

 

The top-level VI "foo.vi" was stopped at Initialize Array on the block diagram of "NIMS_V=zeros(I32,I32).vi:2980004".

 

Refer to the VI Memory Usage topic...

And then a copy of the mentioned vi pops up (see images).

 

Now, I do understand, that there seems to be a problem, that somewhat my memory gets full and I tried the techniques given in the LabView Help. Yet I quite don't understand the error and how to overcome it.

 

Error Message.PNG

Front Panel of SubVI.PNG

    

Block Diagram of SubVI_2.PNG

Block Diagram of SubVI_1.PNG

0 Kudos
Message 1 of 7
(1,631 Views)

Hi kilroy,

 

what was the product of x and y when you tried to initialize that array?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(1,599 Views)

Hey Gerd,

if you mean in my SubVI it should become a 2D array, which I transform then into an 1D Array.

 

For the x and y in the VI that is shown in the images, actually nothing really happens when I try to plug in numbers, it just stays zero.

 

Best regards,

kilroywh

0 Kudos
Message 3 of 7
(1,595 Views)

Hi kilroy,

 


@kilroywh wrote:

if you mean in my SubVI it should become a 2D array, which I transform then into an 1D Array.


No, I don't mean to work with a 2D array in the subVI…

 


@kilroywh wrote:

For the x and y in the VI that is shown in the images, actually nothing really happens when I try to plug in numbers, it just stays zero.


I was asking: which "X" and "Y" value did you supply to your subVI when you got that "memory full" error?

Most probably you supplied too big values, resulting in a huge memory request at InitArray - hence the "memory full" message!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(1,591 Views)

Hey Gerd,

The number I provided weren't big, since the buffer went full before I could do anything.

Anyhow the number which I then plugged in where in the range between 0 and 512.

 

Nevertheless, I solved it!

The problem was the following: Within the SubVi I provided one of the inputs into the MathScript Node was a 2D-Array (X,Y,R as columns).

Now it should calculate then X and Y postions based on the radius. Therefore I created in the script an 1D-array of zeros beforehand (e.g., X = zeros(N,1) ).

MathScript_error.PNG

In the end it just had to be an 2D-Array (e.g., X = zeros(s,L)).

 

MathScript_solved.PNG

 

Best regards,

kilroywh

0 Kudos
Message 5 of 7
(1,544 Views)

Hi kilroy,

 


@kilroywh wrote:

Nevertheless, I solved it!

The problem was the following: Within the SubVi I provided one of the inputs into the MathScript Node was a 2D-Array (X,Y,R as columns).


Lesson learned: provide as much information as possible when you want our help on your problems!

 

How should we have known about that MathScript nodes before?

 

On your images (still no code from you):


@kilroywh wrote:

MathScript_solved.PNG


Do you think it's a good idea to have a "N" integer input and a "N" DBL output?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(1,542 Views)

Hey Gerd,

yeah I looked at my original post and was really suprised, that the original VI I was talking about was not there, since I actually dropped it in.

 

But I'll do it now!

 

However, thanks for the Input about the variable "N". I oversaw it (and am not too sure how to change it).

 

Best regards,

kilroywh

 

0 Kudos
Message 7 of 7
(1,532 Views)