LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cursor Move - Identify Graph

Hello...

I have a event structure that is triggered by cursor move of two different graphs (1 and 2). But since both graphs can trigger the case, I need to know which of them was used to trigger. In other words, the "cursor move" event that triggered the case came from graph 1 or graph 2?

 

Thanks in advance.

 

Code attached.

 

Dan07

0 Kudos
Message 1 of 5
(3,028 Views)
You could use a property node to get the label name of the control using the control reference.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 5
(3,021 Views)

It is simpler to just compare one of the control references with the event terminal (See image).

 

 

(If you have even more graphs, you could make an array of references, do and equal, then find the index of the changed element.)

Message Edited by altenbach on 03-08-2009 12:07 AM
0 Kudos
Message 3 of 5
(3,009 Views)

Hello Altenbach...

I understood your sugestion, but if I have a lot of graphs it will be not so easy to build a array. See attached image.

 

Is there a way to run a for loop to build this array, just changing the name of the graph? Since I use numbers to label my graphs (i.e: 1, 2, 3, 4....).

 

Thanks

 

Dan07

Message Edited by dan07 on 03-08-2009 10:02 AM
0 Kudos
Message 4 of 5
(2,992 Views)

dan07 wrote:

I understood your sugestion, but if I have a lot of graphs it will be not so easy to build a array. See attached image.


Well, if you have a lot of graphs, the problems of the front panel will probably exceed the small problem of creating an array of references. 🙂 Manually creating an array of references seems trivial and I don't see why you don't like it. 😉

 

Still, if you are really looking for a programmatic solution, you could do something along the lines of the attached draft. Seems more complicated, though! 😮

 

Message Edited by altenbach on 03-08-2009 11:13 AM
Download All
0 Kudos
Message 5 of 5
(2,978 Views)