LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving to a seperate file every day

I am trying to save to a seperate file everyday and so far this is what I have come up with on my own.. The second values of 15 and 16 were for testing purposes. I have tried putting various loops around different segments of the vi but havnt had any luck so far. At the moment it is saving all the data to the first file even after 15 seconds.

Thanks,

Blake

Message Edited by 06Civicsi on 03-08-2010 02:34 PM
0 Kudos
Message 1 of 12
(3,912 Views)
Did you mean to attach a VI or something?
Herrlin

Just trying to spread the LabVIEW love.
0 Kudos
Message 2 of 12
(3,909 Views)
It is there. Realized I forgot it after I posted.
0 Kudos
Message 3 of 12
(3,907 Views)

Blake

 

Below is the route i would go for a new file to be created everyday.  Going the route you went in your VI it would always have to be running on your machine and you would have to tell the timer not to reset.

 

file by date.png

 

Regards

Dan

Herrlin

Just trying to spread the LabVIEW love.
0 Kudos
Message 4 of 12
(3,894 Views)

You should NOT use strings to create paths or use string constants for paths. Use path controls and use the Build Path/Strip Path functions.

 

 

 

For original question: Is this supposed to be a subVI?  Rather than using the Elapsed Time you can simply keep track of the timestamp when the last save occurred. Subtract that from the current timestamp and see if a day has passed.

Message Edited by smercurio_fc on 03-08-2010 03:43 PM
0 Kudos
Message 5 of 12
(3,882 Views)

smercurio_fc wrote:

You should NOT use strings to create paths or use string constants for paths. Use path controls and use the Build Path/Strip Path functions.

Message Edited by smercurio_fc on 03-08-2010 03:43 PM


Why should you NOT use strings to create paths?

Herrlin

Just trying to spread the LabVIEW love.
0 Kudos
Message 6 of 12
(3,875 Views)
This is a subVI. I am taking readings from a strain gauge once a second and writing it to a file. I am trying to set it up so that there is a file for a 24 hour period instead of having one large file.
0 Kudos
Message 7 of 12
(3,872 Views)

How about doing something like this?

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 8 of 12
(3,855 Views)

herrlin wrote:

smercurio_fc wrote:

You should NOT use strings to create paths or use string constants for paths. Use path controls and use the Build Path/Strip Path functions.

Message Edited by smercurio_fc on 03-08-2010 03:43 PM


Why should you NOT use strings to create paths?


The Build Path and similar VIs will account for platforms differences in file names and paths.Using strings will not and therefore the code will not be portable.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 9 of 12
(3,849 Views)

Mark's comment regarding the platform independence is the primary reason. Another reason to avoid using strings is simply that it's easier to make a mistake with strings. For example, forgetting a "\" (on Windows) when concatenating paths.

 

Besides, since you have a datatype that's specifically designed to handle paths, you should take advantage of it. Smiley Wink

0 Kudos
Message 10 of 12
(3,840 Views)