12-30-2014 11:13 AM
The attached VI increments a count with each mouse click. Is it possible to increment continuously with the event structure while holding the mouse click? For example, if I want to increment the count from 1 to 100, I don't want to have to click the mouse 100 times, I just want to click once and hold.
Solved! Go to Solution.
12-30-2014 11:28 AM
If you play around with the timeout, this is easy to do. Use a shift register to hold what the timeout should be. When the button's value changes to TRUE, set the timeout to something like 200ms. When it goes to FALSE, set it to -1 (forever). Increment the value in the Timeout case. You will also want to change the mechanical action of the button to be Switch Until Released.
12-30-2014 11:41 AM
Here's a slightly simpler version that eliminates some duplicate code.
(Note that Tim and me both placed the indicator before the event structure. This eliminates the need for the reset operation.)
12-30-2014 02:04 PM
I changed altenbach's VI just a bit so that when you press increment it waits a certain amount of time (500ms in this case) before it starts increasing automatically. This can prevent a double increment if you do not release the button quick enough.
12-30-2014 02:11 PM
@Jacobson-ni wrote:
I changed altenbach's VI just a bit ...
... except that you posted in LabVIEW 2014, which the OP probably cannot open.