Vision Classes Summary
The following pages provide detailed information on the properties and methods for the classes that implement the interface to the PreciseVision machine vision system.
This interface includes two classes: the Vision Class that manages communications between GPL and PreciseVision and the VisResult Class that stores a single set of results from a single vision tool. As a convenience, there is no explicit method for connecting to PreciseVision. Whenever the Vision methods Process, Result or ResultCount are executed, GPL automatically establishes a connection to the vision system. Table 23-108 and Table 23-109 summarize the properties and methods for each Class, which are described in greater detail in the following sections.
Vision Class Member | Type | Description |
---|---|---|
New Vision |
Constructor Method |
Creates an empty Vision object. Does not communicate with PreciseVision. |
Method |
Closes any open connection associated with a vision object. |
|
Property |
Returns the numeric error code for the last executed vision process. A value of 0 indicates success; a negative value indicates an error. |
|
Property |
Sets and gets the number of the PreciseVision instance that is associated with a vision object. |
|
Property |
Sets and gets the IP address of the PC that is running the PreciseVision application software associated with a vision object. |
|
Method |
Requests that PreciseVision execute a vision process and waits for it to complete. Connects to PreciseVision if there is currently no connection. |
|
Method |
Returns a VisResult object that contains a single set of results from a previously executed vision tool. Connects to PreciseVision if there is currently no connection. |
|
Method |
Returns the number of sets of vision results created by a vision tool the last time it was executed. Connects to PreciseVision if there is currently no connection. |
|
Property |
Returns a numeric value indicating the status of a vision process: |
|
Property |
Sets or gets a property value of a PreciseVision tool or a general "system" property for the vision server connected to a vision object. |
VisResult Class Member | Type | Description |
---|---|---|
New VisResult |
Constructor Method |
Creates an empty VisResult object. Not useful since VisResult objects are normally created by the vision_object.Result method. |
Property |
Returns the numeric error code for this result. A value of 0 indicates success; a negative value indicates an error. A positive value indicates success with a warning. |
|
Property |
Returns the nth numeric information field contained in this set of results. |
|
Property |
Returns the number of numeric information items in this set of results. |
|
Property |
Returns a String value if the set of vision results includes text information. |
|
Property |
Returns the value of the tool property that was tested in the vision inspection process. |
|
Property |
Returns True if a property of the vision results satisfied the tool's vision inspection criteria. |
|
Property |
Returns the position and orientation from a set of results as a Cartesian Location object. |
|
Property |
Returns the ID of the vision process that generated the result. |
|
Property |
Returns the type of this set of results. Currently always zero. |