Hi,
I am facing the problem, that after creating, writing and closing a file on the user partition,
it can not be deleted because it is still held open by the ARSim (AS6).
The FileClose FB returns ERR_OK status , so it should be closed but if i want to delete it manually or
with the FileDelete FB, it is blocked because it is still open in the ARSim…
In case of another file, which i only read, i can close the file and delete the file with no problems.
So do i have to do something specific in case of a file write?
If i only read the file I open it with mode fiREAD_ONLY and if i have to write with mode fiREAD_WRITE.
phaehnel
(Philipp Haehnel)
October 10, 2025, 1:20pm
2
I have never seen this issue before and am a quite frequent user of FileIO.
Could you maybe share us the bits of your code that do this action, so that it is possible to evaluate if that is an issue in the library or the code itself?
Cause usually if you do file create, file write and then file close on the id of the file that you “opened” with file create it also closes it successfully.
kovarj
(Jaroslav Kovar)
November 24, 2025, 8:23am
3
Hi @Philip_Pucher ,can you update us about status of your topic?
Hi, yes of course!
I did not know, that if you use FBCreate from FileIO to create a file successfully it is already open.
I created the file, then opened it and after processing I only closed it once.
But in reality it was opened twice so it kept locked.
Now if i create a file, I simply do not open it and start processing immediately,
then I close it afterwards.
Best regards,
Philip
1 Like