LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

check how many times button is pressed

hi i have a problem. i have to pass W1, let say the user press OK button. then 2nd time if the user press it should pass W2..and so on it is posibble in ni?
 And let say the user close the vi aftr 2nd time click the button. later went he open the vi again it should stores W3..
How to do tht?
0 Kudos
Message 1 of 7
(3,384 Views)

Hi Jeyanthi,

What re W1, W2 & W3?

Can you explain a bit more on what you are doing or what you are trying to achieve?

- Partha ( CLD until Oct 2027 🙂 )
Message 2 of 7
(3,375 Views)
Hi jeyanthi,
you can use a while loop with an event structure in it. Create a shift register in the loop. count every button value change in the "value change" event. To store the current value you can use an action engine. Call this (action engine) vi before the while loop to read the last value und after the loop to store the last value.
Mike
Message 3 of 7
(3,373 Views)
W1= Write1
W2= Write2......
 
hi Mike wat is action engine vi...how to tht can i get some example...plz
 
0 Kudos
Message 4 of 7
(3,371 Views)
Hi jeyanthi,
here is a short example (LV80) for you. The "sub.vi" is the vi in which is your button.
Hope it helps.
Mike
Download All
Message 5 of 7
(3,368 Views)
To know more about AEs read here and here.
- Partha ( CLD until Oct 2027 🙂 )
Message 6 of 7
(3,365 Views)
thk u very much
0 Kudos
Message 7 of 7
(3,361 Views)