LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

open file not waiting

I'm using Open/Create/Replace file to read a one-line string of text from a file. If the file is found, the contents are read, the string is parsed and various parts of it sent to outputs, and the file is deleted. If the file isn't found, nothing happens. Everything works - in fact, it works a little too well.

If the last Open File attempt failed and the file is then pasted into the datafiles folder, the VI will open, read, and delete the file immediately, regardless of the length of the delay. I don't know if this will be a problem, as the file being read is small and simple, but I'm curious why it's happening.

I've attached the VI. I was unable to attach the .msg file, as the board does not allow files with the .msg extension to be attached. The contents of the file can be found below. It is a single line.

6202,coil_0123456789,1,10.02,30.5,1.60
0 Kudos
Message 1 of 3
(2,387 Views)
Hi Bob,

to attach any kind of files you can zip them...

I changed your example! Now it will wait before deleting the file...
You have to assure dataflow: your existing wait function is independent from file operations and so it cannot assure a delay before delete!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,382 Views)
Thank you very much for the quick and very useful reply!
0 Kudos
Message 3 of 3
(2,379 Views)