LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get coordinates of an element in an boolean array

Hi ...
How do I get coordinates of an element in an boolean array Control when the user click on it?
 

Is it possible ?
Please see attached image ...
Thanks

0 Kudos
Message 1 of 4
(3,144 Views)

There are several solutions, the most advanced is on LAVA and should work for any array.

 

Register for the mouse-down event and feed the coordinates and a ref to the array control into the VI, and it returns the element clicked.

 

However it looks likeyou want to know which element was changed?

If so XOR the OLD and NEW value in a 'value change' event, this should have one 'T', using an iterative search you should have no issues finding that one value:

19365iAFAA8E9996C2FE41

 

 

Ton

 

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 2 of 4
(3,127 Views)

Thank you so much
I was tested your idea (based on old XOR new) befor. But there are some problems in my program ...
Can you explain second solution further more ? This way brings back coordinates of situation of the mouse in screen. NOT coordinates of element. ???
And I got LAVA's program too. But I could not understand what does this program do !

Excuse me for my bad english 

0 Kudos
Message 3 of 4
(3,085 Views)

Here's how you would use the LAVA program:

19471iDE660682B9EB1F11

 

Here's a snippet containing both methods:

19473i7F4AEA3C3A0AB727

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 4 of 4
(3,077 Views)