03-21-2022 05:32 AM
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
Solved! Go to Solution.
03-21-2022 08:02 AM
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.
03-21-2022 08:19 AM
@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?
03-21-2022 09:01 AM
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.
03-21-2022 09:15 AM
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.
03-21-2022 09:18 AM
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.