06-30-2015 04:46 PM
I may be requesting the impossible...
I have a program that is a three-frame stacked sequence. In each frame there are case structures, in which there are while loops. In the while loops, it reads off the temperature from a piece of equipment.
I would like to have one output on the front panel, "Temperature", which reads from the "Get Temperature.vi"s in each of the frames. See image below. Am I out of my freaking mind to be trying?
Solved! Go to Solution.
06-30-2015 04:53 PM
You can create a local variable from that indicator and write to that in both loops which wouldn't be crazy.
A lot of times if you have two while loops in sequence that can be replaced by a single state machine that will remove the need to use local variables.
06-30-2015 04:56 PM
If I were to use a local variable, where would I put the indicator and the variable readout so that it updates in accordance with all of the loops?
06-30-2015 05:00 PM
You would feed the output of Get Temp.vi into the local variable. You can use the indicator in place of one of the local variables but it doesn't matter where it is becuase local variables break dataflow.
06-30-2015 05:05 PM
You need to re-think your code, too many beginner mistakes.
See how far you get....
06-30-2015 05:08 PM
Neat! Thanks a ton!
06-30-2015 05:16 PM - edited 06-30-2015 05:17 PM
@urlmichael wrote:
Neat! Thanks a ton!
And here's the right way using a (very primitive) state machine... 😄
No sequences or local variables needed.
06-30-2015 05:20 PM - edited 06-30-2015 05:23 PM
Thanks for your input!
The VI that I posted is not the VI that I'm working on. I just made the one that I posted to give the forums a graphical representation of the problem that I am working with.
I see how you formatted the VI - this is definitely the right way to do it if that were all that I wanted to do. However, there are a lot of other parts of my main VI that would not fit into this.
So Sadly I cannot really apply the code that you posted. However, I looked it over and I thank you because I am always trying to do things the most efficient way possible
Thank you!