Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing camera link attributes from vision builder

Solved!
Go to solution

I have a Camera Link camera and a NI1427 board. I need to change the shutter speed programatically during an inspection. Is there any way to change camera attributes from within VBAI?

 

I have seen a few examples for Firewire cameras, but Camera Link cameras do not use IMAQdx, just plain IMAQ. Is there any way to send commands to the camera from within VBAI? Is there a way to call a LabView VI that would change the camera settings? Thanks for your help!

0 Kudos
Message 1 of 4
(4,940 Views)

Check out this link:

https://decibel.ni.com/content/docs/DOC-25042

 

Hope this helps,

Brad

0 Kudos
Message 2 of 4
(4,939 Views)
Solution
Accepted by topic author xe4c

Thanks for the input Brad. I actually figured out a different way to change the exposure through VBAI.

 

It turns out my Camera Link camera (Sony XCL-5000) has a mode in which the shutter speed can be controlled by the width of a trigger pulse.

 

In IMAX I changed the following camera attributes:

     Operating mode -> Pulse width

     Trigger Source -> Camera Link

     Exposure time -> 7ms

Then I set CC1 to "external trigger 0"

 

In VBAI I set up the Acquire Image step to:

     Triggered image acquisition -> checked

     Trigger line -> external 0

     Edge polarity -> rising

I thought I'd be able to use the Generate Pulse step, but the width cannot be changed programmatically. So I use two Read/Write I/O steps with a delay step in between. The first Read/Write I/O sets the external 0 line to high ane the second sets it to low. The value of the delay can be changed using an inspection variable. The resulting pulse width is probably not the most accurate, but it works for my application since I just want to increase the exposure when the image is too dark and decrease it when it's too bright.

 

 

 

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

Glad to hear you found a solution. If you have trouble with varying exposure time because there's too much SW jitter in driving the lines, you can try the serial commands I sent you.

 

Thanks,

Brad

0 Kudos
Message 4 of 4
(4,913 Views)