Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Out of memory

I have written some code with 3 inputs:

 

1. clock frequency (scalar constant)

2. pulse frequency (array of 100 elements)

3. number of steps (array of 100 elements each relating to a pulse frequency element from above)

 

I developed the code using sample values for the above inputs, but when I replace inputs 2 & 3 with different values i get an error message that simply says "out of memory". Does anyone know what this error message refers to exactly or why this might be happening? The new inputs are of exactly the same form as the sample values, so why would the algorithm require more memory to execute them?

 

Jordi

0 Kudos
Message 1 of 6
(4,023 Views)
Not sure what's going on. Is it possible for you to post your code or maybe a snapshot of it? Also, posting a snapshot of the error would help.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 6
(4,022 Views)

Apologies. I forget that I am more involved in my code.. 🙂

 

[Graphic1.png]

When using the constants in circle A, the programme runs fine.

When using the constants in circle B, i get the error message which says that the programme was stopped in the sub VI in circle C.

 

[Graphic2.png]

In that sub VI, the programme was stopped at the "initialize array" function in circle D.

 

Why would the memory all of a sudden be full as reported in the error box? The arrays in circles A & B are of the exact same form. Only the element values are different.

 

Jordi

 

Download All
0 Kudos
Message 3 of 6
(4,007 Views)

Hello DCT,

 

How big of an array are you initializing with each option?  In other words, if you remove the initialize array function what is the value in Total Clocks for both of the constants?

Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 4 of 6
(4,000 Views)

Hi Jon S

 

It seems that the for loop that determines the Total Clocks value is spitting out a value of 100004 for the constants in circle A, and 2147483647 for the constants in circle B. The latter is obviously too large. I'm not too sure why its doing that, because it should be in the region of 100000. I've attached my code from Graphic2.png with the arrays as constants (I've placed the arrays from circle A on the screen as well...). Perhaps i need to go back and check that my arrays are being produced correctly...

 

(I am using LabVIEW 8.2, fyi...)

0 Kudos
Message 5 of 6
(3,985 Views)

Hello DCT,

 

I would suggest running the for loop in highlight execution.  Hopefully from this you will be able to find the piece of the code that is creating the large value that ends up being the array size.

Regards,

Jon S.
National Instruments
LabVIEW NXG Product Owner
0 Kudos
Message 6 of 6
(3,965 Views)