Issues a request to PreciseVision to execute a vision process and waits for the process to complete.
vision_object.Process( vision_process_name, vision_process_id )
Prerequisites
The specified vision process must already be defined within the PreciseVision system.
Parameters
vision_process_name
A required String expression that specifies the name of the PreciseVision process that is to be executed. This corresponds to the name that is displayed in the "Process Manager" window in PreciseVision.
vision_process_id
An optional numeric expression that defines a positive integer number to be used by the vision process as its ID code. This value may range from 0 to 2147483647. If omitted, an ID code of zero is assumed.
Remarks
This method requests PreciseVision to execute the specified vision process. It then waits until PreciseVision has completed the process. If PreciseVision does not respond within 30 seconds, an error exception is thrown.
Executing a vision process is the basic method that GPL employs to command PreciseVision to take a picture and analyze it. From GPL's point of view, a vision process is a single, indivisible operation. That is, after GPL starts a vision process, no results are available until after the process completes its execution. When the process is done running, GPL can interrogate PreciseVision for information on the output of any tool. Normally, a vision process consists of a command to take a picture (i.e. an Acquisition Tool) followed by additional tools to process and analyze the picture. In the simplest case, a process can consist of a single tool that operates on an existing picture. At other times, a process can be quite complex and may consist of dozens of tools that inspect multiple features of parts to verify that the part is correct.
In order for GPL to execute a process and retrieve the results, GPL has to know the name that has been assigned to the vision process in PreciseVision and the names of any tools for which results are desired.
Each time that a vision process is executed, all of the previous results of its tools are lost and replaced by the newly computed results. However, if a different vision process is executed using another Vision object, the results of first vision process are preserved.
The Status property can be used to determine if the process completed successfully.
The Process method 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.
If the optional vision_process_id is specified, all of the results generated by the vision process will be tagged with this ID number. The ID number of any result can be fetched by obtaining the value of the visresult_object.ProcessId property.
Examples
Dim vobject As New Vision
vobject.Process("find_part")
If vobject.Status <> 3 Then
' Deal with error
End If
See Also
Vision Classes |vision_object.Status |visresult_object.ProcessID