indigo Posted October 10, 2024 Posted October 10, 2024 I have been doing some tests recently where for some reason I am getting "C1013 Problem logging data to file". When I entered a shorter name the logging works without a problem. Is there a maximum character length for the logging or export file name? If it helps, a folder is created before the logs start to store the raw CSV files, below the files that are created and logged, along with where they are placed in the directory. The logs or exports are created with the logging and export set features, respectively, and the folder by using the Direct file access feature of DAQFactory. Main folder: logs Abcdefgh_126_2_benchmark_3_alerts_091024_2321_3.csv Abcdefgh_126_2_benchmark_3_rh_pid_091024_2321_3.csv Abcdefgh_126_2_benchmark_3_temp_pid_091024_2321_3.csv Abcdefgh_126_2_benchmark_3_flow_pid_091024_2321_3.csv Abcdefgh_126_2_benchmark_3_co2_pid_091024_2321_3.csv Subfolder within "logs": Abcdefgh_126_2_benchmark_3_091024_2118 Abcdefgh_126_2_benchmark_3_Summary_091024_2118.csv <- the file that wasn't exported for this test. Abcdefgh_126_2_benchmark_3_101024_0023_4.csv Quote
AzeoTech Posted October 10, 2024 Posted October 10, 2024 There is no limit within DAQFactory. Any limit would be with the operating system. I did a quick search and it looks like that limit might be 260 characters. That would be for the entire path, not just the filename. DAQFactory is not Unicode. I tried your file name and it worked fine, but then I didn't have the full path. A few comments: 1) Always include the full path to the file when specifying the logging location. That path needs to be the full path, i.e. starting with the drive letter, and not a relative path. You cannot assume what any relative path would be relative to. 2) try unchecking "continue on error" and see if the logging set stops 3) make sure you are testing apples with apples: log the exact same data to two different files, one with the longer name and make sure it really is the length. Quote
indigo Posted October 14, 2024 Author Posted October 14, 2024 Hi, thanks, the full file path is less than 260 and is not relative. I tried to uncheck the continue on error while the logging was going (with the error popping up) and the logging set stopped. For the final point, it seemed so far when I started the log with the same data, but with a shorter name that the error doesn't occur. But it is weird that this happens now, I am sure we had longer experiment names in the past too. Any other suggestions? Does point 2 imply something? I will try to see what the MAX_PATH is on the computer, to see if it is indeed 260 characters long. Quote
AzeoTech Posted October 15, 2024 Posted October 15, 2024 I would try doing file.open() with your path. You can do it at the command/alert: global handle = file.open("c:\mypath\mylog\Abcdefgh_126_2_benchmark_3_Summary_091024_2118.csv", 1,0,0,1) then ? the handle if you don't see an error. ? handle If it is non-zero then you opened it successfully. If not, you might get a better error message. Don't forget to close it if it is non-zero: file.close(handle) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.