From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-20-2008 02:46 PM
10-20-2008 03:12 PM
I am not good at reading long and complicated descriptions.
Could you instead just attach a small VI that demonstrates the problem?
(Maybe you could e.g. do a boolean ["i==0" OR "time elapsed"] as a case selector)
10-21-2008 09:23 AM
10-21-2008 09:24 AM
10-21-2008 10:40 AM
Are you running this with the "continuous run" button??? 😮 Don't!
(Have you tried my boolean solution mentioned above?)
10-21-2008 12:53 PM
10-21-2008 02:05 PM - edited 10-21-2008 02:06 PM
You don't have to use seperate logic for the case where time is zero.
Instead, you can sneakily assign your start time to be exactly equal to the present time minus one data recording interval. This way, the clock starts at the elapsed time and intstantly records a point.
See the attached VI. There is a version saved for labview 8.0, and one saved for labview 8.6.
Cheers
-root
10-21-2008 02:41 PM
Hi,
Like you admitted, using a State Machine would be ideal in your case (and would also make it easier to understand )
In you case you can just use a select case and check if the time is less than a minute or more than a minute. Use the time less than a minute as one of the states and time more than a minute as the next state. This way your code gets more concise, don't have too many cases structures and you dont have local variables.
Let me know if you have more questions about this!