Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Timeout When Taking Snapshot

Hello,

 

We are currently using the Mikrotron MC1310 camera with the NI PCIe-1429 frame grabber device.

 

Whenever a snapshot is taken in MAX and the acquisition size is different than the ROI set for the camera a timeout error occurs.  Isn't MAX setting the ROI on the camera from the acquistion size settings before the snapshot is taken?

 

The same thing happens in the IMAQ code as well.  I thought setting the Acquistion window attributes would also set the image size on the camera.

 

Thanks,

 

-brian

0 Kudos
Message 1 of 7
(4,077 Views)

Hello,

 

The timeout seems to be due to some parameters not matching between the camera and frame grabber.

 

Whenever I set the left and top values for the acquisition window to a value greater than 0, I am getting an error stating that the "Region of interest is larger than the acquisition window".

 

However looking at the following code:

 

errChk(imgSetAttribute2 (this->m_Sid, IMG_ATTR_ROI_LEFT, ROILeft));
errChk(imgSetAttribute2 (this->m_Sid, IMG_ATTR_ROI_TOP, ROITop));
errChk(imgSetAttribute2 (this->m_Sid, IMG_ATTR_ROI_WIDTH, ROIWidth));
errChk(imgSetAttribute2 (this->m_Sid, IMG_ATTR_ROI_HEIGHT, ROIHeight));
errChk(imgSetAttribute2 (this->m_Sid, IMG_ATTR_ROWPIXELS, ROIWidth));
errChk(imgSetAttribute2 (this->m_Sid, IMG_ATTR_ACQWINDOW_LEFT, ROILeft));
errChk(imgSetAttribute2 (this->m_Sid, IMG_ATTR_ACQWINDOW_TOP, ROITop));
errChk(imgSetAttribute2 (this->m_Sid, IMG_ATTR_ACQWINDOW_WIDTH, ROIWidth));
errChk(imgSetAttribute2 (this->m_Sid, IMG_ATTR_ACQWINDOW_HEIGHT, ROIHeight));

 

I am setting the region of interest and acquisition window to the exact same size.  What is going on here?  

 

Thanks,

 

-brian

0 Kudos
Message 2 of 7
(4,073 Views)

Hi,

I already had this kind of problems, and the problem was the order of the parameters.

Try to set the width and height before the top and left parameters. This may help, but I'm not sure.

Regards

0 Kudos
Message 3 of 7
(4,070 Views)

Hello,

 

Thanks for your suggestion.  I tried changing the order of setting parameters for the region of interest and acquistion window but unfortunately it didn't work.

 

Are there any other suggestions I may be able to try?

 

-brian

0 Kudos
Message 4 of 7
(4,062 Views)

Hello,

 

I added the imgSessionFitROI() function to best fit the ROI window to the acquisition window.  This helped to remedy the error stating "region of interest is larger than acquisition window'.  However the acquisition is still timing out.  

 

I also tried modifiying the acquisition parameters in the camera data file but it didn't help.  Usually the frame grabber times out when all the important parameters do not match with the current camera configuration.  Can you please tell me how I can verify that all parameters are matching before performing a grab?  I am already sending serial commands to the camera to change parameters to match.  Can you also tell me exactly which parameters need to match so that the acquisition can occur?  

0 Kudos
Message 5 of 7
(4,058 Views)

I just determined in MAX that when I set the left and top values of the acquisition window to 0 the Grab works, even though the ROI set for the camera has a value of 40 for the left and top.  

 

Can you tell me what the relationship is between the acquisition window and ROI in the frame grabber code?  Why is the Grab working even though the rectangular parameters do not match?  

0 Kudos
Message 6 of 7
(4,056 Views)

Hello Brian, 

 

I wanted to inform you that I have been collaborating with Andrew (the Applications Engineer you spoke with on the phone today after your SSP purchase) and we have both been working together on your issue. We are looking into this more and we are hoping to have a resolution for you early next week. Andrew will contact you through your service request on Monday to update you on what we have found. Until then, I hope you have a great weekend Brian. 

Huntington W
National Instruments
Applications Engineer

***Don't forget to give Kudos and Accepted as Solution where it is deserved***
0 Kudos
Message 7 of 7
(4,034 Views)