Ignore multiple 'value change' events from a control
Downloads
Filename: finalize_slider_events.llb
Requirements: View
If you were to grab and move a slider (after having noted its starting value) back and forth for several seconds before returning it to the starting value and releasing it, you will have generated several hundred value-change events of all the intermediate values that the slider has passed through.
This behavior is fine if you want to have the real-time position/value of the slider reported out.
In some cases however all you want to see is the final new value of the slider. An example of this is when the slider is being used to set some parameter of an instrument controlled by the VI and the parameter change is communicated to the instrument by way of a long command string and a slow serial communication link. In this case you most certainly do not want to wait while the intermediate values of the slider are also communicated to the instrument, you just want the final value sent.
Until the event structure is upgraded (which it most definitely needs to be!) so that it can be configured to distinguish between "report all value changes" and "report final value change" a workaround is needed.
This example shows one way of accomplishing that workaround.
Requirements
Filename: finalize_slider_events.llb
Software Requirements
Application Software: LabVIEW Full Development System 7.0
Language(s): LabVIEW
Reader Comments | Submit a comment »
Legal
This example program (this "program") has been made available by a third party, which is solely responsible for its content. National Instruments has not reviewed this program, does not support this program, and does not guarantee its quality in any way. NATIONAL INSTRUMENTS MAKES NO WARRANTIES, EXPRESS, STATUTORY OR IMPLIED, WITH RESPECT TO THIS PROGRAM, INCLUDING WITHOUT LIMITATION ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT OF INTELLECTUAL PROPERTY, OR ANY OTHER WARRANTIES THAT MAY ARISE FROM USAGE OF TRADE OR COURSE OF DEALING. For details on terms of use or support of this program, please contact the code author or the site being referred at the top of this page. For further legal information, please visit http://ni.com/legal/termsofuse/unitedstates/us/.
