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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to start each iteration of one while loop after a certain time has passed for iteration of another while loop

Hi,

 

I am quite new to LabVIEW and this is my first post. I have attached the screen shot of my VI as well as the VI. What I want to do is, run the While Loop 1, which has a time delay of 6 second between each iteration and then, I want each iteration of While Loop 2 (which runs the For Loop 2 inside it for 3 iterations) to start 3 seconds after each iteration of While Loop 1 starts. Can someone tell me how I can do that? Thanks in advance. Please let me know if my question is unclear.

 

Tanveer

Download All
0 Kudos
Message 1 of 4
(2,835 Views)

For example you can use notifier

notif.png

 

Notifier can be any type but good idea send number of iteration

0 Kudos
Message 2 of 4
(2,814 Views)

1.  If they are dependent on each other (time wise), why not have them in the same loop?

2. You might benefit from learning the State Machine architecture.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 4
(2,811 Views)

Hi mdts, 

 

Sounds like you'd be best off using one while loop with 2 for loops inside it? Alternativly you can use a Producer Consumer Design. Your producer loop will run at a rate of 6 seconds and then the consumer loop will wait until the other loop has completed before it starts. Using the wait functions should get you what you want. 

 

http://www.ni.com/white-paper/3023/en/ 

 

Thanks 

 

Dan CLD

 

Daniel Harryman MEng
CLA, CPI
0 Kudos
Message 4 of 4
(2,808 Views)