APPLICATION NOTE How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro Document Number: AW001320 Version: 03 Language: 000 (English) Release Date: 15 June 2015 INTERNAL USE ONLY (Set it to white if you do not need it)
How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro AW00132003000 How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro Table of Contents 1 Introduction... 3 1.1 Supported Pixel Formats... 3 1.2 Connecting and Disconnecting Cameras... 3 2 Requirements... 4 3 Installation... 5 4 Operating a Basler USB 3.0 Camera with Cognex VisionPro... 8 4.1 Accessing the Camera in Cognex VisionPro... 8 4.2 Configuring the Camera... 10 4.2.1 Settings Tab... 11 4.2.2 Image Properties Tab... 12 4.2.3 Advanced Features... 13 4.2.3.1 pylon Viewer... 13 4.2.3.2 VisionPro: Imaging Device Tab... 14 4.2.3.3 VisionPro: Custom Properties Tab... 15 5 Troubleshooting... 17 5.1 Hardware Not Visible or Application Stops Responding... 17 5.2 Live Display Flickers... 17 Copyright 2015 by Basler AG Page 2 Basler pylon USB 3.0 AIK Adapter
AW00132003000 How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro 1 Introduction The Basler pylon USB 3.0 AIK Adapter enables you to operate Basler USB 3.0 cameras with Cognex VisionPro. After a few simple configuration steps, Basler USB 3.0 cameras are displayed in VisionPro where you can configure them as desired. The Basler pylon USB 3.0 AIK Adapter is available in a.zip file containing the.msi files for 32-bit and 64-bit operating systems (pylonaiksetup.msi and pylonaiksetup64.msi) as well as the corresponding pylon runtime files for 32-bit and 64-bit operating systems. You can download it here: http://www.baslerweb.com/downloads-software-43868.html. 1.1 Supported Pixel Formats The current version of the AIK adapter supports a subset of pixel formats of Basler USB 3.0 cameras. Following is a list of supported formats: Mono 8 Mono 12 Mono 12p Mono 12 Packed Bayer BG 8 Bayer GB 8 RGB 8 BGR 8 YCbCr422_8 More formats will be added in future releases. 1.2 Connecting and Disconnecting Cameras The adapter lists the cameras available when VisionPro is started. Cameras that are connected to the PC when VisionPro is already running, will not be displayed. If cameras are disconnected during runtime, they will not be removed from the device list in the Image Source dialog of VisionPro. Trying to perform any actions on them will result in an error message. It is also not possible to reconnect disconnected cameras while VisionPro is running. VisionPro has to be restarted for these cameras to be available again in VisionPro. Copyright 2015 by Basler AG Page 3 Basler pylon USB 3.0 AIK Adapter
How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro AW00132003000 2 Requirements The pylon USB 3.0 AIK Adapter requires the pylon Camera Software Suite or the pylon Runtime (U3V) to be installed. The AIK adapter requires version 4.2.x of the Camera Software Suite or the Runtime (U3V). The appropriate pylon runtime can be found in the same folder as the corresponding AIK adapter setup. When using the 64-bit AIK adapter, you need to install the 64-bit version of the pylon software and for the 32-bit AIK adapter the 32-bit version is required. NOTE If you don t have the correct version of the Camera Software Suite or the Runtime (U3V) installed, you are still able to install the AIK adapter, but when you later start VisionPro you will receive an error message. You can download the pylon Camera Software Suite and the pylon Runtime (U3V) here: http://www.baslerweb.com/downloads-software-43868.html For information on how to install the pylon Camera Software Suite or the pylon Runtime (U3V), see the Installation and Setup Guide for Cameras Used with the Basler pylon 4 Camera Software Suite (AW000611). You can download this document from the Documents Download section of the Basler website: http://www.baslerweb.com/support_document_downloads-18489.html The pylon USB 3.0 AIK Adapter has been successfully tested with Cognex VisionPro versions 7.0, 8.1, and 8.2. Copyright 2015 by Basler AG Page 4 Basler pylon USB 3.0 AIK Adapter
AW00132003000 How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro 3 Installation Before installing the Basler pylon USB 3.0 AIK Adapter, make sure that you have read the information in the Requirements section. To Install the Basler pylon USB 3.0 AIK Adapter: 1. Run pylonaiksetup.msi by double-clicking the file or by executing it from a command prompt. The pylon USB 3.0 AIK Adapter Setup Wizard is displayed. 2. In the Welcome dialog, click Next. The Select Installation Folder dialog is displayed. Copyright 2015 by Basler AG Page 5 Basler pylon USB 3.0 AIK Adapter
How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro AW00132003000 3. In the Select Installation Folder dialog, specify the desired location and click Next. The Confirm Installation dialog is displayed. 4. In the Confirm Installation dialog, confirm the installation by clicking Next. Copyright 2015 by Basler AG Page 6 Basler pylon USB 3.0 AIK Adapter
AW00132003000 How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro A progress bar is displayed. When the installation is complete, the Installation Complete dialog is displayed. 5. In the Installation Complete dialog, click Close to finish the installation and close the setup wizard. The Basler pylon USB 3.0 AIK Adapter has now been installed and Basler USB 3.0 cameras can be accessed in Cognex VisionPro. Copyright 2015 by Basler AG Page 7 Basler pylon USB 3.0 AIK Adapter
How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro AW00132003000 4 Operating a Basler USB 3.0 Camera with Cognex VisionPro This section explains how to access a Basler USB 3.0 camera in Cognex VisionPro and how to configure the camera s features. 4.1 Accessing the Camera in Cognex VisionPro To Access a Camera: 1. Start VisionPro QuickBuild with administrator rights by right-clicking the VisionPro QuickBuild shortcut and then clicking Run as administrator. 2. Double-click Image Source. The Image Source dialog is displayed. Copyright 2015 by Basler AG Page 8 Basler pylon USB 3.0 AIK Adapter
AW00132003000 How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro 3. Click the Camera button. The drop-down list Image Acquisition Device/Frame Grabber will list all Basler USB 3.0 cameras connected to the PC. If not all the expected cameras are listed, see Connecting and Disconnecting Cameras for possible reasons. Copyright 2015 by Basler AG Page 9 Basler pylon USB 3.0 AIK Adapter
How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro AW00132003000 4. Select the desired camera from the list. 5. Click Initialize Acquisition. The camera can now be configured in VisionPro. 6. To open a live display, click the camera icon in the toolbar. A separate window opens showing a live display. 4.2 Configuring the Camera Once the camera is accessible in VisionPro, you can configure its features. Basic features are available on the Settings and the Image Properties tabs in the Image Source dialog. Copyright 2015 by Basler AG Page 10 Basler pylon USB 3.0 AIK Adapter
AW00132003000 How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro 4.2.1 Settings Tab On this tab, you can configure exposure, brightness, and contrast. Note that these features are named differently in VisionPro and the pylon Viewer. The following table contains a list of the differences. VisionPro pylon Viewer Exposure Brightness Contrast Exposure Time Black Level Gain Another difference is that the features listed in the table above have different value ranges. For example, in pylon the black level can be adjusted in a range from 0.0 to 15.98438 whereas in VisionPro the range is from 0.0 to 1.0. The maximum value in pylon corresponds to 1.0 in VisionPro, and the values in between are scaled accordingly. Copyright 2015 by Basler AG Page 11 Basler pylon USB 3.0 AIK Adapter
How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro AW00132003000 4.2.2 Image Properties Tab On the Image Properties tab in the Image Source dialog, you can configure the ROI. For example, a smaller ROI can lead to higher frame rates and can generally improve performance. To move the ROI, use the Origin X and Origin Y fields as well as the Width and Height fields. NOTE When changing the ROI, the ROI is cropped internally by the camera to the smallestpossible size. If the hardware doesn t support the resulting ROI, e.g. because the ROI doesn t meet the minimum width or height requirements, the remaining parts of the image are cropped by VisionPro. NOTE It is not recommended to move the ROI of the camera an odd number of pixels when using the Bayer mode. If you do, the Bayer pattern would move and this would result in colors being displayed incorrectly as the pixels can t be interpreted correctly anymore. Copyright 2015 by Basler AG Page 12 Basler pylon USB 3.0 AIK Adapter
AW00132003000 How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro 4.2.3 Advanced Features If you want to access more advanced configuration features, you have three options: pylon Viewer VisionPro: Imaging Device tab in the Image Source dialog VisionPro: Custom Properties tab in the Image Source dialog See the following sections for details of these options. 4.2.3.1 pylon Viewer Using the pylon Viewer to configure the features of a Basler USB 3.0 camera is an easy way to view and change parameter settings. The pylon Viewer requires a full installation of the pylon 4 Camera Software Suite. The pylon Runtime (U3V) alone is not sufficient. For information about how to use the pylon Viewer, refer to the pylon Viewer help that is part of the application. NOTE You can only access the camera via the pylon Viewer if the camera is not open in VisionPro at the same time. Copyright 2015 by Basler AG Page 13 Basler pylon USB 3.0 AIK Adapter
How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro AW00132003000 4.2.3.2 VisionPro: Imaging Device Tab On the Imaging Device tab in the Image Source dialog, you have direct access to the camera s features. To Configure a Feature: 1. In the Feature Access area, enter a feature name in the Feature field. 2. Click Read. The current value will be displayed in the Value field. 3. Change the value for the feature in the Value field. 4. Click Write to write the value to the camera. Copyright 2015 by Basler AG Page 14 Basler pylon USB 3.0 AIK Adapter
AW00132003000 How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro 4.2.3.3 VisionPro: Custom Properties Tab On the Custom Properties tab in the Image Source dialog, you can select features from a list of all available features and change their settings. To Configure a Feature: 1. Click Add New (upper left corner of the tab). A list of all available camera features will be displayed. 2. Select a feature from this list. The feature with its current value will be added to the feature table. Here, you can modify the value of a feature. The following screenshot shows how to select a new value for the PixelFormat feature. Copyright 2015 by Basler AG Page 15 Basler pylon USB 3.0 AIK Adapter
How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro AW00132003000 Copyright 2015 by Basler AG Page 16 Basler pylon USB 3.0 AIK Adapter
AW00132003000 How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro 5 Troubleshooting This section lists problems that may occur when using Basler USB 3.0 cameras in Cognex VisionPro and provides solutions to fix them. 5.1 Hardware Not Visible or Application Stops Responding If you experience problems such as your cameras not being visible or your application not responding anymore, check the following: Under Windows 7, vision applications using an imaging device must be run with administrator rights. Open the Properties dialog of the vision application and ensure that Run this program as an administrator is selected on the Compatibility tab. Locate the aikserver.exe or aikserver_64.exe (C:\Program Files\Cognex\VisionPro\bin). Open the Properties dialog and ensure that Run this program as an administrator is selected on the Compatibility tab. Using the Registry Editor, check the HKEY_LOCAL_MACHINE\SOFTWARE\cognex\AIK\Errors subkey. Errors that don t produce an error message are logged here and can help you solve the problem. 5.2 Live Display Flickers If you notice a flickering of the live display of the camera, the PoolSize registry entry value may be too low. This condition may also be indicated by the following error message: Bad memory ptr, please increase pool size! The AIK adapter setup sets the PoolSize entry to an appropriate value but under certain circumstances this error may still occur. To fix it, carry out the following steps. To Change the Value of the PoolSize Registry Entry: 1. Using the Registry Editor, open the following subkey: HKEY_LOCAL_MACHINE\SOFTWARE\cognex\AIK\AdapterBaslerpylon 2. Right-click the PoolSize entry, and click Modify. 3. Change the value in the Value data field as required. Use the following formula as a guide to estimating the required pool size. PostedItemsQueueSize + (GarbageCollectionInterval + 2) x NumJobs + SafetyFactor The maximum you can specify is 2 GB. If you require a greater pool size, you have to create an additional subkey called PoolSizeQuantum. See To Specify the PoolSizeQuantum Registry Entry for details. 4. Click OK. For more information, see the Cognex VisionPro help. Copyright 2015 by Basler AG Page 17 Basler pylon USB 3.0 AIK Adapter
How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro AW00132003000 To Specify the PoolSizeQuantum Registry Entry: 1. Using the Registry Editor, go to the following subkey: HKEY_LOCAL_MACHINE\SOFTWARE\cognex\AIK\AdapterBaslerpylon 2. Right-click the AdapterBaslerpylon subkey, and click New > String Value. 3. Name the new entry PoolSizeQuantum. 4. Right-click the PoolSizeQuantum entry, and click Modify. 5. Change the value in the Value data field to 0x400. 6. Click OK. The pool size will be calculated based on the following formula: PoolSize x PoolSizeQuantum Now you can for example specify a pool size of 4 GB by setting Poolsize to 4 MB (4 GB / 0x400). For more information, see the Acquiring Large Images with an Imaging Device section in the Cognex VisionPro help. NOTE Incorrectly editing the registry may severely damage your system. Before making any changes to the registry, you should back up any valued data on your computer. If these steps don t solve the problem, contact Basler support. Contact details can be found on the Basler website: http://www.baslerweb.com/support_contact-167426.html Copyright 2015 by Basler AG Page 18 Basler pylon USB 3.0 AIK Adapter
AW00132003000 How to Use the Basler pylon USB 3.0 AIK Adapter with Cognex VisionPro Revision History Document Number Date Changes AW00132001000 24 Jul 2014 Initial release of this document. AW00132002000 6 Feb 2015 Clarified that the AIK adapter only works with version 4.1 of the pylon Camera Software Suite. AW00132003000 15 Jun 2015 Updated the required pylon version and added that pylon runtimes are now contained in the AIK adapter setup.zip file. Basler AG Germany, Headquarters Tel. +49 4102 463 500 Fax +49 4102 463 599 sales.europe@baslerweb.com www.baslerweb.com USA Tel. +1 610 280 0171 Fax +1 610 280 7608 sales.usa@baslerweb.com Asia Tel. +65 6425 0472 Fax +65 6425 0473 sales.asia@baslerweb.com