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: 

for loop inside while loop

Solved!
Go to solution

Would an event structure work if I need to run 5 devices at the same time? I did try before, but it seemed to work only on device at the time. Those 5 devices have the option of being simulated and tested. When simulated, they can run for many hours. When testing, that only takes seconds.

 

Thank you,

Cosmica

0 Kudos
Message 11 of 14
(621 Views)

You can always use an event structure to handle the user intereaction loop and handle trivial and quick tasks.

 

If you need to run things in parallel or in the background, these tasks need to be done in parallel loops.

0 Kudos
Message 12 of 14
(615 Views)

Do I need a while loop for each Test and simulate button? They both will use the same port. Right now, I do have a while loop for each device.

 

Also, I did try to put some delay time in the loop, but it seems still not to go over the for loop. I am logging data in the for loop, but the data seems to be logged until I quit the while loop.

 

Thank you,

Cosmica

0 Kudos
Message 13 of 14
(608 Views)

Altenbach,

 

I did some cleaning in my code, and the default output tunnels were the reason of my problem.

 

Thank you all,

-Cosmica

0 Kudos
Message 14 of 14
(583 Views)