LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Camera Acquisition Time Out

Hi,
First off I've mainly been a java programmer so C++ is taking some getting used to. I am trying to acquire images using a PCI-1424. I am using the imaqGrab function to acquire them on a signal from the camera. But unless the signal comes shortly after pressing the capture button, a fatal error occurs. It says the session timed out. Is there some way in C++ to do a "Try/Catch" statement like in java? Or is there some other way to just skip or hide the error?
Thanks
0 Kudos
Message 1 of 3
(2,891 Views)
You can use Try/Catch blocks in C++, too, but the syntax is a little bit different from the way the are used in JAVA. Here is the link to the MSDN page that talks about try/Catch statements in C++.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclang/html/_pluslang_the_try.2c_.c...


Mika Fukuchi
Applications Engineering
National Instruments
0 Kudos
Message 2 of 3
(2,891 Views)
supchurch:

It looks like the function you're calling, imaqGrab() is from the LabWindows/CVI IMAQ Vision API. This is a C API, not a C++ one, so the library won't throw exceptions and will use error codes to communicate problems instead. The IMAQ Vision CVI API exposes a set of functions for error management. You can take a look in the IMAQ Vision for LabWindows/CVI Function Reference under Function Types >> Error Management Functions for documentation on these functions. The Function Reference should be available on your start menu under Programs >> National Instruments >> Vision >> Documentation.

Also, there is a Developer Exchange Discussion Forum specifically dedicated to Vision; if you re-post your message there you should be able to get specifi
c help on the imaqGrab() function.

Hope this helps,

Chris W
0 Kudos
Message 3 of 3
(2,891 Views)