Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ Trigger issue

I was wondering if anyone has ever seen issues with the 'Trigger Each Line' mode of the IMAQ Trigger.vi. It seems like I can get it to work once for me, but only once, before I have to jump through a hoop to make it work again. My Normal sequence is the following... 1. Call IMAQ Init 2. Set up the buffers (Continuous mode, System Memory, 10 buffers) 3. Configure the IMAQ Trigger.vi (RTSI 0, Tigger Each Line, Trigger Polarity HIGH) 4. Call the IMAQ Start.vi 5. Watch the IMAQ Status.vi's Last Valid Buffer return value for a new value (in a While Loop) 6. Every time it returns a new value, I call the IMAQ Acquire.vi, till I am finished 7. Call IMAQ Close

So, I could get it to work the first time, but after that it stops working (ie- the IMAQ Status.vi's
Last Valid Buffer stays at '-1'. The only way I have found to, for lack of a better term, 'RESET' the code, and make it work consistently is to run the following Reset sequence before executing the Normal sequence I just described. 1. Call IMAQ Init 2. Set up the buffers (Continuous mode, System Memory, 10 buffers) 3. Call IMAQ Start 4. Call IMAQ Close 5. Call IMAQ Dispose to dump the newly allocated memory buffers.

If I call the RESET sequence each time before I run my Normal sequence, then I get valid image data from the IMAQ Acquire.vi. Otherwise, my Normal sequence works only once for me, and then I get '-1' out of the Last ValidBuffer return value from IMAQ Staus.vi.

It takes several seconds to execute these sequences each time I want to aquire an image, which is painful for the User.

Sooooo, why do I have to run the RESET sequence before I run the Normal sequence each time? Anyone have any ideas?

Thanks in advance for all replys!
=Matta Rizkallah
0 Kudos
Message 1 of 3
(3,303 Views)
Riz

Have you tried calling IMAQ dispose.vi at the end of your first sequence?

A. Talley
0 Kudos
Message 2 of 3
(3,303 Views)
Thanks for your reply A. Talley.

Yes, the IMAQ Dispose.vi is in the first sequence. It comes right after the IMAQ Close.vi. I forgot to include it in my origianl post. Does it matter if it comes before or after the IMAQ Close.vi??

Any and all ideas welcome! I really need to cut the cycle time of this code.

Matta Rizkallah
0 Kudos
Message 3 of 3
(3,303 Views)