LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array of Clusters with Graph - Y Scale Change Event

Solved!
Go to solution

Hello everyone

 

I have a Array of Clusters with a Graph inside each cluster. I need to trigger a event when the user type a new value on the graphs' Y scale and hit "Enter" to apply the change. Any ideas how to trigger that?

 

I am not considering the "mouse enter" event because I have other events linked with that already.

 

Thanks

 

Dan07

0 Kudos
Message 1 of 13
(8,565 Views)
Solution
Accepted by topic author dan07

Since the Graph is inside of an array, you must dynamically register the Scale Change event. Typical static registrations are not allowed for array elements, and there's not a good reason why they cannot be allowed, which is why I created an Idea to Allow Static Event Registration of Array Elements. Hopefully you'll go the Idea Exchange and vote for that idea.

 

19807iA8B1065C9F1CD1E6

Message 2 of 13
(8,550 Views)

Since key events are detected only when they relate to a change in the array index control, the only possibility should be to check for a change in the Y scale.

This is easy once you know how to play with the class references, as in the example below.

 

19809i0CB3B6192793B1EA

 

Edit : I have to study with attention Jack's solution. Never too late to learn ! 😄

Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
0 Kudos
Message 3 of 13
(8,549 Views)

Better ?

 

19811iF9872B5A3641C3CB

Chilly Charly    (aka CC)

         E-List Master - Kudos glutton - Press the yellow button on the left...
        
Message 4 of 13
(8,537 Views)

chilly charly, you can actually directly create property nodes and references from an array element without needing to first reference the top level parent element (in this case, the array) and drilling down to the element of interest. (This is why my first snippet works, even if the waveform graph is buried inside a cluster inside an array)

 

19813i8B6292F263B9219B

Message 5 of 13
(8,535 Views)

Jack

 

Your idea worked like a charm in my code. Nevertheless, if I have two graphs? Lets call them Waveform Graph 1 and Waveform Graph 2. I would like to trigger one case of the event structure when the scale range of Waveform Graph 1 is changed, and trigger a different case when the scale range of Waveform Graph 2 is changed. How do I feed the Dynamic Event Terminal with both?

 

Thanks

 

Dan07

0 Kudos
Message 6 of 13
(8,534 Views)

 


dan07 wrote:

Your idea worked like a charm in my code. Nevertheless, if I have two graphs? Lets call them Waveform Graph 1 and Waveform Graph 2. I would like to trigger one case of the event structure when the scale range of Waveform Graph 1 is changed, and trigger a different case when the scale range of Waveform Graph 2 is changed. How do I feed the Dynamic Event Terminal with both?


If you have two waveform graphs (e.g., the array has two elements) each waveform graph must have the same properties... meaning they must have the same scales. You cannot think of the graphs as being separate: the must have exactly the same properties (even though they may have different data).

 

Another way to look at it is they are not two waveform graphs, just two instances of one waveform graph. Therefore, calling them WaveformGraph1 and WaveformGraph2 might be misleading - they are both WaveformGraph.

0 Kudos
Message 7 of 13
(8,526 Views)

 


@JackDunaway wrote:

 

If you have two waveform graphs (e.g., the array has two elements) each waveform graph must have the same properties... meaning they must have the same scales. You cannot think of the graphs as being separate: the must have exactly the same properties (even though they may have different data).


 

I think that I was not clear. Sorry. Lets thing about two arrays of clusters with graphs: Array of clusters 1 and Array of clusters 2. Both of them have their own graphs insides the clusters.

 

I want to do the same thing that you told me to do, but with two arrays of clusters instead of one. Changing the scale range of any graph of array of cluster 1 will trigger case A of event structure (just an example), and changing the scale range of any graph of array of clusters 2 will trigger case B of event structure (just an example again).

 

Thanks

 

Dan07

0 Kudos
Message 8 of 13
(8,521 Views)

 


@dan07 wrote:

 

I think that I was not clear. Sorry. Lets thing about two arrays of clusters with graphs: Array of clusters 1 and Array of clusters 2. Both of them have their own graphs insides the clusters.

 

I want to do the same thing that you told me to do, but with two arrays of clusters instead of one. Changing the scale range of any graph of array of cluster 1 will trigger case A of event structure (just an example), and changing the scale range of any graph of array of clusters 2 will trigger case B of event structure (just an example again).


 

Then try the following. Dynamic Event Registration nodes are expandable:

 

19815iC50AF4E4C08F8F54

Message 9 of 13
(8,511 Views)

 


@JackDunaway wrote:

 


 

Then try the following. Dynamic Event Registration nodes are expandable:

 

19815iC50AF4E4C08F8F54


 

Sorry for the dumb question. Now I got what I need using this expandable Registration Nodes. I have not been playing with Dynamic Events in my last VIs because they were very simple. But right now I am working on a big VI and sometimes is hard to get some specific properties or changes of objects inside clusters, inside arrays, etc. What's the main application that you have for Dynamic Events? In other words, what's the main advantage that I get using Dynamic Events?

 

Thanks

 

Dan07

0 Kudos
Message 10 of 13
(8,506 Views)