LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data Younger Than

Solved!
Go to solution

Hi,

 

As part of a project I have created a vi which loops through 3 files in a folder and checks whether this files are youner than a given date.  For this I have created a cluster that has 3 different folders. The output of cluster goes into the loop and it checks through each files of all the 3 folders. The files which are younger than the particular date will be outputed into an ouput array. But there is some problem happening which I cant understand As I said there are 3 folders. Files from 1st and 2nd folder gets outputed into the array. But when it comes to 3rd folder part in the array 3 cells in the array is empty. So there are 6 files in 3rd folder. As I said 1st 3 portion of the array will be empty. Remaing 3 portion of array will have 1st 3 files of the folder 3. Hence the last 3 files are not being copied. I tried running it in highlight execution. In highlight execution all the files are being checked. But as I said in output array 3 rows starting for new folder 3 is empty and 3 remaining files of folder 3 is not copied. I have also set the date as a very old date. So all the files are younger than that. Can someone please help me what is the problem here. I have uploaded the VI. Thanking You.

 

Vindsan

0 Kudos
Message 1 of 6
(3,620 Views)

Hi,

 

your problem is the reshaping of the 2D array. The lines of your array with less elements than the longest line will receive padding elements.

Because of this the total numbers of element in your array may easily be greater than the number of files you checked.

Just change the output tunnel of the outer loop from index to concatenate (I hope that's how it's called in the english version). Then you don't need to reshape.

 

Bonus:

Why do you use a cluster of paths if you convert it to an array anyway?

Message 2 of 6
(3,598 Views)

Hi,

 

Thank You for your kind reply. But the problem is Iam using Labview 2011 and concatenation is a feature from  2012 onwards. Is there any other way to solve this problem in labview 2011. Thanking You.

 

Yours Sincerely

Govind

0 Kudos
Message 3 of 6
(3,589 Views)
Solution
Accepted by topic author vindsan

Just add your own concatenation.

Randall Pursley
Message 4 of 6
(3,571 Views)

The concatenate will work as Randall posted it.

The reshape array has no use anymore though. You should get rid of it.

0 Kudos
Message 5 of 6
(3,557 Views)

Thank You very much for your reply. I have got the problem solved. And yes I have removed the reshape array. Once again thank you very much to both of you for helping me.

0 Kudos
Message 6 of 6
(3,546 Views)