Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

SHAMEFULL MAX troubles with serial Camera control

It took me about 3 weeks to figure out why I could not access some of my camera functions or more specifically why, no matter what vi I'd make or what config parameterss I'd send to the camera, I would always end up with the same type of acquisition...

It turned out that the config used for the camera was always the one set in MAX. I was surprised because at the very beginning of the installation of the NI PCI 1422 board and the camera controller, I had been very carefull to check the box "Enable Serial Commands" in the "Camera Attributes" tab in MAX.

Guess what, someone at NI is using reverse psychology because to actually enable the serial commands, like setting the trigger mode, the scan mode of the CCD, the exposure time etc by sending commandes from your VI through the serial connection you have to UNCHECK that box!19175i35D5C7465C872477

 

 

0 Kudos
Message 1 of 5
(3,597 Views)

Hmmm.... Please show your *.icd file.

0 Kudos
Message 2 of 5
(3,592 Views)

Linear,

 

That checkbox controls whether or not IMAQ will automatically send serial commands as specified in the ICD camera file that correspond to all those features right above the checkbox. If that is enabled, then IMAQ will always send those serial commands when the acquisition starts to ensure the camera is setup with the right parameters. If you are sending your own serial commands via the raw serial read/write interface, then those of course will be overwritten on the camera when this occurs.

 

Eric

0 Kudos
Message 3 of 5
(3,590 Views)

Here is the .icd file (changed the extension to be able to upload it though).

This file was sent to us by Hamamatsu (the C4742-95-12HR camera was not in the pool of camera parameter files coming with IMAQ).

0 Kudos
Message 4 of 5
(3,492 Views)

Thanks Eric you for your answer.

That is indeed what I came down to : the commands I send to the camera through "IMAQ Serial Write.vi" or "IMAQ Grab Setup.vi" are overwritten with the ones set in MAX and saved in the .icd file. That happens at the acquisition in "IMAQ Snap.vi" or "IMAQ Grab Acquire.vi" but it does not show in any of the diagrams of the acquisition VIs, no case structure : for what I can see, I send the acquisition parameters to the camera controller through the Serial link, then start an acquisition which breaks down to a .dll call with no reference to the .icd file.

As a result, with the "Enable Serial Commands" box checked the user has no later control on the camera through its serial link. For that, I still find the sentence next to the check box misleading, or not explicite enough at the very least :

"Overwrite serial commands with these Settings" or "Always use these acquisition parameters" would be better in my view.

 

0 Kudos
Message 5 of 5
(3,485 Views)