LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 5 occurred at Delete

I have a simple VI that truncates a text file, but I get the error "Error 5 occurred at Delete" when it runs
 
Any takers?
0 Kudos
Message 1 of 5
(2,955 Views)
Hello Tui.
Your Truncate...VI should not be the problem. A good candidate for your error might be the code that wirtes to the LogFile: Is it possible that this code and your Truncate...VI run at the same time?
This would match Error.Code=5.
Regards, Guenter
0 Kudos
Message 2 of 5
(2,942 Views)

Hi Guenter

I don't see how my write code (enclosed)could be the problem as I close the file.

Have tried with time delays, but that made no difference

0 Kudos
Message 3 of 5
(2,935 Views)
Hello Tui.
Now I see it: You currently do not close the file in the inner case structure's "False" case of your TruncateLogFile.VI.
Regards, Guenter
0 Kudos
Message 4 of 5
(2,912 Views)

Thank You,

Sometimes the easy mistakes are hard to spot.

0 Kudos
Message 5 of 5
(2,909 Views)