Vision Interface

Vision objects are used to communicate with the PreciseVision system. The communications occur across a TCP/IP Ethernet link between the Precise controller and the PC running PreciseVision. Simply creating a Vision object does not cause any communication to occur.

The Vision methods Process, Result, and ResultCount all send a request to PreciseVision and wait for a reply. There is no method to explicitly connect to PreciseVision. A connection is automatically established when one of these methods is called.

When making a connection, the Precise controller attempts to communicate with TCP port 1410 at the IP address specified by the parameter database entry "Vision server IP address" (DataID 424). If a connection cannot be made, an exception is thrown. Once a request is sent, PreciseVision must respond within 30 seconds or an exception is generated.

The steps for preparing PreciseVision to service requests and to execute vision processes for a Precise controller are as follows:

  1. Physically connect your Precise controller with the PC running PreciseVision. Make sure the Ethernet IP addresses are setup properly and the PC can communicate with the GPL controller.
  2. Using PreciseVision on the PC, create a vision process that uses vision tools to acquire an image and perform the desired vision operations.
  3. Make sure that PreciseVision is active and listening for requests.

To develop a vision guidance application that will execute on a Precise controller and communicate with PreciseVision, write and execute a GPL procedure that does the following:

  1. Creates a Vision object to serve as the interface to PreciseVision.
  2. Executes a Vision Process method to initiate a vision process in PreciseVision. The process name specified in this method must match a vision process defined within PreciseVision.
  3. Invokes the ResultCount method to determine how many sets of results were generated by each vision tool of interest.
  4. Accesses the Result method for each vision tool of interest to obtain a VisResult object that contains the output for the tool.
  5. Uses the VisResult class properties and methods to obtain specific vision data that can be applied in your GPL procedure.
  6. Executes the VisionDisconnect method when done with all vision processing to close the communication connection.