LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

running a while loop within a while loop

Hi
 I am making an executable where all controls are programatically derived - no use of Labview buttons.
 
I have a bit of a dilema with this vi that I am making:
 
I have a while loop to run my executable vi which does the data processing. These results are stored in an array - each column representing one set of results. I then want to plot these results and i want to do it column by colum (column specified by a control on the front pannel) while the main processing vi is still running. So i put the plotting part of the code in a while loop, which itself is inside the main while loop.
 
OK this sort of works...(well, not really): I can run the processing no problem, then I can also plot selected columns using the front pannel control to select the colums I want to plot. However when i want to go back and re-run the processing bit of the code, I cannot because the the plotting loop is running.
 
So basically I want to run my processing vi - check out the graphs - change certain parameters if needed - rerun the processing vi - plot again and check out the graphs - change parameters - rerun processing vi - plot, etc.
 
 
0 Kudos
Message 1 of 2
(2,513 Views)
Hello RVR,

if you want to have independent process control and display of results you have to use seperate, independent loops. Then you have to program the dataflow between the loops (search this forum for queues, local or global variables). You will find many threads on how to communicate between parallel running loops.


Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(2,504 Views)