06-27-2006 01:51 AM
06-27-2006 02:01 AM
Hello Roberto,
it's just a wild guess, but I always use the CVI File I/O Library functions (OpenFile, ReadFile, WriteFile, CloseFile, ...) instead of fopen, fwrite, ... There might be a chance that you won't get the error using these functions.
06-27-2006 02:47 AM
Wim, it's pretty simple to give a try to your suggestion.
Unfortunately I won't be able to give you a feedback in less than 65 hours...
Don't expect any star before this time
06-27-2006 02:50 AM
06-27-2006 04:13 AM
Ok, modified the program, made some error checking...
Countdown starts...
Three
Two
One
NOW!
06-27-2006 04:25 PM
06-27-2006 04:49 PM
Thanks Martin for considering my problem. Unfortunately not: I am opening and closing the file each time I update it, since other applications need to manage test situation and integrate with it other test results.
I agree with you; too bad it takes so long for the problem to manifest. At least this problem is constant, should it be erratical it would be the worst of all!
One little item to note: when the problem starts, the file on the network is truncated to zero lenght. It seems that something happens on the network folder even if I get the invalid path error qhile opening the file!
06-27-2006 05:05 PM
No problem Roberto, I like a challenge.
Well, since my assumption was incorrect, I'm now thinking it might be something in the OS. I'm not sure how NI implemented the functions in the File I/O library, if they use the ANSI functions underneath the hood, you may run into the same problem with them.
Hopefully they will solve the problem. If not, I am at a loss to suggest a course of action. Perhaps copying the result file to a temporary file, writing to that and then replacing the result file only if the new file is larger may give some insurance against losing data.
06-30-2006 10:46 AM
06-30-2006 10:53 AM
Thanks a lot Roberto
I'm glad it keeps working.