Need to add date/time stamp to file name without time change creating new files

Need to add date/time stamp to file name without time change creating new files

Post by Mads » Wed, 16 Jul 2003 02:43:25


Change the logic to not feed the write function with a new name every
time, but to get the time only the first time it is run. That first
time you make the file names and hold them in a shift register e.g.
The next time you just read the file names from the shift register.
 
 
 

Need to add date/time stamp to file name without time change creating new files

Post by Dennis Knu » Wed, 16 Jul 2003 07:16:55

You've got a loop. The outer while loop would have the shift register.
Running it the first time, the value in the shift register would be
empty, so create the file name. Run it again and test for an emtpy
path, and if it's not empty just pass the path name through.

 
 
 

Need to add date/time stamp to file name without time change creating new files

Post by chutl » Wed, 16 Jul 2003 08:49:28

HI there!

It looks like you have your "append to file" enabled. I think if you
switch that to false, it will take care of your problem. Once the
file name is named, it can't change until it's closed..

Eric
 
 
 

Need to add date/time stamp to file name without time change creating new files

Post by GMo » Thu, 17 Jul 2003 00:09:57

Thank you for posting an answer for me. If I initialize the loop it
must be outside the while which means the next set of data (next
trigger) has the same (initial) time/file name. If the time string is
inside the loop it continues to change no matter how I try to set up
the registers. If I push the trigger for a minute or so I should get
I file with all the data named with that date/time. I need the loop
to continue so that the next trigger creates a 2nd file with a new
name. Now I'm getting seperate files for each second, because I can't
figure out how to save the time for the trigger event.
 
 
 

Need to add date/time stamp to file name without time change creating new files

Post by Dennis Knu » Thu, 17 Jul 2003 00:27:56

What you would want then is a shift register that holds the value of
the trigger Boolean. If initially false, create the file name. Then
the content of the shift register would be set to true and don't
create the file name. In your false case, set it back to false so that
the next time the trigger boolean is pressed, you get a new file name
created.
 
 
 

Need to add date/time stamp to file name without time change creating new files

Post by GMo » Thu, 17 Jul 2003 01:16:22

I really appreciate your responses & patience. I have version 6i
(6.0), so I can't see the example.
 
 
 

Need to add date/time stamp to file name without time change creating new files

Post by GMo » Thu, 17 Jul 2003 23:29:31

Sorry if I wasn't clear. We needed only 1 time stamp per trigger
event. We looked at your example, and it's nice. I appreciate the
effort & help, and I'm sure we'll need your example in the near
future. Thanks.
 
 
 

Need to add date/time stamp to file name without time change creating new files

Post by GMo » Thu, 17 Jul 2003 23:30:45

Thank you for your help. Your example helped us understand how to use
LabVIEW. Thanks.