02-28-2017 11:49 AM
Hi,
I made a little research and suprised to could not find anything which mentioned this.
In Data Logging step I can not use the time based variables like current time or inspection start time as a file name although those are in the list. When selected, getting a warning about invalid file name.
I guess it may be caused by colons in the time format, and it is not supported as a file name.
Am I wrong or will there be an implementation to solve this?
03-01-2017 01:04 PM
Hi Sevincom,
In that drop down, we just enumerate all of our system variables and don't pre-filter the list.
The only way that you could log the files with names that contain time or date information, that was before invalid, would be to create an inspection variable (or network variable), set the variable to the system variable that you are wanting to log (ex: Inspection Start Time), and then run a VI from VBAI that accesses the variable using the VBAI API, programmatically replaces invalid characters, and then writes back to the variable. You would then be able to use the edited variable to name your logged data.
03-02-2017 12:46 AM
Hello Grey,
Thank you for the answer. I am already using a similar way, maybe more easier. I manipulate the format in the calculator step and use this value.
Both of these are just a workaround and decrease the performance unnecessarily so I was just checking to see if an improvement could be made.
03-02-2017 08:08 AM
Something else to be aware of is that if you choose the multiple file option, it will automatically add a timestamp to the name. Try this out and see if this meets your needs for ease of use and including a timestamp in the file name.
Hope that helps,
Brad
03-02-2017 10:33 AM
Brad,
It is a good advise but does not work as I require.
When I choose every 1 day option, it creates a timestamp like this: 2017-03-02 00.00.00.000
I need more like this: 2017-03-02 17.12.49.300
What I am trying to do is create at least one file every day, and create a new file every time the VBAI(or computer itself if possible) restarts. This is exactly the definition of Device Start Time variable.
Anyway, the calculator step seems to be the best solution for now, but an improvement could be made I think.