07-06-2010 12:13 PM
I have an application built in Vision Builder 3.6 where I am monitoring objects outside. I am using a CVS 1450 with a Sony XCD-X710. The acquire image settings are set at;
Over the course of a day when the sun moves and different objects come within focus, the overall intensity of the image changes. I would like to update the user defined variable for the auto exposure after each inspection scan to maintain intensity within a specified range. Currently, I capture the intensity from the image, pass the value into a calculator function which determines a new auto exposure value for the next inspection. When the inspection starts over again and the acquire image is called, and I receive a time out error.
I have the user defined variable initialized so the first time acquire image is called it works correctly and the calculator updates as expected. If I run the inspection once there is no issues but once I attempt to run in continuous mode I receive the time out error.
Thanks
07-07-2010 01:51 AM
What is the timeout that you have defined? How have you programmed the acquisition?
07-07-2010 09:30 AM
The warning message states a camera trigger timeout.
Within VBAI 3.6, Acquire Image (IEEE 1394) is called when the inspection starts. Video mode is set at 1024x768 Y (Mono 😎 30.0 fps. The acquisition mode is set to Immediate. Under features tab; Brightness is set at a constant, Auto Exposure is the variable updated at the end of the inspection, shutter and gain are set to auto mode. When auto exposure is a constant, acquisition works continuously with no issues.
Within MAX, I can adjust the auto exposure value when the Grab acquisition is executed so I figured that I would be able to within Vision Builder.
07-07-2010 09:45 AM
What is the timeout value you used in the step? Can you include a subset of your inspection so we can see how your trying to use the acquisition step and a previous measurement.
Thanks,
Brad
07-07-2010 09:51 AM
You still didnt answer my question.
07-07-2010 10:45 AM
My mistake, I have been using the default 5000ms. I have already attempted to increase the trigger timeout but I still see the same result.
I have attached a few images;
The state diagram shows the inspect step is called immediately. If no defects are found, then an intensity value is passed to the auto exposure step where the calculation is performed and the exposure variable is set for the next inspection.
The calculation image shows how I determine to increase or decrease the exposure value.
The inspection steps image shows the steps mentioned in the state diagram.
Hope this is what your asking for.
07-07-2010 10:45 AM
Are you doing a triggered acquisition? If so, the trigger has to come while the step executes because when the step is using a previous value and the value changes, the step stops the acquisition (so if you were hoping to acquire an image associated with a trigger prior to this, it will be lost), sets the new value and then starts the acquisition again, and so the trigger has to come after this to avoid a timeout.
Hope this helps,
Brad
07-08-2010 10:57 AM
The acquisition is not triggered. When the inspection program is running I grab an image every time the acquire image step is called. This program is not time sensitive so once all the image processing steps are complete the inspection restarts and grabs another image..
07-13-2010 10:52 AM - edited 07-13-2010 10:57 AM
I tried it here with a Point Grey and when I had the Auto Exposure using a previous result I didn't have timeout errors when changing the value. Although the intensity didn't return to black when setting the AutoExposure value back to 1, so it may have changed other settings that affected the intensity. Here are some debugging thoughts:
1 - Try using two acquisition steps that use the same settings and see if both get a timeout error.
2 - I attached my simple inspection (it won't work as is for you since you will have to change the acquisition step to use your camera and modify the AutoExpose to use the Slider on the Custom UI). It overlays the camera's frame inde and the slider value. The frame index should reset to 0 everytime the slider value is changed by you. You can add the attached inspection to your CVS by going to Target>>Add/Retrieve Inspections in VBAI when connected to the target. and this will allow you to browse inspections on your local drive and the CVS and move them to/from the target.
3 - Try the same setup on Windows using the IMAQdx acquisition step instead of the Legacy 1394 step. This will require that use the Read/Write Camera Attributes step to dynamically change settings since the IMAQdx acquisition step doesn't support changing attributes on the fly.
Let me know how these debugging suggestions work for you.
Thanks,
Brad
07-15-2010 03:21 PM
Brad,
So I tried two acquisition steps and both timed out. When I am programming through VBAI, I only have one option for acquisiton. When I open MAX I can switch between the Legacy 1394 and the NI-IMAXdx drivers so I have the IMAQ driver.
What version of VBAI are you running? I have 3.6 and it says that the file you attached is from a newer version?
As for running from Windows, if you mean labview, I am experiencing compatibility issues because I have labview 8.6 and apparently that wont work on CVS.