LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with nested while-loops

In my vi, there are some nested while loops.The outside while loop access data from the network using TCP read, and pass to the inner while loop, which plots that to an Intensity Chart.There are many parallel while loops in the inner layer as there are many Intensity charts.The problem is that as the program flow enters the inner loop, it does not come out of it.It goes on executing the inner loop with the first data.The TCP Readfunction also does not takes placee after the first read, since the program is stuck inside the inner loop.how can i get out of the inner loop after each iteration and wait in the outer loop to perform the TCP Read ?
0 Kudos
Message 1 of 2
(2,881 Views)
Put the TCP read in a loop parallel to the processing/display loops. That is, the TCP read is in a while loop all all by its self, no nested loops in it. Then another while loop handles the processing and display. Pass the data from the TCP read loop to the process display loop with Queues, Local Variables, or whatever suits you.

Good luck.
0 Kudos
Message 2 of 2
(2,881 Views)