Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Open AVI read-only multiple times

My application requires that I open-for-read the same AVI file multiple times for parallel processing.  However IMAQ AVI Open reports error -1074395996 "File is already open for writing."
 
Is there a way to open an AVI file read-only and have multiple handles to the same file.
 
 
0 Kudos
Message 1 of 2
(3,115 Views)

Hi Andrew,

Currently there isn’t a way to open multiple hands of a file, but there are several ways of getting around it.   One way to avoid this error is to place the IMAQ AVI Open before your while loop.  That way you can read or write multiple times but you will only open the file once.  If you are doing parallel loops you can take the reference from your IMAQ AVI Open and wire into both of your loops and do your reading inside of the loops.   If it is necessary to Open your file multiple times then you will need to make sure that you close the AVI file before you open it again.  Including an Open and Close inside of your while loop will cause the program to run much slower, so if possible only do reading or writing inside of your while loop.  I hope this helps.  Keep me posted if you have any more questions.

Have a great day,

GG

0 Kudos
Message 2 of 2
(3,105 Views)