06-07-2010 09:40 AM
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!
Solved! Go to Solution.
06-07-2010 09:47 AM
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.
06-07-2010 09:48 AM
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
06-07-2010 09:51 AM
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!
06-07-2010 10:16 AM
I cannot test it because I do not have the DAQ hardware.
Lynn
06-07-2010 10:41 AM
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!
06-07-2010 10:45 AM
I actually just figured it out! I just removed the boolean NOT because it was opposite.
Thank you so much! You were so helpful!
06-07-2010 10:58 AM