LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1 message using "new file"

I am trying to read a new filename path from a txt file. This filename path I use to create a new file to store data in. See attached test VI. The first time everything works fantastic but the second time the while loop executes the create "new file" generates a error -1 message and I do not how to solve it. I have a suspicion it has something to do with the refNum output of the "new file", but I am not sure and I do not know how to work around that either.

Kind regards,
Download All
0 Kudos
Message 1 of 3
(2,809 Views)
The New File returns that error if the file already exists. To overwite the file when it already exists, wire True to the overwrite intput.


LabVIEW, C'est LabVIEW

Message 2 of 3
(2,809 Views)
Have tried that but it does not work.
Beside the 2nd file that is created should not exist before it is created. I have checked directories and created a completely new one to make sure it is empty. And still creating the first file does not create an error but the second file does (even with overwrite = true).
0 Kudos
Message 3 of 3
(2,809 Views)