ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

continious loop

Solved!
Go to solution

On the lower half of stop switches, I want to record just the initial time when the switch closes because it will remain closed for a long time after. I am unsure of how to how to record this initial time because currently the time keeps increasing as long as I hold the switch closed. The first set of switches (start) do not need this same modification. They work correctly. I have attached my current VI.

 

Thanks so much!

0 Kudos
Message 1 of 8
(3,795 Views)

I would suggest taking what the boolean value was on the previous cycle.  Then a case structure stating  current run = previous run, if false then record new value.

 

Do this for each boolean.  Should work, I've used similar logic in the past.

 

I'm afraid I dont have time to show you by work on the vi at the moment.  Sorry if I havnt been very clear.

_________________________________________________________________________________________________

That glass?

Thats glass is neither half full or half empty....
Its twice the size it needs to be
0 Kudos
Message 2 of 8
(3,785 Views)

I do not understand why you OR the data with an array of False, but that is not relevant to your question.

 

To detect the change, us a shift register.  When the current value is True and the previous value is False, then record the transition time. 

 

Lynn 

0 Kudos
Message 3 of 8
(3,784 Views)

Thanks for your quick response!

 

I'm afraid I'm still confused. Would anyone be able to show we on my VI?? Thanks so much!

0 Kudos
Message 4 of 8
(3,781 Views)
Solution
Accepted by blizabeth37

I cannot test it because I do not have the DAQ hardware.

 

Lynn 

0 Kudos
Message 5 of 8
(3,764 Views)

Awesome!

 

The only problem is it is opposite. I want to record the intial time when the switch closes and remains closed...right now the time stays constant when the switch intially opens. How do I switch that??

 

Thanks so much for your help!

0 Kudos
Message 6 of 8
(3,753 Views)

I actually just figured it out! I just removed the boolean NOT because it was opposite.

 

Thank you so much! You were so helpful!

0 Kudos
Message 7 of 8
(3,748 Views)
Remember to mark as solved Smiley Happy
_________________________________________________________________________________________________

That glass?

Thats glass is neither half full or half empty....
Its twice the size it needs to be
0 Kudos
Message 8 of 8
(3,740 Views)