LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

memory is full at for loop tunnel

Hi
I am a new user to labview. I have the following problem. Whenever I try to run the vi the following msg appears
"Control sub. vi" was stopped at loop tunnel 0x976c of sub vi "control sub.vi"
I m using LV-7.0, Win xp, 256 Ram
I am attaching the file.
0 Kudos
Message 1 of 4
(3,061 Views)

Once you set the input value for step to a nonzero value, the error will no longer occur.

(A step zero will cause an infinite number of loop iterations and you run out of memory).

 

There are still quite a few weird constructs, here are a few comments. Their meaning will become more clear once you have more experience with LabVIEW.

  1. STOP, is to stop the VI, not to stop a FOR loop. A FOR loop will run a predetermined number of times, if you need to stop the loop according to some condition, you need to use a while loop.
  2. It is not clear why you use a built array node inside the loops. Just remove it and you'll create a 1D array at the loop boundary. No need to slice it out later.
  3. You have the same code 4 times. You can write it once and put it inside another FOR loop that runs four times. You could even turn it into a subVI.
  4. There is no need to use a stacked sequence. It only clutters up the diagram and makes it less clear.

See how far you get. Good luck and happy wiring! 😄

0 Kudos
Message 2 of 4
(3,055 Views)
Some additional notes:
 
I am pretty sure you have the "from" and "to" controls reversed in your code.
 
If you make the "from", "to" and "step" inputs each an array with four elements, you significalty reduce clutter and you can use an autoindexing outer FOR loop to generate a ramp for each of the four sets. Attached is a quick LabVIEW 7.0 draft how you could do that. (I replace the file write with an array indicator. It is easier for debugging.)
0 Kudos
Message 3 of 4
(3,053 Views)
Thanx for ur help. U really improved my program. I appreciate it.
0 Kudos
Message 4 of 4
(3,019 Views)