LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I can not make the graph display continuosly in detail

Hi,

I can not make the graph display continuosly in detail ( every second). It’s only display in detail for first 5 second.  I would like to know if I can do that with 2 while loops, one nested inside the other.  I enclosed the example.

 

Thanks in advance.

0 Kudos
Message 1 of 6
(2,980 Views)
What is the purpose of the inner loop? When you have identical code in more than one place, it is often a clue that your program structure should be re-examined. There are ways of passing data between loops, but it is not clear that more than one loop is needed for your program.

Lynn
0 Kudos
Message 2 of 6
(2,968 Views)
Hi Lynn,
I'm trying to read the data from the equipment and display on the graph. The outside while loop data is collected until condition is met and continue collecting data at inside while loop with difference setup but using the same equipment. The data was also save to the file ( it's ok for detail every second) but the graph is not display as in the data.
Is there anyway to make the graph continue display when passing from one loop to another?

Thak you very much for your help.

XN
0 Kudos
Message 3 of 6
(2,961 Views)
XN,

What you probably need is parallel loops rather than nested loops. Because of the LV dataflow pardigm, the code in the outer loop does not run until the inner loop finishes.

With parallel loops one loop will be the acquisition loop and the other loop will display the data. The data can be passed from the acquisition loop to the display loop via a queue or a functional global. (I think the VI you posted was in LV 6). The queue functions have improved quite a bit since then, so I do not recall the exact configuration. Each loop should have a wait to allow CPU sharing.

Lynn
0 Kudos
Message 4 of 6
(2,956 Views)
Hi Lynn,

My code is LV 8.2

I can not run in parallel loop because the setup of the 2 loops are not the same ( but using the same equipment)

Thanks for your help.

XN
0 Kudos
Message 5 of 6
(2,953 Views)
You can send a message from the display loop back to the acquisition loop to tell it to change setups. This is done all the time.

Lynn
0 Kudos
Message 6 of 6
(2,949 Views)