# Toolchain Function in In-Sight Spreadsheet

The Toolchain Contains a group of tools and the sequence of execution for each tool. function in In-Sight Spreadsheet allows you to set up image collection from your In-Sight vision sensor for use in OneVision, and to export your toolchain results from OneVision back to your In-Sight Spreadsheet job for further analysis.

To use the Toolchain function:

1. Add the Toolchain function to Spreadsheet using one of the following options:

   1. Drag and drop the tool from the Functions panel on the right side to a cell in Spreadsheet.

   2. Type Toolchain( into a cell in Spreadsheet.

   The property sheet for the Toolchain function pops up:

   Element | Description
   --- | ---
   1 | Property sheet tabs
   2 | Properties
   3 | OneVision login and sync interface

2. Set up the fixture, Region of Interest The Region of Interest (ROI) is the area of the image where the vision tool operates. (ROI The Region of Interest (ROI) is the area of the image where the vision tool operates.), and image collection in the General tab of the property sheet:

   1. Define the fixture origin manually, or double-click the Fixture parameter to open cell selection mode, and select a cell in Spreadsheet to use as an external reference for the fixture.

   2. Define the parameters of the bounding box for the Region of Interest manually, or double-click the Region parameter to open graphic interaction mode, and draw the bounding box over the image.

   3. Check the Collect Images checkbox to enable image collection for upload to OneVision. Click Clear Images to remove all collected images from the Toolchain function.

3. Connect your Spreadsheet job to your OneVision project In OneVision, a project is a collection of images and vision tools that performs different tasks, such as inspection, measurement, or identification. using the OneVision login interface at the bottom of the property sheet:

   1. Select the host region for your OneVision service from the Host Region dropdown.

   2. Click Login, and enter your credentials in the login window that appears.

   3. Select the OneVision project you want to work with in the Project dropdown, or click New to create a new project in OneVision.

   4. Select the version of the project you want to work with in the Version dropdown. If you save a new version of the project in OneVision, it automatically appears in the dropdown.

   5. Click Open to open the OneVision interface in a browser window.

   6. If you make any changes to the project in OneVision, click Sync to update the Toolchain function with the latest version.

   7. Click Collect Current Image to manually add the currently loaded image to the Toolchain function independent of your image collection settings.

   8. Click Upload Images to upload all collected images to your OneVision project.

4. To adjust the run-time parameters for the tools in your OneVision project, switch to the Runtime tab of the property sheet.

5. To view and tag your collected images, manually add the current image, or upload the collected images to your OneVision project, switch to the Images tab of the property sheet.

6. Click OK to finish adding the Toolchain function to the Spreadsheet. The function populates Spreadsheet with output cells from the tools you have configured in your OneVision project.

Inputs

Setting | Description
--- | ---
Image | This parameter must reference a Spreadsheet cell that contains an Image data structure. By default, this parameter references cell A0, containing the AcquireImage function. This parameter can also reference other Image data structures, such as those returned by the Image Vision Data Access functions or Coordinate Transforms Functions.
Fixture | Defines the Region of Interest (ROI) relative to a Fixture input or the output of the image coordinate system for the Vision Tools function. Setting the ROI relative to a Fixture ensures that if the Fixture is rotated or translated, the ROI is rotated or translated in relation to the Fixture. Note: 2D projections use real world units, but fixturing with 2D tools requires input in pixel values. When using a 2D projection from a 3D point cloud as a Fixture, convert the real world units to pixel values using the TransWorldToPixel function. The default setting is (0,0,0), the top leftmost corner of the image.
X | The X-offset, in image coordinates.
Y | The Y offset, in image coordinates.
Theta | The rotation from the image X-axis, in the image coordinate system. (+/-360 degrees clockwise)
Region | Also known as the Region of Interest (ROI), specifies the region of the image that undergoes analysis. Double-click on the Region parameter to create an Interactive Graphics Mode that you can transform and rotate. For more information, refer to the Interactive Graphics Mode topic in the In-Sight Spreadsheet documentation. Select this parameter and press the Maximize Region button on the Job Edit toolbar of the property sheet to automatically stretch the region to cover the entire image.
X | The X-offset of the origin, in fixture coordinates.
Y | The Y-offset of the origin, in fixture coordinates.
Height | The dimension along the X-axis of the region.
Width | The dimension along the Y-axis of the region.
Angle | The orientation, in fixture coordinates.
Collect Images | Check the Collect Images checkbox to enable image collection mode. When in image collection mode, the Toolchain function automatically adds new acquisitions to the images collected for upload to OneVision.
Clear Images | Click the Clear Images button to delete all collected images from the Toolchain function.
Timeout | Specifies the amount of time in milliseconds (0 to 30000) that the function searches for results before stopping and returning an #ERR. To disable the Timeout setting, set the value to 0.
Show | Specify the display mode for the function graphics overlay on the image.
Hide All | The input region boundary is hidden, except when the cell containing the Toolchain function is highlighted in the spreadsheet.
Result Graphics Only | The result graphics from the OneVision tools are displayed at all times.
Input and Result Graphics | The input graphics from the Toolchain function and the result graphics from the OneVision tools are displayed at all times.

Outputs

The Toolchain function returns a set of output cells containing result data from the tools in the connected OneVision project.