LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to dump the memory that is used by the 3D Picture Control VIs?

Hello,

I am trying to create a simplified representation of a robot I am working on. I use the 3D Picture Control VIs to draw a box with 4 cylinders as wheels. I use the roll, pitch, and yaw values from a gyro and position values from the wheel encoders as inputs to draw the 3D robot representation. I use these real time values in a while loop. I have noticed that the RAM usage increases at a very undesirable rate due to this while loop. Is there a way to dump the memory buildup to avoid this?

Thank you,
Lister Yu
0 Kudos
Message 1 of 9
(3,413 Views)
If you close all references, and you aren't building up arrays or strings,
there shouldn't be a leak. If you are sure that you do everything correctly,
you might have found a bug... There is no way to close open references all
at once (besides closing LabVIEW).

Regards,

Wiebe.


Message 2 of 9
(3,394 Views)
I feel weibe is right and i dont know anyway to close all the references at once!!!
0 Kudos
Message 3 of 9
(3,385 Views)

Hi

 

I'm having a similar problem.

 

I have a 3D picture inside a while loop, and depending on what happens in the loop, objects in the picture are drawn witih different colours.

As the VI runs, the memory usage increases everytime the 3D picture is drawn.

Eventually, LabView reports that there is insufficient memory for it to complete the current operation, and the VI is halted.

 

If I run the exact same VI, but with the 3D picture removed, the memory usage does not increase.

 

This is quite a problem for me, as I need to leave the VI running for time-spans of a few days.

 

Is there something I have/have not included which I should/shouldn't have?

Or is this a bug? If so has anyone reported it yet??

 

Dan

0 Kudos
Message 4 of 9
(3,328 Views)

The solar system example doesn't leak, so you must be doing something
specific that causes the leak. Can you post the smallest VI that shows the
problem?

Also, what version are you using?

Regards,

Wiebe.


Message 5 of 9
(3,316 Views)

Hi

 

I've run the Solar System example, and I agree it doesn't seem to have a leak.

 

I attach a demo I made of the graphic, which does seem to be increasing the memory usage with each time the picture is drawn.

It is essentially identical to the version in my full application (except that the booleans which determine the colour come from the VI rather than random numbers).

 

I am running LabView 8.5 in Windows XP, in a National Instruments PXI-1042Q with an NI-PXI-8106 Embedded Controller.

 

Thanks very much for youre time

 

Dan

0 Kudos
Message 6 of 9
(3,295 Views)

You are doing  "add Object"s in a loop. Of course it will leak. There has to be resource added each time you do this. Move your "add Object" outside the loop and then use the refrence inside the loop to update its properties/methods.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 9
(3,283 Views)

Ok

 

I'm have successfully moved all the add objects outside the loop as you suggested, however I am having difficulty getting the "color" property for the objects.

 

If I wire a reference from (for example) the create cydlinder VI, I can get the color property, however, when I run the application it haults saying the "object reference is invalid".

However, I cannot find any other terminals from which I can get the color property.

 

I'd appreciate it if you could tell me how to get this to work.

 

Thanks for your help

 

Dan

0 Kudos
Message 8 of 9
(3,269 Views)
You won't be able to access the "color" property inside the loop.  Instead, try applying textures or fog to the object.  For textures, you can make a small bitmap of the desired color and repeat wrapping for horizontal/vertical.  For fog, simply make the density "1" and vary the Fog.Color property.
Message 9 of 9
(3,212 Views)