LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ copy buffer occasional timeout

Hello,

 

I am triggering camera frame acquisition via an external trigger. The attached code is basically the example: LL Triggered Ring with an added counter output which triggers the camera.

 

The code runs fine most of the time. However, it occasionally returns an error #1074397150 at the IMAQ Copy Acquired Buffer. To be clear, the timeout only occurs at the beginning of a trial, never during acquisition.

 

I split the counter signal and monitored it on an oscilloscope. The counter output on trials where timeout error occurs is exactly the same as on trials without an error. Also, I have run this code on an equivalent, but separate system (same camera, counter, etc.) and the infrequent timeout error occurs on this separate system as well. This makes me think that I have done something wrong in the vi.

 

Any help would be hugely appreciated.

 

Best,

 

A

 

LabVIEW 11.0

Windows 7 64-Bit

BNC 2090A

PCI 6259

PCI 1408

0 Kudos
Message 1 of 6
(3,293 Views)

Hello awinde,

 

It is unclear to me what you mean when you say “the timeout only occurs at the beginning of a trial, never during acquisition.” Are you saying that the timeout only occurs when you first run the program, but never while the program is acquiring images in the loop? This error code corresponds to a timeout error with the image acquisition. So this behavior  would imply that the timeout is only occurring for the very first image. Have you tried increasing the timeout on your trigger configuration and observing whether or not this makes a difference in how often the timeout error occurs?

0 Kudos
Message 2 of 6
(3,267 Views)

Earl,

 

Thanks for your reply! Yes, the timeout error only occurs when initating the .vi for image acquisition...and only during a small percentage of initializations.

 

Originally, the trigger timeout setting was at 1000 ms. Increasing this to 5000 ms did not seem to yield any immediatly apparent improvement. I also bumped the timeout to 10000ms and received the timeout again rather quickly. As mentioned before, the trigger seems to be performing exactly as it should when I monitor it on via oscilloscope. When the time-out occurs it continues sending pulses at the desired frequency until the script is stopped.

 

Thanks again for taking the time to reply. Any help would be much appreciated!

 

A

0 Kudos
Message 3 of 6
(3,256 Views)

Hello awinde,

 

The timeout error code for the IMAQ Copy Acquired Buffer function indicates that the camera has not yet received a trigger and captured a full image. Given the 60HZ frequency of your trigger signal and the 5 second timeout, the camera should have plenty of time to receive a trigger and acquire a complete image. Never the less we are encountering this timeout error. Would you say the timeout error occurs (when it occurs) after about five seconds of inactivity? If you increase the timeout is there more time between running the program and when the error occurs? I am curious as to whether or not this timeout is being enforced properly.

 

The other thing I suggest you try is running one of our counter examples to generate a signal pulse for triggering. And while that is running, separately run the LL Triggered Ring example and see if you are still receiving the timeout. This is just a test to decouple the two aspects of your code from one another.

0 Kudos
Message 4 of 6
(3,241 Views)

Earl,

 

Yes, the time between trial initiation and appearance of the error dialog box is (roughly) consistent with the timeout variable. A 5000 or 10000 ms timeout dialog box appears much later than for 1000 ms timeout.

 

I ran a counter output using a task in Measurement and Automation Explorer (50 Hz) and ran the LL Triggered Ring example in parallel. The parallel tasks will run successfully for some time before the LL Triggered Ring example returns the same error that I originally reported. The LL Triggered Ring is set to a 1000 ms timout.

 

Is there a configurable camera setting that could result in this problem occuring across programs and imaging systems (both apparatus have the same camera and settings)? I have increased the camera's timeout setting to 5000 ms but that does not seem to help either.

 

Thanks for any further suggestions or guidance!

 

Best,

 

A

0 Kudos
Message 5 of 6
(3,215 Views)

Hello awinde,

 

This behavior is pretty strange and I am running out of ideas to try. In regards to camera settings, the camera settings are defined by the camera files which is automatically loaded to the computer the first time you connect the camera. That file is necessary because every camera can have different variables with different valid settings. So I can’t recommend one universal setting unfortunately. However there may be settings for things like exposure that may affect the occurrence of the timeout error. I would recommend looking through these settings in NI-MAX and experimenting.

 

Also have you tried triggering at slower rates? It may be valuable to know whether or not this error disappears when acquiring under some specific rate.This could be an indication of a conflicting camera settings perhaps. So give that a try as well.

0 Kudos
Message 6 of 6
(3,184 Views)