Application Tutorial 5:   Using Machine Vision

If your system is equipped with PreciseVision, the application of machine vision in GD is very straightforward.  PreciseVision dynamically computes the reference frame for a Path and this reference frame is used in place of all of the components of the Global Frame except for its Z height.   If PreciseVision cannot locate the reference frame or if it performs an inspection operation that indicates that a part is not acceptable, it will return an error that will stop execution of the GD Process.

After the Vision Interfacing and Calibration tutorial is performed, all communication with PreciseVision and the translation of all results into coordinates that can be applied to Paths is automatically handled by GD.

The procedure for developing a vision based dispensing application can be summarized as follows:

The new steps in this procedure will be described in this tutorial.  Prior to reading this material, you should familiarize yourself with the basics of applying PreciseVision.

This training example requires that Application Tutorial 1 has already been completed and builds upon its results.

»  For any of the sample templates, execute the Process again to verify that the dispensing path is accurately being followed.  

In this tutorial, pictures of the Square template will be presented for illustrative purposes, but any of the other templates can be used as well.  To mimic the manual training of the Global Frame, we will be training vision to locate the positions of the lines drawn on the template for the X and Y axes.  In a real application, coordinate axes are rarely present.  Instead, features such as distinct edges with an included corner or fudicial marks can be selected for both the manual Global Frame definition and the automated vision identification.

We start by illustrating how PreciseVision is trained to locate the X and Y axis lines.

»  Position the dispensing template below the camera.  It is not necessary to accurately position the template in the camera's field of view.  All that is required is that a portion of the X & Y axes are visible.

»  If the camera is mounted on the robot, ensure that its Z height is the same as the calibration point in the GD Vision panel.  You can use Move To on the Vision panel to correctly set the Z height.

»  Using PreciseVision, take a picture by selecting File > Acquire New Image.

»  In PreciseVision, create a new Vision Process named "Xy_axes_frame".

»  Create and add to this Vision Process an Acquisition Tool followed by a Line-Line Frame Tool.

»  Create two Line Fitter Tools and provides these as the inputs to the Line-Line Frame Tool.

»  Position the first Line Fitter to locate the X-axis and the second Line Fitter to locate the Y-axis of the template.

This Vision Process will take a picture and determine the two lines that best fit the X and Y axes of the template.  Then, a reference frame is computed whose origin is the intersection of the two line fitters and who's X-axis is aligned with the results of the first Line Fitter.

This completes the vision training.  The Xy_axes_frame Vision Process can now be executed by Guidance Dispense whenever the template reference frame needs to be located.

Returning to Guidance Dispense, we must now mark the dispense Path as being relative to the vision results in place of all of the components of the Global Frame except for its Z height.

»  Open the Path Editor by clicking Edit > Path Editor.

»  Select the Path for the template that you are using for this tutorial.

»  Flag this Path as being relative to a vision result by checking Use Vision.

»  Specify the Vision Process to be executed to locate the reference frame by entering "Xy_axes_frame" (without quotation marks) into the Process Name field.

»  The Vision Tool Name can be left blank since we just want the results from the last vision tool that is executed, the Line-Line Frame tool.

»  If the camera is mounted on the robot and you want to move the camera to a position other than the point where the camera was calibrated, manually move the camera to the correct position and Z height and press Record.

»  Press Save to store the results on the flash disk.

This completes the extra steps necessary to develop a vision based dispensing application!  Your previously created Process can be executed as before.  As a test, try displacing and slightly rotating the template to verify that the Path is being dynamically updated.