LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing to a data file with time stamp - Help!

My program currently asks the user to enter a path to save the data from my virtual channels. What I want is to have a default directory to store my data in and also have the file name that is created to be the date. I tried to use create open or replace but I cant get it to work. Any suggestions would be great. Also and comments to the code would help out a lot.

Thanks
0 Kudos
Message 1 of 39
(4,062 Views)
Look at the attachment. It uses a front panel path control set to only select a new or existing folder (right click and Browse Options). Then, using a Build Path and a Format Date/Time String, a full path to a file is created. Pass this to your Open/Create/Replace File.
Message 2 of 39
(4,027 Views)
Thanks for the great help. How could I have it so that it would create a new file when its say 12:00 AM everyday.
0 Kudos
Message 3 of 39
(4,020 Views)
You just need to to keep the date and file reference in a shift register. When the date changes, create a new file and update the file ref.
Message 4 of 39
(4,016 Views)
I kind of see what you mean but I cant get it to work. Can you possibly edit my attached program. Thanks.
0 Kudos
Message 5 of 39
(4,014 Views)
You need to put the logic for checking the current date and file creation inside the while loop. You can copy your code into the while loop of my example or create a couple of shift registers on your while loop and add my code.
Message 6 of 39
(4,007 Views)
Could you possibly put it into the program.
0 Kudos
Message 7 of 39
(4,002 Views)
Message 8 of 39
(3,994 Views)
are you sure that this is the right file? I dont know how to intigrate this file.
0 Kudos
Message 9 of 39
(3,990 Views)
Sorry about that. I had another file of the same name from a different post.
Message 10 of 39
(3,987 Views)