LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event structure:Button-Value change

Hi,
 
I am using LabVIEW 8.0. If i click the button,the value changes from false to true and the event executes.If i press the button twice or thrice then the event executes two or three times.How to control this? even if i press the button unknowingly for twice or thrice it has to execute only one time..how to do this??
 
Regards
Meenatchi
0 Kudos
Message 1 of 7
(4,111 Views)
You should use dynamic events if you want such behaviour.
See this article for some introduction.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 7
(4,108 Views)

Or use a shift register, compined with a timeout case.

Shift register will increase in every timeout case and write to zero at value change.

Ignore value change, if sfift register has a small value (<3, and a timeout of 100ms, will give you 300msec debounce)

0 Kudos
Message 3 of 7
(4,096 Views)
Hi,
 
If u want that kind of behaviour, user shift registers or you can use the dynamic event case.
Hope i have understood the problem and have provided the sollution.
 
Enjoy LabView,
Yogesh
0 Kudos
Message 4 of 7
(4,086 Views)
You should use a shift register to save the time that the event executed.  In the event you should compare the new time to the old time in the shift register.

case statement TRUE

If the new time is large enough (lets say 1000 ms more than the old time) then you should perform your action that the button push represents, and save the new time to the shift register.

case statement FALSE

If the new time is  not large enough (less than 1000 ms after the old time) then do nothing.



Your program is still responding the the event, but just not doing anything some of the time.
Randall Pursley
Download All
0 Kudos
Message 5 of 7
(4,062 Views)
can u send me sample code to do this??
0 Kudos
Message 6 of 7
(4,013 Views)
Here it is in LV7.1
Randall Pursley
0 Kudos
Message 7 of 7
(3,991 Views)