LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"create file with incrementing suffix.vi"

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. 

0 Kudos
Message 1 of 5
(886 Views)

It works fine for me.  No error, file got deleted.

 

George Zou
0 Kudos
Message 2 of 5
(856 Views)

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.

 

 

0 Kudos
Message 3 of 5
(794 Views)

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.

 

 

George Zou
0 Kudos
Message 4 of 5
(784 Views)

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.

0 Kudos
Message 5 of 5
(760 Views)