07-07-2009 05:34 PM
I have a numeric control on my front panel. I want to do something (write that number out to a gpib instrument) ONLY when it changes.
I was hoping the numeric control would have a bolean property node that would be true only when an increment or decrement button was pushed.
I've done it before with a loop tunnel and comparing the present numeric value with what it was the last time, but that is cumbersome and not very efficient, I'm sure...
THanks
07-07-2009 05:38 PM
Use an event structure and you can use the "Value change" event.
Alternatively, you can use the OpenG libraries. It has a little VI that spits out a Boolean to indicate if a value has changed.
07-08-2009 11:54 AM
Hey JLH99,
I agree with smercurio_fc, an event structure is a good choice. This allows your program to sit idle until the even of a value change occurs, at which point you will be able to move on with the rest of your program. Check out this Tutorial for a little more information on event structures.