07-10-2009 10:13 PM
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,
07-11-2009 12:20 AM
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.