LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Not enough memory to perform operation

Solved!
Go to solution

Hello,

i was trying to run the code below but always i get error " Not Enought memory to perform"

I dont know why is so?? Its to simple operation i am trying to do...

Thanks so much...

0 Kudos
Message 1 of 8
(3,094 Views)

Your VI has some major flaws. In addition to this, i cannot see what you are trying to accomplish with it.

a) You are creating an "evergrowing" 2D array. Your computation will never result into an equal for stopping the loop. This must blow memory.

b) Comparing floating point numbers to floating point numbers is always a bad idea.

c) Please try to make the code more readable by simplifying it (remove unnecessary computations) and try to keep wires free of bends.

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 8
(3,090 Views)

2170E+6 is the start freq and with 1 MHZ step size i hv to gather all freq till 12750E+6 with step size of 1 Mhz...

 

So now i guess i am bit clear...

thanks

0 Kudos
Message 3 of 8
(3,084 Views)

No, it is not clear. What do you want to have as a result of this VI? What should be the content of the array?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 8
(3,074 Views)

Hi,

All The number from 2255E+6 till 12750E+6 with step size of 1E+6

thanks a lot

0 Kudos
Message 5 of 8
(3,070 Views)
Solution
Accepted by topic author Sim5

This is what you need:

 

SimpleSolution.PNG

 

Note that you are possibly discarding/adding "steps" caused by the type cast from double to integer.

Another note: given your start and stop value and Delta_f, you will get 10495 steps. This seems rather high. Intended?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 8
(3,058 Views)

Wouldn't this do the same thing:

 

 

Message 7 of 8
(3,055 Views)

pals wrote:

i was trying to run the code below but always i get error " Not Enought memory to perform"

I dont know why is so?? Its to simple operation i am trying to do...



You already got good solutions, but here's a quick analysis of your original program:

 

You are building a 2D array that grows with every iteration of the loop, because each new row is one element larger than the previous. This leads to incredible memory thrashing. The final content of the output tunnel is a 2D array with about 110 million DBL elements, taking about 900MB for a single copy in memory. This will not fit because arrays need to be contiguous in memory.

 

Obviously, you don't understand the "initialize array" primitive. Make sure you become familiar with basic array operations.

 

On an infinitely larger and more powerful computer in the far future, your loop would come to a stop just fine. Comparing DBLs is safe if there are no fraction involved (and you are not exceeding the resolution of the mantissa) as in this case. Still, if you make a mistake with inputs, it is possible that the stop condition is not matched because it could be between elements. It is always safer to do a "larger or equal" instead of an equal in such a case.

 

 

Message 8 of 8
(3,037 Views)