Suggestion software trigger vs. smaller maxbuffer?
So I'm trying to get an accurate 1:1 image capture to position of the motor I'm using to move the stage (e.g. img1 was captured at 13.58 mm). I'm currently using a smaller maxbuffer = 10, so that the data acquisition is "shorter" and transfer time as well. Here's an example of how I set it up now.
camera.StartGrabbing(pylon.GrabStrategy_LatestImageOnly) grab = camera.RetrieveResult(ms_camera, pylon.TimeoutHandling_ThrowException) if grab.GrabSucceeded():# as result:#, pylon.TimeoutHandling_ThrowException) img.AttachGrabResultBuffer(grab)
I'm wondering if I should instead set up a software trigger to capture the image at 330 ms exposure instead. If so, can you provide an example of how to set that up?
Hi there, I think I see two goals here:
- Acquiring the image at a precise moment.
- Fastest possible transmission of the image to the application.
For 1, yes I would always recommend a trigger, especially a hardware one, for this kind of precision acquisition. In general the quartz of the camera is quite good, but over some time (hours, days), there will always be a bit of drift. A function generator used as a trigger might be more reliable. I would shy away from using a software trigger as this will have jitter due to the host's execution time, interface over which it's being transmitted, and so forth. The usual way to setup a hardware trigger is to wire it per the manual to an input pin, then set: TriggerSelectro = FrameStartTrigger TriggerMode = On TriggerSource = Line1 (or 2 or 3 etc)
For 2, this depends mainly on the camera hw interface (and related optimizing of the interface settings on the host side). USB is faster and has less jitter than GigE (usb is on the order of +/- 200usec or so). The grab strategies are more a matter of preference. If it is more important to your application to grab all images, then use OneByOne (this sets up the pylon grab engine as a FIFO). If you are more interested in processing only the most recently received (grabbed) image, then use LatestImageOnly (in LIO mode, the pylon engine only holds one image, so maxnumbuffer is essentially ignored).