Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling imgInterfaceOpen starts camera exposure

Hi all,

I'm working on a C++ app using the IMAQ classes. I'm using a Basler A504k and the PCIe-1429 frame grabber.

 

I've stumbled upon some odd behavior when initializing sessions with imgInterfaceOpen. When calling this function (successfully I should say) I've noticed that the camera starts exposing (I'm monitoring the FlashOut signal). I'd rather that it did not, but waited until I sent it the exposure times via CC1 (using RTSI0).

I guess this behavior comes down to how the camera responds to some request passed to it via the serial interface from the PCIe-1429 grabber.

Is there any way of preventing the camera starting to accumulate charges as soon as I call imgInterfaceOpen? It really doesnt seem like to most logical thing to do/expect.

Regards,

Per

0 Kudos
Message 1 of 4
(3,464 Views)

Are you using the basic icd file provided with NI-IMAQ ?

If yes, I don't think it comes from serial commands because as far as I remember there are no serial commands defined in the icd.

I checked that icd : there is only an Exsync attribute defined and both values of this attribute include a "PG" action on line 0. This means that a pulse generation is started on cc1 to trigger exposure.

However if you defined RTSI0 signal to be routed on cc1, I would assume this last setting would have a higher priority.

Of course, I guess the camera is in triggered mode anyway.

I suggest you modify the icd file to completely remove the section relative to the Exsync attribute. You can do it easily by using the Camera File Generator utility (ftp://ftp.ni.com/support/imaq/pc/ni-imaq/cfgenerator/).

 

 

 

 

Sami Fathallah
ALLIANCE VISION
HW and SW Components for Scientific Imaging and Machine Vision
http://www.alliancevision.com
0 Kudos
Message 2 of 4
(3,449 Views)

Hi and thanks for feedback.

I found the Attribute (ExSync) you refer to in the Basler A540k.icd file (its the one I'm using). It defines 3 ExSync settings; 'Off', 'Level Controlled' and '(Programmable)'. In MAX I had already selected the 'Off' option, which looks like this in the icd file;


         Name (Off) {
         }


i.e. its empty (no pulse is sent on CC1). So, this doesnt seem to be the issue.


I have in the Basler CCT+ tool configured the camera to operate in level-controlled mode. I use the IMAQ functions to program pulses over RTSI0 to CC1. That part works fine. What bothers me is that the camera starts collecting charges as soon as the session is initialized with imgInterfaceOpen. I have routed the pulse train to External_0 and checked it on a scope: There are no pulses sent to CC1 when the camera is initialized. Still, the FlashOut signal from the camera goes high, indicating it's collecting charges. Somehow, the camera gets a signal from somewhere else than its regular control line.

 

As a temporary fix I send a single pulse (10 usec LOW, 10 usec HIGH) immediately calling imgInterfaceOpen. This brings down the FlashOut signal. Still, I'm not sure if this works 100% of the time as I have some indications that once in a blue moon the FlashOut remains high even after this 'reset' pulse.

 

0 Kudos
Message 3 of 4
(3,434 Views)

Just a follow up to this;

I also notice that closing the interface with imgClose sometimes toggles the FlashOut signal HIGH. The behavior is unpredictable (happens about 50% of the time).

0 Kudos
Message 4 of 4
(3,432 Views)