03-08-2010 02:32 PM - edited 03-08-2010 02:34 PM
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
03-08-2010 02:35 PM
03-08-2010 02:37 PM
03-08-2010 03:22 PM
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.
Regards
Dan
03-08-2010 03:42 PM - edited 03-08-2010 03:43 PM
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.
03-08-2010 03:49 PM
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?
03-08-2010 03:53 PM
03-08-2010 04:41 PM
How about doing something like this?
03-08-2010 04:46 PM
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.
03-08-2010 04:54 PM
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.