LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ light meter

Solved!
Go to solution

I did some more testing to be sure:

 

Below an image which shows on top the program with disabled light meter, bottom with enabled light meter.
The left images are the through memory usages; on the right, always the maximum

 

ni screenshot.png

 

you see that on the bottom right image, the memory usage slightly increases, top right not.

 

all done with your vi (normal while loop)

 

Bruno

0 Kudos
Message 11 of 18
(1,817 Views)

When performing check in builded application you should change instance name (otherwise LabVIEW's memory shown instead of application on the graph):

 

app.png

 

As you can see also in builded application it works stable for me. Not sure which memory exacly you checking in Task Manager, but working set and private memory both are stable (well, they changed +- 3 MB as you can see, but over long time they are stable). In Task Manager I also don't see any leakage for the application.

0 Kudos
Message 12 of 18
(1,815 Views)
Solution
Accepted by topic author Biebel

@Biebel wrote:

 

you see that on the bottom right image, the memory usage slightly increases, top right not.

 



Yep, I see.

 

Try to insert IMAQ Clear Overlay directly before Light Meter:

 

clear.png

(or turn off Show Search Area)


Andrey.

0 Kudos
Message 13 of 18
(1,812 Views)

In my previous post, i changed the instance name to application..

 

Bruno

0 Kudos
Message 14 of 18
(1,811 Views)

 


@Andrey Dmitriev wrote:

@Biebel wrote:

 

you see that on the bottom right image, the memory usage slightly increases, top right not.

 



Yep, I see.

 

Try to insert IMAQ Clear Overlay directly before Light Meter:

 

clear.png

(or turn off Show Search Area)


Andrey.


with the IMAQ clear overlay between the nodes, it's stable here.

I'll use that solution allthough I see that the through problem is in the light meter itself (not clearing all its memory every time)

 

Thanks!


 

0 Kudos
Message 15 of 18
(1,803 Views)

Hello Biebel,

 

Actually, Andrey is right, it is caused by the "IMAQ Overlay ROI" function which is called inside the "IMAQ Light Meter" function.

When using overlays, you also have to clear them from memory when you don't need them anymore.

Thus, this is a normal behaviour.

See the link hereafter for more information: http://digital.ni.com/public.nsf/allkb/1C3A98C53018B57286256E510080B3ED?OpenDocument

Cédric | NI Belgium
0 Kudos
Message 16 of 18
(1,777 Views)

@cedhoc wrote:

 

Thus, this is a normal behaviour.

See the link hereafter for more information: http://digital.ni.com/public.nsf/allkb/1C3A98C53018B57286256E510080B3ED?OpenDocument


No! This is absolutely not normal behavior from software engineering point of view.

 

By default overlay is turned on in Light meter. In typical use case scenario I need measurement information only and not an overlay:

 

At least default value for Show Search Area should be set to FALSE. (CAR is required)

 

In ideal case this function should not produce memory leak also when Show Search Area is TRUE. That can be done if overlay will be added into internal Group, and cleared before each call.

Take a note - in typical use case scenario ROI is not changed, so the overlay added into same place again and again - visually you can't see any differences.

In general if someone has allocated some resources, then he is responsible for releasing these resources (see, for example ~Temp Light~ image inside of Light meter). This is difference between this "High level" function and the "Low level" functions listed above in given link.

 

Andrey.

 

0 Kudos
Message 17 of 18
(1,767 Views)

Hey Andrey,

 

Thanks for the update.

 

Actually, what I meant by normal behavior is that the "IMAQ Light Meter" function works exactly as stated on its specification (see this LabVIEW Help excerpt: "Image Out is a reference to the result image. The search area may be overlaid on the image according to the setting Show Search Area."). We are thus absolutely not confronted to a bug here.

 

That said, I totally understand your point of view. I agree the default value would better be set to False. For the rest, this is more a question of what functionality you want to add in your VI, and I guess it can be an endless discussion 🙂 

 

What I propose then is that you can perhaps add a post on the Idea Exchange forum (ni.com/ideas) on that matter? 

Cédric | NI Belgium
0 Kudos
Message 18 of 18
(1,748 Views)