LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I review 30 days worth of spreadsheet files in labview?

Nevermind - just found it. Thanks anyway.
Tim
0 Kudos
Message 11 of 15
(720 Views)
Ok;

I have stipped out some more of the code to isolate just the part generating the file names. You were on the right track, but ended up doing a lot of extra work. If you have the day, month and year converted to a LV timestamp (in number of seconds) all you have to do to findout the timestamp for the next day is add 86400 (the number of seconds in a day) to it.

A couple other points:

1) It is very bad to use property nodes to read the value of a control because it really trashes your performance.

2) What is the routine TimeDelay.vi supposed to do beyoind generate a wait. All you need inside the Error/No Error case structure is the Wait function. Also, you need to make this subvi reentrant
, otherwise it will start slowing your performance. The more times you use it, the worse it will get.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 12 of 15
(596 Views)
"Go With the Flo" wrote in message
news:50650000000500000061D50000-1042324653000@exchange.ni.com...
> Yes, the files are tab delimited. They were created with the write to
> spreadsheet file vi. The file names are made using the get date time
> string vi with the abreviated option (Thu, Feb 27, 2003.txt).
>
> My approach is to open one file at a time, read its contents and
> process it. Maintain theprocessed data and open the next file and do
> the same thing again. Repeating this for the previous 30 days. I guess
> my main question is how to best construct the filenames based on what
> the current date is.

I recommend you use 'Format Date/Time String.vi' instead. You'll have total
control over the string output that way. If you
use %Y-%m-%d as the format
specifier then you can sort the directory list to access them in order.
0 Kudos
Message 13 of 15
(596 Views)
Go With the Flo wrote:
> Unfortunately no. I don't have labview 6.0. Only 6.1. Unless you know
> a way to do a "retro" save.


File->Save with options->Save for previous.

bye

--
Francesco Pezzuti ICQ: 14253763
0 Kudos
Message 14 of 15
(596 Views)
Thanks for all the responses guys. I finished this task on friday. To answer a few of the questions, Mike the time delay is meant to put a delay in the whole program. It is not in the final product. I do have another delay that only has the wait ms.vi in it. Notice that it has an error pipe in it. Those are just used to delay or slow thing down. I use the property node since the file manipulation routine is moved down to a sub vi. A reference is passed for the filename object.

Adam, The final product does use the format date/time string.vi. Otherwise I would not get my file names (easily) the way I need them. The actual format string I am using is %a, %b %d, %Y.
0 Kudos
Message 15 of 15
(596 Views)