02-09-2018 07:32 AM
Hello
I currently have labview taking a picture at specific time intervals.
How do i reset the millisecond timer value each time the program is ran to zero. Also how do i abort the program when the number of photos=photo number
02-09-2018 07:44 AM
Hi FTW,
How do i reset the millisecond timer value each time the program is ran to zero.
You cannot "reset" this value - it is just counting up (with a wrap-around after ~4e7 s)…
Also how do i abort the program when the number of photos=photo number
Why do you need a special abort condition?
Have a FOR loop run for "number of photos" iterations - and you're done…
- the wait time should belong into the FOR loop
- I prefer FormatIntoString
A very simple approach:
02-09-2018 08:03 AM
Thanks for the reply Gerd,
How do i reset the millisecond timer value each time the program is ran to zero.
Is there any way of having this counter go back zero.
Also how do i abort the program when the number of photos=photo number
Could you describe in more detail how to go about this.
02-09-2018 08:24 AM
That was all answered in Gerd's message #2.
02-09-2018 09:07 AM
Hi raven,
Im unsure to on where to place the for loop in the program without causing an error
02-09-2018 11:49 AM
What error? Gerd's message shows you the For Loop. And it is also a snippet. Save the picture to your hard drive. Then drag that file into your block diagram and you'll have actual LabVIEW code. (At least if you have LV 17)
02-11-2018 04:25 PM
There are two things you need to consider when using a loop -- under what conditions do you want the loop to exit, and at what speed do you want the loop to run.
The "When to End" can be controlled by a "Stop" condition (including "pushing a Stop button") -- the While loop uses this type of "End condition"). The "When to End" can also depend on a Count (i.e. "Do this N times") -- the For loop is an example of this type of "End Condition". Note that While loops can also "end after N loops", and the For loop can also "End on some Condition").
Loops run "as fast as they can", but also obey the Principle of Data Flow, that every element in the Loop needs to execute before the Loop can repeat. There are several Timing Functions, including the Wait (ms) and Wait on Next ms Multiple, which is what GerdW put into his second loop. Read the Help descriptions for both of these functions and you should be able to understand why GerdW did what he did.
Bob Schor