LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 10 at copy file if vi is used frequently

Solved!
Go to solution

Hello everybody,

 

I have a problem with a VI which is called from multiple VIs in a short time.

If I run it manually with a break of at least 1 second it is running without an error. But if I run it again without a break, error 10 (Asynchronous I/O operation in progress) occurs.

 

Any Ideas?

Thank you in Advance

0 Kudos
Message 1 of 6
(929 Views)
Solution
Accepted by topic author MR_DE

Your backup file path is based on the timestamp down to the second.  So if you try to create a backup twice within a second, the second time you will get an error.  If you want your backup to be the latest within that second, then you need to set the "overwrite" input on the Copy File to TRUE (defaults to a false).  If you want to keep every backup, then you need to check to see if the file already exists and add something to the file name if it does.  You could look at the Create File With Incrementing Suffix.vi (in the File I/O->Advanced palette) as an example for this.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 6
(899 Views)

@crossrulz wrote:

Your backup file path is based on the timestamp down to the second.  So if you try to create a backup twice within a second, the second time you will get an error.  If you want your backup to be the latest within that second, then you need to set the "overwrite" input on the Copy File to TRUE (defaults to a false).  If you want to keep every backup, then you need to check to see if the file already exists and add something to the file name if it does.  You could look at the Create File With Incrementing Suffix.vi (in the File I/O->Advanced palette) as an example for this.


Maybe time down to the tenth?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 3 of 6
(890 Views)

Hello,

 

in general, you should consider grouping data to larger chunks and write to file (copy) less frequently. Writing to small files in sub-second frequencies brings inefficient disk space usage, premature wear of media (could be extremely costly on RT targets) and low performance.

0 Kudos
Message 4 of 6
(882 Views)

Thank you,

I thought in my full application it is not possible that the same file is created twice because of a different path. But I changed another part of the application without thinking about this VI.

0 Kudos
Message 5 of 6
(869 Views)

The Vi is only executed if a setting file or limit file is changed. The frequency is really low due to that. The high frequency is in this case related to different stations of the same test bench.

0 Kudos
Message 6 of 6
(862 Views)