Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

coordinate

Solved!
Go to solution

Hello,

 

the event you call "mouse up" is not a button event, but an image event!

 

So, click on this event, select "edit events handled by this case" -> select "Image" -> select "mouse up". You can get rid of the button "mouse up".

 

Also, your stop button does not work for me, since the matching loops continuously and seems to override all other events.

 

Tell how it goes.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 11 of 14
(2,743 Views)

actually i think that when i enter into the button event" mouse up"  i can mouse click two point . However if i change the top level button event to image event, i can  not click twice because if i change the top level while loop(loop twice) all the top level event while change accordingly.

 

I use the highlight execution and find that when i enter into the button event "mouse up " the vi isn't  let me to mouse click two points.so any suggestions that  i can click twice and get the two points coordinates? by the way  is that right to get the two coordinates from the shift register (the way i use)?

 

for the stop button i also do not know why i can not stop in the match event ?

 

 

0 Kudos
Message 12 of 14
(2,736 Views)
Solution
Accepted by topic author aliceou

Hello,

 

I am attaching slightly corrected "Main.vi". If you select the "rectangle ROI" tool, you can learn the template, if you select the "point ROI" tool, you can select the coordinates. (I cannot attach a .vi file so i changed it to .txt - just change the extension back to .vi).

 

I do not understand why your entire program is event driven. It's a bit strange, especially the matching part... But anyway, for matching, you could use a timeout event, insted of indefinitely waiting for a button event. I suspect that's why you cannot stop the program after performing the matching.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 13 of 14
(2,727 Views)

many thanks for your kindly help

0 Kudos
Message 14 of 14
(2,718 Views)