NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
mi007
Posts: 13
0 Kudos

how to store the final value of a stopwatch

i have designed a vi for measuring the time elaspsed as the logic goes from true to false. it takes about 8.009 sec for the logic to go from true to false and it reset itself as logic goes false. i want this time (8.009 sec) as an input for further calculation but i am not getting this value. i have try to export this value to excel sheet and try to import these value from that excel sheet and try to get the maximum value but that doesnt workout. then i tried to build an array and gets its max value but it is also not working because the max value that is coming out is keep on changing in the range [0 - 8.009]. so can anyone help me in this regard because i want the maximum value for further calculation.

Trusted Enthusiast
BeCeGa
Posts: 2,060
0 Kudos

Re: how to store the final value of a stopwatch

Hi mi007, here is a small example of a VI that also measures the elapsed time, I added a button, to make it simple I am displaying in one indicator the enlapsed time of the event, but when the event happen just the total elapsed time is sent to a different indicator. This value is the one you could send to your excel file.

 The problem your having your current vi, saves all the values to file and when you serach for the max it will give you the max of the file not the maximun of the current event. If you want to continue using your vi, what you would need to do is place the write to file function inside of the case structure so it only saves values when the actual event happens. Also you dont need to change it into an array and then into a matrix to store it.

Best Regards

Benjamin C


By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page