05-17-2023 04:46 PM
Did anyone else notice if you flush and close prior file (the file w incrementing (#)s), the delete function throws an error 5! It's as if the original/old (#s) file is still opened when using "create file with incrementing suffux.vi". I'll just go use the sysexec command line to delete the old file then. I just found this to be annoying since I blew away 2 hours attempting to correct this issue.
05-17-2023 06:00 PM
It works fine for me. No error, file got deleted.
05-18-2023 12:11 PM - edited 05-18-2023 12:15 PM
TestStand calls LabVIEW. Yea LabVIEW is not the problem. So the problem is Labview runs in a TestStand Step therefore TestStand is holding files in memory although LabVIEW creates the recursive file then executes a Flush File and Close File on the recursive increment file. LabVIEW cannot delete the file under this condition. Labview2020, TestSTand2020.
If I set TestStand Step to "unload after the step" the VI is closed but then I cannot pass my parameters in TestStand.
I'm still trying different work-a-rounds. Oh let me add, Labview sys-exec vi gave me same result (another process is using the file) so I confirmed TestStand is the culprit.
05-18-2023 12:34 PM
Tested in TestStand 2017 SP1 and LabVIEW 2018 SP1.
No problem in TestStand either.
If you are creating files in LabVIEW, how does TestStand know?
You are not telling the whole story.
05-18-2023 04:38 PM
I know its TestStand since I cannot delete the file manually (from cmd.exe on window10). EitherTestStand releases/frees memory or your setup is not a replicating mine. Once TestStand stops running, set TS to "Unload All Modules" then you can delete the file.
Anyhow, I'll just write to a temporary file to work around this.