From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sort data with start and stop date from the folder

I am modifying Data miner tool which has been developed before for our current requirements. Current tool has an option like select full directory for scanning(*.csv file) and the requirement is there should be option like Start date and End Date of the files that need to be mined.

I created a option to select Date Range(Start Date & Stop Date) and necessary files supporting those options. But that option is acting same as full directory scan option. I can't understand where i am missing logic.

I can send you the *.VI's which i modified if necessary. 

Hope the query is clear...... Thanks for your any suggestions in advance.

 

Cheers

Kirit

0 Kudos
Message 1 of 9
(3,257 Views)

I suppose you create a list of file names from the full directory?

 

You then cut/trim this list according to Data Range?

 

Do you send the right list to the data mining VI? (common problem to do calculations and send the raw material on)

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 9
(3,242 Views)
You can post your VIs, but basically, assuming you stick with pure LabVIEW, you need to get the listing, then get the file info for each file to determine timestamps.  If you use System Exec, you could issue a dir command at a DOS prompt and sort based on date.  This will also give you the dates and allow you to pull out the correct files.  Without coding it up, I can't say for sure the DOS dir cmd would be faster, but I would think it probably would be.
0 Kudos
Message 3 of 9
(3,227 Views)

Thanks Matthew!

For your info, i am using pure Labview coding. Can i get details or procedure to use system Exec,dir command,dos prompt etc so that i can get all correct files....

 

Thanks

0 Kudos
Message 4 of 9
(3,210 Views)

You have to just provide the command you would have written in command prompt as input to system exec and LabVIEW executes it. You can study about system exec VI in more detail in Help or at

http://zone.ni.com/reference/en-XX/help/371361E-01/glang/system_exec/

 

You will find example using system exec at the following web-link. Also look at column in the webpage"More Like This"

 

http://decibel.ni.com/content/docs/DOC-2276

 

Gaurav Ahuja

0 Kudos
Message 5 of 9
(3,192 Views)

I sending VI's which are coded for picking data from given Start Date and End Date.

 

Download All
0 Kudos
Message 6 of 9
(3,179 Views)

Thanks Gaurav!

 

This is last file

 

These modified files supposed to take Date range(Star Date and End Date) and also Filename Filtration(like picking a word from a file)

 

I made these changes but they are not responding.

 

Hope these files helps you to give some feedback or suggestions.

 

Thanks

-Kirit

0 Kudos
Message 7 of 9
(3,177 Views)
The code in your header.vi to pick out files based on date range appears to be working just fine.  I can't run everything because your ctl file is corrupted and there are several missing subVIs.  I took just the code that gets files by date range and it works.  In your code, you need to make sure that  Start and End Date are values that make sense and that Data has the value "Date Range".
0 Kudos
Message 8 of 9
(3,167 Views)

Thanks Matthew

 

From your explanation i have got a point that.....

 

The Date range headers like...Start Date and End Date are only used in the tool but not in the files(*csv) we are looking into. This may be the conflict.....

In the *.csv files there is only Date header......my asssumption was when i browse and choose files from Start Date and End Date, it will take only the files which are asked for.

 

May be now i need to synchronise(dont know whether it is right terminolgy for the use) Date header in the file to Start Date & End Date in the labview tool.

Now again interesting point is...how it can be acheived?

 

Thanks

-Kirit

0 Kudos
Message 9 of 9
(3,150 Views)