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: 

how do i display data collected inside multiple loops

I use a loop to continously read data from an instrument. When the data value reaches a particular value I need to turn off a port and go out of the loop. I again go inside a new loop and read the instrument again and have to stop the loop when the output reaches a different fixed value.There can be a sequence of such loops which run after one another.

 

I want to display the data being read in one graph/chart and also to save it in one file with timestamps. However the chart/graph have only one input port which can be connected from only one loop.

 

Regards,

0 Kudos
Message 1 of 2
(2,147 Views)

The quick fix would be to use local variables or property nodes of the charts or graphs.

 

The proper fix would be to set it up with a state machine architecture.  You would only have 1 loop.  Inside of that is multiple cases such as turn on port, turn off port, read instrument.  Each iteration of the loop, you look at your conditions and determine what is the next step to run, which may even be returning to the same case because your special conditions have not been met.

0 Kudos
Message 2 of 2
(2,139 Views)