Jacob,
I am not 100% sure why you are getting the error that you are getting
but one thing to check is if you are running these vi's in
multithreaded mode. IMAQ Vision 4.1.1 was released before LabVIEW 5.0
(the first to introduce multithreading) and therefore these libraries
are not multithread safe. National Instrument's next IMAQ Vision
release will have libraries that are multithread safe.
Another thing that may help:
Instead of using a snap in a loop which configures the board allocates
and deallocates memory each time you run through the loop, try doing all
memory management outside of the loop. This can be done simply, by
looking at the grab example that ships with NI-IMAQ. You will notice
that there is a loop around the vi called IMAQ Grab Acquire. You can
send the output of this vi to your image processing functions.
While this may work better, it is generally safer to use a "ring" as
opposed to a grab. Since a grab uses only one buffer, it is possible
that it is being overwritten, while we are in the process of copying
the data out. A ring works the same as a grab, but instead, we have
multiple buffers which help in cases where our copying of the buffers
may be slow.
I hope this helps,
Tony Iglesias
IMAQ Product Support Engineer
National Instruments
In article <7kdv8o$n3r$1@nnrp1.deja.com>,
jacobzj@my-deja.com wrote:
> i checked it again and find the error source is the IMAQ snap.vi,
> the error code is "-1074397179" which means an "invalid parameter #1",
> but i still can't find the solutiion. i am using PCI-1408
> and IMAQ Vision for LabView 4.1.1. i appreciate any help.
>
> Jacob
> In article <7kcl4m$87o$1@nnrp1.deja.com>,
> jacobzj@my-deja.com wrote:
> >
> >
> > i am using the Imaq for LabView to do Image analysis. i have develop
a
> > simple program which just use IMAQ Snap.vi to aquire a single image
> and
> > then do a seqence of image analysis, it does work well. But when i
try
> > to put it in a for loop and coutinuously excute it for up to 100
> times,
> > it is always interrupted in the tenth excution and a message box is
> > poped up saying "the program has performed an illegal operation and
> will
> > be shut down", i have checked everythings which could possibly
cause
> > this trouble and still can't find out. if you have the relative
> > experience or suggestion, be sure let me know.
> >
> > thanks a lot!
> >
> > Jacob
> >
> > Sent via Deja.com http://www.deja.com/
> > Share what you know. Learn what you don't.
> >
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.