APPLICATION NOTE Interfacing Basler GigE and USB3 Vision Cameras with Matrox Imaging Library (MIL) Applicable to Vision Interface Standard cameras and Windows operating systems only Document Number: AW000648 Version: 05 Language: 000 (English) Release Date: 25 July 2016 Software Version: MIL 10 INTERNAL USE ONLY (Set it to white if you do not need it)
Contacting Basler Support Worldwide Europe, Middle East, Africa Basler AG An der Strusbek 60 62 22926 Ahrensburg Germany Tel. +49 4102 463 515 Fax +49 4102 463 599 support.europe@baslerweb.com The Americas Basler, Inc. 855 Springdale Drive, Suite 203 Exton, PA 19341 USA Tel. +1 610 280 0171 Fax +1 610 280 7608 support.usa@baslerweb.com Asia-Pacific Basler Asia Pte. Ltd. 35 Marsiling Industrial Estate Road 3 #05 06 Singapore 739257 Tel. +65 6367 1355 Fax +65 6367 1255 support.asia@baslerweb.com www.baslerweb.com All material in this publication is subject to change without notice and is copyright Basler AG.
Table of Contents 1 Introduction... 2 2 Steps to be Carried Out... 2 2.1 Checking the Hardware Requirements... 2 2.2 Installing Matrox Imaging Library 10... 2 2.3 Configuring Your GigE Vision Camera Using MILConfig... 3 2.3.1 Configuring Your Network Adapter for GigE Vision... 3 2.3.2 Configuring Your Camera... 4 2.4 Configuring Your GigE Vision or USB3 Vision Camera Using Matrox Intellicam... 6 2.4.1 GigE Vision Cameras... 6 2.4.2 USB3 Vision Cameras... 7 2.5 Acquiring Images Using Matrox Intellicam... 11 3 Troubleshooting... 11 3.1 Firewall Settings... 11 3.2 Network Interface Controller (NIC) Settings... 12 3.3 Transport Layer Settings... 12 Revision History... 13 Interfacing Basler GigE Vision and USB3 Vision Cameras with Matrox Imaging Library (MIL) 1
1 Introduction This document explains how to interface a Basler GigE or USB3 Vision camera with the Matrox Imaging Library (MIL) 10 software using standard USB 3.0 ports or standard Gigabit Ethernet network adapters. 2 Steps to be Carried Out 2.1 Checking the Hardware Requirements In addition to the Basler camera and its power supply, an Ethernet cable (Cat 6 or higher) is required. For GigE cameras, your PC must be equipped with a Gigabit Ethernet network adapter card (also called Network Interface Controller or NIC). For USB3 cameras, you need a USB3 port onboard or provided by a USB3 host controller. For all devices, you need a suitable cable. We recommend using a network adapter from the Intel Pro 1000 family or an adapter with a comparable chipset. Due to the characteristics of the chipset, this adapter can be optimized for GigE cameras. This optimization may not be possible with other adapters, and thus grabbed images may be corrupted. For USB3 please refer to the document Setting up a Stable USB 3.0 Camera System. The document can be downloaded from the Basler website. 2.2 Installing Matrox Imaging Library 10 When installing the MIL software, make sure the GigE Vision option is checked. Interfacing Basler GigE Vision and USB3 Vision Cameras with Matrox Imaging Library (MIL) 2
Figure 1: MIL Installation Dialog 2.3 Configuring Your GigE Vision Camera Using MILConfig To perform configuration tasks, open the MILConfig application in MIL Control Center. Figure 2: MILConfig GigE Options Make sure that the Use Camera Discovery Service option is checked. This will automatically detect added or removed cameras. Then, click the Launch Matrox Capture Assistant button to configure the network adapter. 2.3.1 Configuring Your Network Adapter for GigE Vision By default, Basler GigE Vision cameras are configured to obtain their IP address automatically (no static IP address). We recommend that you also configure your network adapter to obtain IP addresses automatically. If there s already another network adapter configured to obtain IP addresses automatically, consider configuring a statically addressed subnet. Interfacing Basler GigE Vision and USB3 Vision Cameras with Matrox Imaging Library (MIL) 3
To change the IP configuration, select the Network Connections tab in the Matrox Capture Assistant. Then, select your network adapter. On the Advanced tab, you can change the IP configuration as desired. Figure 3: IP Configuration in the Matrox Capture Assistant 2.3.2 Configuring Your Camera The camera s IP settings must match the IP settings of the network adapter. To change the camera s IP settings, click the GigE Vision Devices tab in the Matrox Capture Assistant. In the panel on the right, you can define the following settings: Packet size and inter-packet delay Camera network configuration (IP address allocation type and, if required, static IP address) Interfacing Basler GigE Vision and USB3 Vision Cameras with Matrox Imaging Library (MIL) 4
Figure 4: Camera Configuration in the Matrox Capture Assistant Further useful built-in functions of the Matrox Capture Assistant are: Quickly close a camera to allow access from other applications Feature browser to access all camera features (see Figure 4) Single and continuous grab output window For most of the functions (except for e.g. the network setup), you must have a valid MIL 10 license. The license may be based on Matrox hardware, a dongle, or a software key. If no license is active for the current module and you are trying to access restricted functions, an error message is shown: Interfacing Basler GigE Vision and USB3 Vision Cameras with Matrox Imaging Library (MIL) 5
2.4 Configuring Your GigE Vision or USB3 Vision Camera Using Matrox Intellicam 2.4.1 GigE Vision Cameras Intellicam is a more powerful grab application. It is subject to license restrictions. The software works with *.dcf camera configuration files that allow you to save and load cameraspecific parameters. Figure 5: Intellicam Toolbar: Grab Buttons, Feature Browser Button, Active System Dropdown If no preconfigured configuration file is available, press any grab button (see Figure 5) to start with a blank configuration. Figure 6: Creating a Blank GigE Vision Configuration The DCF1 window opens. Figure 7: DCF1 Configuration Window Interfacing Basler GigE Vision and USB3 Vision Cameras with Matrox Imaging Library (MIL) 6
If the network settings for your GigE camera are correct, your camera will be listed here. Click the Camera Configuration tab to access and change camera parameters: Figure 8: DCF Camera Configuration If your network settings are incorrect, the camera will not be listed: If your network settings are correct and the camera is still not listed, check your license settings. You can test the license settings by opening the Feature Browser. If your license settings are incorrect, the Feature Browser will respond with a license error. 2.4.2 USB3 Vision Cameras Basler USB3 Vision cameras can also be accessed by MIL. To enable USB3 support, make sure that the Basler USB device driver and other allocated drivers for the camera are uninstalled. Also, make sure that patch 19 for MIL 10 is installed. Then, reconnect the camera. The device will be recognized and the necessary drivers will be installed. While the driver installs, the icon will be shown repeatedly in the Windows system tray. Wait until all installations have been processed. Interfacing Basler GigE Vision and USB3 Vision Cameras with Matrox Imaging Library (MIL) 7
If a previously installed Basler USB3 Vision device driver has been manually removed and the camera can t be allocated due to other reasons (e.g. because the Matrox driver is not assigned yet), Matrox Intellicam fails to list the camera. In this case, Matrox Capture Assistant recognizes the status of the device and provides recovery. Figure 9: Device Status in Matrox Capture Assistant To allocate the camera device for the Matrox Imaging Library, the Capture Assistant can install the Matrox driver automatically. The message boxes for this process are shown below. Figure 10: Installing the Matrox USB3 Vision Driver If the Matrox Imaging Library controls the camera device, it can also be accessed via the Matrox Intellicam application. If your USB3 Vision device is not set as the default device, select the device from the toolbar: Figure 11: Intellicam Device Selection Interfacing Basler GigE Vision and USB3 Vision Cameras with Matrox Imaging Library (MIL) 8
If no preconfigured configuration file is available, press any grab button (see Figure 10) to start with a blank configuration. Figure 12: Creating a Blank USB3 Vision Configuration The DCF1 window opens. Figure 13: DCF1 Configuration Window If the driver settings for your USB camera are correct, the camera will be listed here. Click the Camera Configuration tab to access and change camera parameters: Interfacing Basler GigE Vision and USB3 Vision Cameras with Matrox Imaging Library (MIL) 9
Figure 14: DCF Camera Configuration If your driver settings are incorrect, your camera may not be listed: If your driver settings are correct and the camera is still not listed, check your license settings. You can test the license settings by opening the Feature Browser. If your license settings are incorrect, the Feature Browser will respond with a license error. Interfacing Basler GigE Vision and USB3 Vision Cameras with Matrox Imaging Library (MIL) 10
2.5 Acquiring Images Using Matrox Intellicam Figure 15: Acquiring Images Using Matrox Intellicam 3 Troubleshooting 3.1 Firewall Settings Any application using the GigE Vision network protocol must be able to accept data from the camera on different UDP ports. On systems equipped with a firewall, you should disable the firewall at least for the network adapter to which your camera is connected. This especially applies to newer operating systems, as they handle firewall rules more strictly. Interfacing Basler GigE Vision and USB3 Vision Cameras with Matrox Imaging Library (MIL) 11
3.2 Network Interface Controller (NIC) Settings If image acquisition is unreliable, change, if applicable, the following settings of your network adapter card: Packet size: The maximum size of a data packet transmitted via Ethernet. By default, the packet size is set to 1500 bytes. This will be sufficient for most configurations. However, with more demanding camera models or inadequate hardware, it may be necessary to increase the packet size. This is possible because the GigE Vision stream can handle larger packet sizes than 1500 bytes. Basler recommends a significant increase of the packet size to up to 9014 bytes. This will reduce Ethernet overhead load and thus improve efficiency. Increasing the packet size above 1500 bytes requires enabling the so-called Jumbo Frames support on each involved network device including possible switches. Whenever you increase the packet size for your network controller card, you must also adjust the packet size on the camera side. Ethernet flow control: Basler recommends enabling Ethernet flow control if the network adapter supports it. This may decrease packet loss. If enabled, the streaming packet flow can pause and restart. This prevents the main memory from falling behind the packet processing. Receive buffers: The Ethernet adapter buffers received packets in so-called receive descriptors. If the number of descriptors for storing received camera stream packets is lower than actually required, the overflow will be lost. The number of buffers is essential to ensure high bandwidth stream transmission. The best choice is to increase the number of buffers to the maximum applicable value. Interrupt moderation: Controls how interrupts are received and handled. While normal traffic requires a lower rate of moderation, a typical GigE Vision stream demands more interrupt moderation. However, dealing with interrupt moderation affects the camera-to-network-adapter transmission as well as the CPU load. Try to find the optimum amount of moderation for your network configuration. Usually, the moderation can be set in predefined steps, e.g. Low, High, Extreme or Adaptive. The parameters mentioned above can be found in the Windows Network Connections window. To access it, right-click on your network adapter, select Properties and click Configure. 3.3 Transport Layer Settings Packet Size: Whenever you increase the packet size for your network controller card (see Section 3.2), you must also adjust the packet size on the camera side. Make sure the value for the camera doesn t exceed the values set for other communication partner devices. Otherwise, streaming may fail due to blocked packets. Inter-packet delay: If your Ethernet adapter or other devices can t handle the incoming packet rate, it is useful to increase the delay between packet transmissions. This may reduce the amount of dropped packets. You can use the Packet Delay calculator to determine the optimum inter-packet delay. The calculator can be found in the GigE Devices tab of the Matrox Capture Assistant application (Grab button). Interfacing Basler GigE Vision and USB3 Vision Cameras with Matrox Imaging Library (MIL) 12
Revision History Document Number Date Changes AW00064801000 8 Apr 2008 Initial release version of this document. AW00064802000 24 Jul 2008 Modified step two to describe a custom pylon installation. AW00064803000 30 Jul 2008 Updated contact addresses and phone numbers. AW00064804000 15 Jan 2009 Updated the firewall configuration information starting on page 9. AW00064805000 25 Jul 2016 Revision of the entire document. Updated to MIL 10 whenever applicable. Added Chapter 3 ( Troubleshooting ). Interfacing Basler GigE Vision and USB3 Vision Cameras with Matrox Imaging Library (MIL) 13