Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronization between Stage and Vision Builder Camera

Solved!
Go to solution

Dear All,

 

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.

0 Kudos
Message 1 of 3
(610 Views)
Solution
Accepted by topic author terry666

Hi Terry,

 

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.

BR

John

Add motion to LabVIEW in 30min or less - TENET EMotion
Finding it hard to source NI hardware? Try NI Trading Post

 

Message 2 of 3
(575 Views)

Dear John,

 

This is perfect! Thank you for your detailed explanation. I'm trying the software polling method.

 

Thank you,

Terry

0 Kudos
Message 3 of 3
(549 Views)