01-20-2012 01:56 AM
How can I stop an inner while loop when outer reaches its condition?
I wanted to use read local variables, but I dont think its a good way 😕
Can u give me an example.
If I want to use a template which one should i use?
01-20-2012 02:37 AM
I am not sure how that would work as the execution would be in the inner loop and your outer loop wont work when this is happening.
This post has some links which may be of interest if you have seperate while loops. http://forums.ni.com/t5/LabVIEW/One-loop-stop-a-loop/m-p/1839761#M628341
01-20-2012 03:06 AM
do you have a while loop inside another while loop ?
if this is so you can not stop outer while loop unless inner has finished.
01-20-2012 04:15 AM
HI
You can have two independent while loops to perform your operations. and then you can stop the other if any one of it stops.
01-23-2012 07:04 AM
Please post the VI so we will understand the problem.
At this moment, if you have a loop inside another while loop, because of the data flow, you should stop first the inside loop and after that take decision to stop the outside loop.
Kind regards,
Ion R.
01-25-2012 11:15 AM
hello all, I wanted the thermo couple to read in || with the rest of the sensors. I placed it now inside each sequence.
Today I had a presentation and a demo. It gone bad. 😕
We didnt try the vi and there was as error with the stop.
I think its the NI elvis that we used.
Can you guys fix the code.
01-25-2012 11:49 AM
Fix it?!? I can't even see it! Your IMAQ VI need an IMAX Theatre sized screen to view it.
You need to re-think your top-level structure. Dump the huge block diagram with all the sequences and roll it all into a state machine. At least then you'd have a prayer at de-bugging it.
01-25-2012 01:36 PM
A.A.A. wrote:Can you guys fix the code.
No! LabVIEW 2010SP1 actually crashed whe I tried diagram cleanup. 😞 This needs ot be rearchitected from scratch.
The solution is two words "state machine" (or one word "statemachine" for Germans :D)
01-25-2012 02:04 PM
NIquist, altenbach I really want to enhance my programing skills for future projects but I'm sad to say that I dont understand what you mean by state machine (almost all the replies on my previous posts ask to use state machine). Now that I summed up the courage 😛 can you give me a small example using state machine for two volatge read. Extra examples showing good state machine programs will be good.
Thanks
01-25-2012 04:07 PM
There are a number of state machine examples that you can find on the NI website if you search, here is one (https://decibel.ni.com/content/docs/DOC-10176). When I looked at your code it screamed out to me PLEASE MAKE ME INTO A STATE MACHINE! In designing a state machine think about the steps you need to take in order to achieve your end result, each step can be a state. When making your custom control to select the cases make sure that the control is saved as a type def so its easy to make changes later.