Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Customer Submitted Example
Contributor Name: Warren Massey
Contributor Company: LLNL
NI Supported: No
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Ignore multiple 'value change' events from a control

3 ratings | 3.33 out of 5
Print

Downloads

Filename: finalize_slider_events.llb
Requirements: View

Each and every incremental movement of a numeric slider, dial, tank or thermometer control or continuously holding down the increment/decrement buttons on ordinary numeric controls, rings or enums will generate a series of value-change events that are queued up and subsequently acted on by an event structure that has been configured to watch for value-change events associated with the control.

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

 
3 ratings | 3.33 out of 5
Print

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/.