LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

click and get the time multiple times

Hi,

I'm writing a subvi that should give me the elapsed time in 5 different times. I put some booleans and connected them to the time elapsed in case structures. so if rue it gives me the elapsed time,. however i am running the vi as a subvi in a while loop. 

as i make the boolean true, it changes continously with the value of time elapsed. I just want the time instance when it becomes true.

any help will be greatly appreciated 🙂

Darya

0 Kudos
Message 1 of 3
(2,111 Views)

Hello Darya,

 

It sounds like you'll want to change the mechanical action of your Boolean controls to "Latch When Pressed" or "Latch When Released".

 

Another option would be to create an Event Structure that updates the time whenever the value of the Boolean control goes from False to True- it depends on what you want your UI to do and what you feel comfortable programming.  The event structure will give you much better accuracy; otherwise you'll need to check for a button press at very short intervals.

 

Regards,

 

Tom L.
0 Kudos
Message 2 of 3
(2,106 Views)

Thanks for the reply Tom,

I tried the mechanical action, I cannot record the value since it just makes it true reads it and disapears to false 0 value.

my problem with event structure is that I have to wait until the event happens but I want the vi to run even if a checkpoint is missed (a boolean remaines false(the event doesnot happen)) and still be able to get other times..... 

0 Kudos
Message 3 of 3
(2,085 Views)