LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Software in the loop on controls

Solved!
Go to solution

Okay- really poor thread title admittedly as it's difficult to encapsulate the problem in that few words.

 

I have a big old complicated front panel control - arrays of clusters which themselves include arrays, etc. When a control is clicked on, I want to make a decision in software on how to respond and then update the control accordingly. I can do this with events but it's messy- the controls flicker before the software gets a chance to update them, so for example if the user clicks on an empty array space, the array will grow for a fraction of a second before I resize it back to the old size.

 

Is there any way around this?

0 Kudos
Message 1 of 5
(2,497 Views)

Hard to say without seeing it myself.

 

But I suspect that you could use a filter event instead or a normal event to capture the click before LabVIEW actually responds to the click.  Discard the click and do whatever you need from there.  This could get a little complicated.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 5
(2,469 Views)

I wasn't aware of the ability to filter events- that leads in a useful direction. The only problem is this-

 

Using a 'value change' event I can find what item within the structure was clicked by comparing old and new values, and acting accordingly. With a 'mouse down?' I can't- all I can see to tell me what was clicked is the mouse co-ordinate, and it would be a serious pain to convert this to a 'what was clicked?' programatically.

 

I could do with something like a 'value change?' event- where I can pull up what the modified cluster value would be if the click was processed so I can easily search for the modified element.

 

Any more thoughts?

0 Kudos
Message 3 of 5
(2,453 Views)
Solution
Accepted by topic author ToeCutter

You can still keep track of the previous values in a shift register/feedback node to know what values changed.  Or you can use the mouse coordinates to determine what array elements the mouse is over.  There are examples on how to do this on NI's site.  Here is one of them but I think there is a cleaner version somewhere.

Message 4 of 5
(2,438 Views)

Thanks Hoovs- looks like working from mouse coords is the way forward.

0 Kudos
Message 5 of 5
(2,392 Views)