Using the Cognex In-Sight Driver
A guide to the Cognex In-Sight Driver
This article describes the capabilities and configuration associated with the Cognex In-Sight driver in Tulip.
This article focuses on connecting to a Cognex device from a Tulip Player. This article focuses on a Cognex Device and an Edge Device.
Overview
In this article, we'll focus on the connection between Tulip and Cognex and then the capabilities once the two have been connected. You'll need two ports - TCP and Telnet - from Cognex's Vision Suite or Insight Explorer. Then, on Tulip, you'll need to connect to those ports. Once connected, you can load jobs, captue images, or run native commands.
Configuration
To configure your Cognex In-Sight device to be used with Tulip, first ensure that your Cognex In-Sight Camera is powered and connected to the same network as your Windows Tulip Player.
You should also have Telnet enabled on your windows device. Read the how-to here.
Insight Vision Suite
Then ensure TCP/IP output communication is enabled:
And your Telnet Server is Enabled.
Insight Explorer
Then ensure TCP/IP output communication is enabled:
And configure the "Format Output String" to include the information you'd like to receive in the Result events.
No further configuration is necessary!
Troubleshooting
Unable to connect?
Once your ports have been opened, you can run this script in your Windows Powershell to ensure that the Cognex TCP server is pingable from the same device as your Player, run
Test-NetConnection <IP address of Cognex TCP server> -port 3000
To test the Telnet connection, first ensure that Telnet is enabled - here's a how-to guide. Then, you can run to test out your connection.
telnet <IP Address> 23
If you encounter errors, please reference the proper setup for your Telnet or TCP/IP server above.
Tulip Side Configuration
For the Cognex Driver to properly function, you first need to connect to the camera. We recommend that you connect to the Cognex Driver "On Step Enter".
Here's an example of how to run a function on the Cognex.
Capabilities
The Cognex In-Sight driver allows network-connected In-Sight series Cognex devices to be integrated into Tulip Apps though the Windows Tulip Player.
The driver supports connecting to multiple cameras, loading Jobs, triggering Jobs, retrieving the most recently captured image, and running arbitrary Native Mode Commands.
Functions
The following functions can be used in Tulip Triggers.
Each is described below:
- Connect: Connects to a Cognex In-Sight camera. Requires an identifier (to be used to identify the camera in subsequent commands), host (typically the IP address of the camera), port (the port provided in the TCP/IP communications settings page, usually port 3000), User (the username for logging into the camera, "admin" by default), and Password (the password for the previous username. Empty by default).
- Load Job - Loads a job to the camera. Requires the identifier of a connected camera and the name of the job to load with or without the .job extension.
- Trigger - Triggers an image capture on the camera. Requires the identifier of a connected camera. After a job runs, a Result event will be created.
- Get Image - Retrieves the most recently captured image from the camera. Requires the identifier of a connected camera. Returns an imageUrl that can be viewed in a Tulip Variable widget.
- Run Command - Runs an arbitrary Native Mode Command on the camera. Requires the identifier of a connected camera and a command to run. Escaped characters such as "\r" and "\n" are properly handled in this text box. Returns the raw result of running the command.
- Disconnect - Disconnects from a camera. Requires the identifier of a connected camera.
Events
The following events can be used in Tulip Triggers.
- Error - Indicates an issue with the driver. This event contains a message that will help with addressing the root issue.
- Result - Indicates that a Vision Job result has completed. This event contains the output from the camera which is configured in the Cognex In-Sight Explorer.