06-28-2017 09:10 PM
In my VI, i want ,for each value of outer-loop, inner loop should run completely. But in my case for every alternative value of outer loop, inner loop only runs for 1 times only, while it should run n-times.One can check the 'results'.
I am new to LabView and would appreciate any new way of doing the same code.
Aim of the code:
For each value fed to outer loop, inner loop should run n times forward and backward depending on 'single sweep ' status. I have included case structures inside each loop to be able to do forward and backward sweep of values in both loops.
Solved! Go to Solution.
06-28-2017 09:53 PM
I think you are going to have to debug this one yourself, perhaps by using highlight execution and probes.
The next while loops along with nested case structures means everything becomes exponentially more complicated. With that, throw in a feedback node, and complicated boolean logic between the string of NOTs, ANDs, and ORs, I bet the results of the boolean calculations are just coming out True and stopping those inner while loops when you don't want them to.
06-29-2017 02:25 AM
Your False cases are supposed to go backwards through the same steps, but you still have the "Not" in that case which means that the backward stepping cases will only run once - they immediately output False from the inner cases (not Less than or equal to the minimum, for example) and then the Not makes the stop condition True.
Possible fix: Remove the "Not" in the False outer case in the bottom (inner loop).
Do you want it to count up and then down, or just up?
06-29-2017 02:44 AM
Actually i wanted to count both up and down irrespective of sign but should have a flexilbility to do either up or down also
The program should count from start to end and then come back to start in case of "single sweep" is disabled while program should count from start to end only in case of "single sweep" is abled .
i will try the fix and get back to you
06-29-2017 02:49 AM
there are four possibilities for the program to perform.
1. Outer loop runs forward and reverse and inner loop runs forward and reverse for each outer loop value(i)
1. Outer loop runs forward and reverse and inner loop runs forward only for each outer loop value(i)
1. Outer loop runs forward and inner loop runs forward and reverse for each outer loop value(i)
1. Outer loop runs forward and inner loop runs forward for each outer loop value(i)
06-29-2017 05:29 AM
06-29-2017 10:00 AM
06-29-2017 10:26 AM
this works very fine for positive values but i can now do it for negative values also. thanks
06-29-2017 10:44 PM
Hi cbutcher
The program runs for negative also, sorry for the previous reply. Thank you