Machine Vision

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? Also someone mentioned that since I was using the Lab Windows API that it was an error code instead of an exception and that a "Try/Catch" wouldn't work.
Thanks
0 Kudos
Message 1 of 6
(3,499 Views)
Take a look at the HL Grab and LL Grab Examples in \Program Files\National Instruments\NI-IMAQ\Sample\MSVC\Grab\. If a valid video signal does not arrive within the frame timeout period, then you will get an acquisition timeout error. You can increase the timeout with imgSetAttribute by setting the IMG_ATTR_FRAMEWAIT_MSEC attribute.

Regards,

Brent R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,501 Views)
Is there a way to have the acquisition just stop and reset? Go back like the start button hadn't been pressed?
Thanks
0 Kudos
Message 3 of 6
(3,499 Views)
I looked at the examples, but they use the NI-IMAQ functions and I'm trying to only use the NI-Vision. And the error codes aren't the same. I am only trying to supress the error and close the session and interface if the acquisition times out.
Thanks
0 Kudos
Message 4 of 6
(3,499 Views)
HI
I have been using a Pulnix TM1040 and a frame grabber PCI-1422 of NI for a while. Before they ran wll but now, when grabbing, it showed a dialog:"IMAQ error: the serial read didnot complete within the specified timeout period". I have downloaded the camera file from NI but the sesults were the same.
Does anyone know about this problem, please help me. I need to fix this as soon as possible for my experiment because now I am running out of time.
If you can, reply one more to my email: nguyenhk@aero.pauir.itb.ac.id
Thank you very much.
0 Kudos
Message 5 of 6
(3,336 Views)
Hi nguyenhk -

Please see my reply to your post in the more recently moderated thread - http://forums.ni.com/ni/board/message?board.id=200&message.id=9759#M9759
David Staab, CLA
Staff Systems Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,324 Views)