09-26-2021 07:37 PM
I am trying to delay the execution of a while loop, with all other while loops executing as I run the program. However, due to the time sensitivity requirement of my program, I have to use "Wait Until Next ms Multiple", as the "Wait" function is simply too inaccurate for it, after 10minutes of running, it will not work as intended.
Please help me on this front. I have included a very dumbed down sample program, where hopefully Boolean 2 is able to switch 100ms later than Boolean 1. I am currently using LabView 2011.
09-26-2021 09:57 PM
You're going to need to describe things a lot more thoroughly. The "dumbed-down" program is 2 parallel loops whose timing is defined to be EXACTLY the same. That's way too much dumbing down.
-Kevin P
09-27-2021 07:22 AM
First of all if your timing is really that critical then you should consider using a real-time target.
Without seeing more code (I agree with @Kevin_Price that your example is basically useless) I would suggest that you could message Loop 2 when Loop 1 starts - then delay and start loop 2.
09-27-2021 07:28 AM
If all you want to do is run the first loop until it stops then run the second loop all you have to do is wire a signal from the inside of the first loop to the border of the second loop. That signal does not have to do anything. Just wiring it up to the border defines order of events.
If you want to loops to run in parallel with one stalling while the other runs then there are multiple ways to approach that. For example two timed loops with event structures.
09-27-2021 08:55 AM - edited 09-27-2021 08:56 AM
Let's say you have 3 For Loops, all running synchronously at, say, 1 Hz (i.e. once/second), but with the contents of the last loop delayed by 200 ms from the other two. Use Wait until Next ms Multiple to synchronize all the Loops (wire a U32 to the input to avoid the coercion dot), but add a 200 ms delay in the third before the Loop contents start to execute. This is (one of the few) good use(s) for a Frame Sequence.
Bob Schor