Vision_Object Result Method

Returns a VisResult Object that contains a single set of results from a vision tool.

...vision_object.Result( vision_tool_name, index, location_object )

Prerequisites

A Process method must have been executed using the vision_object and the execution must be completed.

Parameters

vision_tool_name

An optional String expression that specifies the name of a specific PreciseVision tool that was executed in the vision process associated with vision_object.  The tool name must match one of those listed in the PreciseVision "Process Manager" window for the executed process.  If a tool name is specified, a single set of results generated by that tool will be returned.  If omitted, a single set of results from the final tool in the vision process is returned.

index

An optional numeric expression indicating which set of results to return for the selected tool. The numeric value can range from 1 to vision_object.ResultCount. If omitted, the first set is returned.

location_object

(Future enhancement) An optional Cartesian Location Object whose value is sent to PreciseVision when the result is requested. Depending on where the camera is mounted and the particular vision tool, this location value may be used to determine the returned vision result. Details on what value to pass in this parameter are described in the PreciseVision documentation for specific vision tools.

Remarks

This method requests PreciseVision to return a set of results from a tool that was part of the previously executed vision process. If the vision tool generated multiple sets of results, the index parameter is utilized to specify the set of results to be returned.  The results data can be fetched any number of times from any tool that is part of the vision process until the vision process is executed again. When a vision process is executed again, all of the old results are lost and a new set of results data will be available.

When this method is executed, it returns a VisResult Object whose data can be accessed by the standard properties and methods available for that object class.

For cameras mounted on a robot or for pictures of an object held by the robot, it may be necessary to pass camera or robot location information to PreciseVision so that the result location may be determined.  In this case, the optional location_object parameter must be specified.

The Status property can be used to determine if the previous vision process completed successfully.

This property performs communications with PreciseVision. If an Ethernet network connection does not exist, a connection is automatically established.  If a connection cannot be setup or the communication link fails for any reason, this method will throw an exception.

Examples

Dim vobject As New Vision
Dim result As VisResult
vobject.Process("find_part")
result = vobject.Result() ' Get result 1 of final vision tool
result = vobject.Result("hole1") ' Get result 1 of vision tool "hole1"
result = vobject.Result(, 2) ' Get result 2 of final vision tool

See Also

Vision Classes |vision_object.Process