From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

imaq extract

Solved!
Go to solution

Hi Everyone, 

 

In the attached VI I have got a problem on the mouse up event, I don't understand why after using the Imaq Extract VI only the image2 control keeps displaying its image.

 

Thanks, 

 

Best Regards,

0 Kudos
Message 1 of 6
(3,003 Views)
Hi Olivioloyer
Can you upload in lv12(using file>>save for previous version)
Thanks
uday
0 Kudos
Message 2 of 6
(2,995 Views)

Sure, 

 

Here it is, with the images to check software

 

Thank you, you are the one trying to help.

0 Kudos
Message 3 of 6
(2,985 Views)
Solution
Accepted by topic author Olivioloyer

Hi,

Thanks for uploading code in lv12 version.

 

Few suggestions to improve code. Please go through the design patterns available in labview to simplify code..

http://www.ni.com/white-paper/7605/en/

 

-If you want all the four indicator to have different images, you need to have four imaq create for each of them.

-Instead what you did is, you created image1 and image2 and you are sending or processing on the same images and it is main reason for confusion.(or this is how you wanted??)

-Please explain a little bit of what you are doing in the code, for me it was too much confusing.

Thanks
uday
Message 4 of 6
(2,971 Views)

Hi Thanks udka, 

 

That solved it, one kudo for you,

 

What I don't understand though is why only Image 2 was actualized, as I had one imaq create for image 1 and image 2,

 

I don't really understand why you find it confusing as everything is managed by events, but I'll have a look at the link you sent and try to see what is missing in my programing.

 

Thanks a lot.

 

Best Regards,

 

 

0 Kudos
Message 5 of 6
(2,945 Views)
Sorry for delay in reply.

Why it is confusing?
-You are doing all UI events and Image processing everything in single event structure and loop.
-It is better ( in general) to have separate loops for UI events and Processing.
Lets say you are in some event which is doing some processing and if you try to press any button, that button event will occur only after the current processing is done.
-Even i don't understand it properly. But if we are using the same pointer at the same time in two different operations you never know which will access image and try to operate on that image. So, it i better to have different buffers.
Thanks
uday
0 Kudos
Message 6 of 6
(2,883 Views)