I'm using a Thorlabs LTS300 stage where my part is mounted on, and I have a Basler raL12288-8gm for inspection. I'm looking for a good way to synchronize the stage motion and the camera acquisition so that each time I start inspection the camera is capturing the same spot on the part.
I've tried to control the stage through LabVIEW, and I can also run that LabVIEW VI in Vision Builder. However, it seems that the stage motion has to stop before the VBAI can go into the next state of image acquisition. I was wondering what's a good way of solving this so that the camera starts acquiring images at the same exact point after the stage starts moving.
Thank you for any help provided.
Solved! Go to Solution.
Usually the best way is to use a "triggered acquisition" for your Basler camera. From the specs of "raL12288-8gm", you can connect an external trigger I/O to the camera. However, this requires that there is a hardware sensor from your motor stage, such that every time the position is reached, the sensor produces a trigger pulse for the camera. The advantage of this hardware-based trigger method is that it's very accurate and reliable. Downside is that, you do need to invest in extra sensors for the motor stage, if the stage does not have any.
2nd best method is to use a software-based trigger. There's probably a function for the Thorlabs stage to read its current position. In VBAI, you can setup a loop to constantly read the current position, and exit the loop when you reach the target position. (When you've exited the loop, the motor doesn't have to stop, it's still moving.) Now that you've exited the loop, you immediately start acquiring images. Downside: basically you're polling to see if the motor has reached target. Depending on if CPU is distracted with other tasks, the point at which you start taking images may vary from time to time. (This is called software jitter.)
Essentially this comes to down to a trade-off:
1. If you can tolerate stopping the stage before starting to get images, keep using what you have 😀
2. If you're moving at a fast speed and want accurate triggering, invest in a hardware trigger
3. If you're moving slow and don't need very accurate triggering, software polling might do the trick.
This is perfect! Thank you for your detailed explanation. I'm trying the software polling method.