06-19-2011 11:53 AM
Hi,
I'm having a problem in my program that I can't understand why happen.
The program don't run the for loop, that's in the picture.
As you can see, if you run the program, the boolean "FOR TESTE" never turns on.
Thanks for your help,
Sílvia
06-19-2011 12:01 PM
One of your incoming arrays that are auto-indexed is empty.
06-19-2011 12:16 PM
Thanks for your prompt help.
Which one of the arrays are empty? The values in the "Input read" came from the DAQmx.
If the for have an input array with 3 values and another with 1 value, this can happen?
Best regards,
Sílvia
06-19-2011 12:25 PM
You have numerous input arrays. It is difficult to tell which are in and which are out because you only have a portion of the VI in your image, and some of those are entering through the top and bottom of the loop. The loop will run the number of times equal to the shortest array. If you actually had an array with 3 elements and an array with 1, it would run 1 time. But you have more arrays than that, and one must be empty. Put probes or indicators on the arrays that enter your loop and to figure out which one it is.
06-19-2011 12:59 PM
The begin of the problem is here, where I initialize the variables that come into the loop from the bottom.
Before the "Array aux" was empty, I correct that but now the for only run one time.
Another doubt is why I can initialize the "Array aux" as a 3D array.
Best regards,
Sílvia
06-19-2011 01:03 PM
@sreis wrote:
The begin of the problem is here, where I initialize the variables that come into the loop from the bottom.
Before the "Array aux" was empty, I correct that but now the for only run one time.
If it only runs one time, then one of your arrays has only 1 element.
Another doubt is why I can initialize the "Array aux" as a 3D array.
Is this a question? If so, what is your question?
Best regards,
Sílvia
06-19-2011 01:11 PM
The "Array aux" is a 3D array, I initialize the lines, the columns, but I can't initialize the pages..
How can I do that?
06-19-2011 01:25 PM
Change the 3rd index and you'll see the other pages.
But a better choice is to use the Initialize Array primitive assuming you want all of the elements initialized to the same value.
06-19-2011 02:03 PM
What's the "Initialize Array primitive"? Where I find that?
The program it's working.
Many thanks,
Sílvia
06-19-2011 04:46 PM
A primitive is just a native LabVIEW function such as add, divide, etc. Under the array pallette there is a function to initialize an array.