Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

getting error after imgSessionStartAcquisition()

Hi,
 
I'm getting an error message "buffer size used is too small for minimum acquisition frame" when I'm using  imgSessionStartAcquisition
I do stop the acquisition with imgSessionStopAcquisition right before it. Does any one know why?
 
 
0 Kudos
Message 1 of 10
(4,579 Views)

Hello UV,

Do you get this error when running any of the example code such as HL Grab or LL Grab?  Also, could you post a little more information about your setup such as camera type, acquisition parameters, etc.?  Thanks UV.

Carlton
CLA
0 Kudos
Message 2 of 10
(4,567 Views)
I am not running any sample, I did look at HL Grab for reference.
I'm using PCI-1428 board with Lunix TM-1020 camera.  That's how I'm starting the acquisition

errChk(imgGrabSetup (m_CameraData.m_Sid, FALSE));

errChk(imgSessionStartAcquisition(m_CameraData.m_Sid));

errChk(imgSessionStopAcquisition(m_CameraData.m_Sid));

errChk(imgSetCameraAttributeString(m_CameraData.m_Sid, "Shutter Speed", "External Pulse"));

errChk(imgSessionStartAcquisition(m_CameraData.m_Sid));

I'm getting my error when I start the acquisition the second time.

Please let me know if you need more information.

Thanks,

Yuval

0 Kudos
Message 3 of 10
(4,547 Views)

I forgot to mention the error I'm getting is "buffer size used is to small for minimum acquisition"

Yuval

0 Kudos
Message 4 of 10
(4,537 Views)

UV,

I have a co-worker who has similar code that starts/stops then restarts the acquisition while changing parameters and I believe you need to call the imgGrabSetup function before restarting the second acquisition since you are changing attributes on the camera.

Carlton
CLA
0 Kudos
Message 5 of 10
(4,529 Views)
Can you please post the code?
 
0 Kudos
Message 6 of 10
(4,517 Views)

UV,

The code is actually just the HL Grab example with pretty close to the same modifications you have mentioned except after each time you change a camera attribute, the imgGrabSetup function is called and the canvas size is checked against the acquisition window.  The code I mentioned in my last post is still being modified with extra features so it is not in shape to upload but once it is done, he will be posting it to the website.  Since you seem to be just modifying shutter speed and external pulse, you will most likely not have to adjust the canvas, but just call the imgGrabSetup and restart the acquisition.

Carlton
CLA
0 Kudos
Message 7 of 10
(4,506 Views)
Thank you very much, and I'll wait for the example.
0 Kudos
Message 8 of 10
(4,501 Views)
I have sent him the link to this thread for posting but due to the upcoming Holidays and deadlines it could be some time before he finishes writing the example.  Have you had any success adding the second imgGragSetup function in your code?
Carlton
CLA
0 Kudos
Message 9 of 10
(4,463 Views)
Yes, I did like you said and I've used imgGrabSetup (Sid,TRUE) to restart the acquisition.

I didn't stop the thread like it's done in the example.

Thanks for the help and I'll wait to see the example when it's done.

Yuval
0 Kudos
Message 10 of 10
(4,454 Views)