LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview not entering for loop

I have an application that has 2 for loops, in one, I read a tab delimitted txt file, and in the other, I read all files in a folder.

I am trying to compare the names of the files in the csv with the names of the files in the folders, and generate an array, with the last 6 characters of the last folder path.

From what I can understand, my code should work, but it doesn't even enter the first for loop.

Please help me.

Thanks.

0 Kudos
Message 1 of 6
(2,687 Views)

Have you probed the output from the read delimited spreadsheet vi? Do you get anything out? If you do not then that is your problem.

 

Can you post the CSV file so we can see what you are trying to process?

Tim
GHSP
0 Kudos
Message 2 of 6
(2,681 Views)

I used a probe of the file, and it reads perfectly, but it doesn't enter the for loop.

0 Kudos
Message 3 of 6
(2,677 Views)

can you post the csv file?

Tim
GHSP
0 Kudos
Message 4 of 6
(2,670 Views)

 

How many files are in the recursive file list from the lower path control? Why is the "folder" path control not to set for "folders only". Since it is so narrow, it is hard to tell what it actually contains, so make sure to resize it sufficiently and that it points to a folder and not to a file. If that resulting recursive list is empty, the inner loop will iterate zero times and since there is no code in the outer loop, you won't be able to tell the difference unless you do execution highlighting or probing. Did you?

 

 

0 Kudos
Message 5 of 6
(2,666 Views)

Well I have found that whenever an auto-indexing for loop does not run there is something wrong with the array I am feeding it.

 

Usually it's an empty(1d) array or the dimension that is used for indexing is empty (2d).

 

Try placing an indicator or two on your diagram for troubleshooting as see if your arrays contain the data your think they do, especially inside the for loop after is is indexed.

 

If the first indexed element is empty your loop will run ZERO iterations.

========================
=== Engineer Ambiguously ===
========================
Message 6 of 6
(2,638 Views)