LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dependent While Loops

Hello,

 

The aim of my program is to continuously transmit and receive data in real time.

I've tried doing this with a while loop for the transmit and receive. However, the receive inputs are dependent on the outputs from the transmit (which are stuck in the while loop). 

 

Is there a way for data to flow out of the first while loop and into the second, while still circling the first while loop? 

Maybe a while loop isn't the best option?

 

Thank you! 

0 Kudos
Message 1 of 3
(1,283 Views)

Redo the tutorials so you can learn about data flow.

 

You should have only one while loop.  (And get rid of those sequence frames as they are not needed.).  Create and start your tasks before the loop.  Read and write in the loop.  End the tasks after the while loop.

Message 2 of 3
(1,271 Views)

As RavensFan said, in this case you probably only need/want one loop.

 

More generally, to pass data between loops that are executing at the same time, you can use a Channel Wire or a Queue.


GCentral
0 Kudos
Message 3 of 3
(1,248 Views)