LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Control Actualizes When MouseOver/MouseClick

Hi Everyone,

 

I have a large VI for a vision application with various IMAQ controls.
One continuously show video, another is actualized only under certain conditions and should only be actualized under these conditions. Its stores a frame of the video.

 

The problem is when the control detects a mouseover or mouseclick event it actualizes itself with the actual image from the camera.

 

I don't understand why because I only copy the value of the video frame at the determined moment.

 

You'll find enclosed a copy of a much more simplified VI that reproduce this behaviour with the mouseclick event, I don't know why this one does not actualizes with the mouseover event

 

Thanks a lot,

 

Best Regards,

0 Kudos
Message 1 of 4
(2,736 Views)

Hi Olivioloyer:

 

The Image Indicator Updates because your program is referencing a memory location so every time the While Loop runs the Get Image VI it updates the memory location of your image. Every time you click the image Control it updates because this control has many functions like zoom so it needs to do this functions with the most recent image in memory. If you don´t want to Update the control I recomend the following implementation.

Juan Arguello Director Support Services @NI
0 Kudos
Message 2 of 4
(2,705 Views)

Hi JuDA,

 

Thanks for your answer.

 

From what I understand what you did is basically remove the acquisition from the loop, unfortunately I don't see a simple way to do that in my actual application as it envolves much more than a while loop and everything is managed with events, like this acquisition which must be able to execute each time I restart it.(see attached picture).

From what I understand it should have the same behaviour as the acquisition event is fired in one event only and not executed each time the while loop is executed, Is that correct?

If not, does splitting the event in 3 part like: Start acquisition, save image, stop acquisition would solve the problem?

 

Another solution: Do you think isolating the mouseOver, MouseClick and MouseMove events for this control would allow freezing the image in the expected conditions?

 

Thanks,

 

Best Regards,

0 Kudos
Message 3 of 4
(2,689 Views)

Hi Olivioloyer:

 

What I did was to remove from the while loop the initialization and configuration of the Images acquisition. The actual acquisition is still being done on the while loop, this is the best way and most eficient way of performing the acquisition. You can move outside the Loops al the other VIs as the example I sent you and just send the Reference Cable to the event structure where you are acquiring the image. The case structure indicates if you acquiere the image or not. The problem with the Mouse over update are not the events, it is how the Image Display Indicators work. Everytime you click or Mouse Over the Display will update because it refreshs the memory location, so it is better to stop the acquisition when you dont need it.

Juan Arguello Director Support Services @NI
0 Kudos
Message 4 of 4
(2,675 Views)