跳转到内容

通过复制部署安装 Framegrabber SDK#

通过复制部署,您可以将 Framegrabber SDK 安装中的单个组件复制到您选择的目录中。这样,您可以控制或精简随用户应用程序一起交付的软件包。

请注意,如果您通过复制方式部署 Framegrabber SDK,则无法使用 Framegrabber SDK 的所有功能和工具。

前提条件#

  1. 您需要一台拥有管理员权限的 PC 才能安装 Framegrabber SDK。在以下说明中,该 PC 被称为源 PC。
  2. 从 Basler 网站下载 Basler Framegrabber SDK 并将其安装在源 PC 上。
  3. 如果您不想在源 PC 上运行基于 Framegrabber SDK 的应用程序,可以在安装过程中取消勾选所有选项。这样可以避免安装驱动程序,并防止修改环境变量或注册表。
  4. 由于您只是在准备用于复制部署的文件,因此可以忽略安装 Framegrabber SDK 后重新启动源 PC 的请求。
  5. The installation folder into which you have installed the Framegrabber SDK, is called <SDKRoot> in the following instructions.
  6. 从 Microsoft 下载适用于 Visual Studio 2015、2017、2019 或 2022 的 MSVC 可再发行组件包,并将其安装在源 PC 上。
  7. 由于您只是在准备用于复制部署的文件,因此可以忽略安装 Visual Code 后重新启动源 PC 的请求。
  8. 在源 PC 上为复制部署创建以下文件夹层级:

    FramegrabberSDK
    ├───bin
    ├───dll
    ├───drivers
    └───lib
    

This folder structure is called SDK package in the following instructions. Its root folder FramegrabberSDK is called <packageRoot>.

创建软件包#

创建软件包的基本组件#

本节提供有关如何复制 Framegrabber SDK 核心部分的说明,即无论您使用哪款采集卡都始终需要的部分。

  1. Copy the following files from <SDKRoot> into the corresponding folder inside <packageRoot>:

    <SDKRoot>
    └───bin
        ├───fglib5.dll
        ├───siso_hal.dll
        ├───siso_hw.dll
        ├───haprt.dll
        ├───iolibrt.dll
        └───logging-context.dll
    
  2. 从以下位置复制以下文件: C:\Windows\system32 更改为 \bin:

    Windows
    └───system32
        ├───vcruntime140.dll
        ├───vcruntime140_1.dll
        └───msvcp140.dll
    

添加对采集卡的支援#

mE5 marathon#

  1. Copy the following folders and files from <SDKRoot> to the corresponding folders in <packageRoot>:

    <SDKRoot>
    ├───bin
    |   └───GrabberFirmwareFlasher.exe
    ├───drivers
    |   └───me5
    │       ├───me5.cat
    │       ├───me5.inf
    │       ├───me5.sys
    │       └───WdfCoInstaller01009.dll
    └───lib
        └───siso_hw_me5.dll
    
  2. Copy the applet folders and files for your application from <SDKRoot>\dll\<board-type> to the corresponding folders in <packageRoot>:

    <SDKRoot>
    └───dll
        ├───mE5-MA-ACL
        ├───mE5-MA-ACX-DP
        ├───mE5-MA-ACX-QP
        ├───mE5-MA-ACX-SP
        ├───mE5-MA-VCL
        ├───mE5-MA-VCLx
        └───mE5-MA-VCX-QP
    
  3. Optionally: Copy your applets designed with VisualApplets to <packageRoot>\Hardware Applets<board-type>.

imaFlex / imaWorx / 接口卡#

  1. Copy the following folders and files from <SDKRoot> to the corresponding folders in <packageRoot>:

    <SDKRoot>
    ├───bin
    |   └───GrabberFirmwareUpdater.exe
    ├───drivers
    |   └───me6
    │       ├───basler_ic.cat
    │       ├───basler_ic.inf
    │       ├───basler_ic.sys
    │       └───WdfCoInstaller01009.dll
    └───lib
        └───siso_hw_me6.dll
    
  2. 从以下位置复制应用程序的 applet 文件夹和文件: \dll<board-type> to the corresponding folders in <packageRoot>:

    <SDKRoot>
    └───dll
        ├───CXP12-IC-1C
        │   ├───S1.1
        │   └───S1.2
        ├───CXP12-IC-2C
        │   └───S1.0
        ├───CXP12-IC-4C
        │   └───S1.0
        ├───iF-CXP12-P
        │   └───S1.1
        ├───iF-CXP12-Q
        │   └───S2.0
        └───iW-CXP12-Q
            └───S1.0
    
  3. Optionally: Copy your applets designed with VisualApplets to <packageRoot>\Hardware Applets<board-type>

添加对相机协议的支援#

CoaXPress#

If you use a CoaXPress frame grabber in your project, copy the following files from <SDKRoot> to the corresponding folders in <packageRoot>:

    <SDKRoot>
    └───bin
        ├───GCBase_MD_VC141_v3_1_Basler_pylon_v3.dll
        ├───GenApi_MD_VC141_v3_1_Basler_pylon_v3.dll
        ├───Log_MD_VC141_v3_1_Basler_pylon_v3.dll
        ├───MathParser_MD_VC141_v3_1_Basler_pylon_v3.dll
        ├───NodeMapData_MD_VC141_v3_1_Basler_pylon_v3.dll
        ├───siso_genicam.dll
        └───XmlParser_MD_VC141_v3_1_Basler_pylon_v3.dll

If you use a Camera Link frame grabber in your project, copy the following files from <SDKRoot> to the corresponding folders in <packageRoot>:

    <SDKRoot>
    └───bin
        ├───clsersis.dll
        └───clshell.exe

GenTL#

  1. To use the GenTL producer, copy the following files from <SDKRoot> to the corresponding folders in <packageRoot>:

    <SDKRoot>
    └───bin
        ├───GCBase_MD_VC141_v3_1_Basler_pylon_v3.dll
        ├───GenApi_MD_VC141_v3_1_Basler_pylon_v3.dll
        ├───Log_MD_VC141_v3_1_Basler_pylon_v3.dll
        ├───MathParser_MD_VC141_v3_1_Basler_pylon_v3.dll
        ├───NodeMapData_MD_VC141_v3_1_Basler_pylon_v3.dll
        └───XmlParser_MD_VC141_v3_1_Basler_pylon_v3.dll
    
  2. To use the CXP GenTL producer, copy the following files from <SDKRoot> to the corresponding folders in <packageRoot>:

    <SDKRoot>
    └───bin
        ├───ProducerCXP.cti
        └───siso_genicam.dll
    
  3. To use the Camera Link GenTL producer, copy the following files from <SDKRoot> to the corresponding folders in <packageRoot>:

    <SDKRoot>
    └───bin
        ├───BaslerCLProtocol.dll
        ├───CLAllSerial_MD_VC141_v3_1_Basler_pylon_v3.dll
        ├───CLProtocol_MD_VC141_v3_1_Basler_pylon_v3.dll
        ├───clsercom.dll
        ├───clsersis.dll
        ├───GenCP_MD_VC141_v3_1_Basler_pylon_v3.dll
        └───ProducerCL.cti
    

添加工具#

gpioTool#

If you want to use the gpioTool in your project, copy the following files from <SDKRoot> to the corresponding folders in <packageRoot>:

    <SDKRoot>
    └───bin
        ├───siso_auxport.dll
        └───gpioTool.exe

日志#

To get logging output from a running Framegrabber SDK application, e.g. in log files or by attaching the pylon Event Logger, copy the following files from <SDKRoot> to the corresponding folders in <packageRoot>:

<SDKRoot>
└───bin
    ├───common-logging-dispatcher.dll
    ├───common-logging-log4cpp.dll
    ├───BaslerFgSdkLogging.properties
    ├───GCBase_MD_VC141_v3_1_Basler_pylon_v3.dll
    ├───Log_MD_VC141_v3_1_Basler_pylon_v3.dll
    └───log4cpp_MD_VC141_v3_1_Basler_pylon_v3.dll

请注意,对于最后两个库,版本后缀(此处为:_v3)可能会因要部署的 Framegrabber SDK 版本而异或缺失。

有关如何配置日志记录的详细信息,请参阅日志消息系统。

Cognex VisionPro#

要将 Basler 采集卡与 Cognex VisionPro 配合使用,请遵循以下说明:

  1. 下载 Framegrabber Runtime 5.7 并将其安装在源 PC 上。
  2. 运行安装程序时,请确保选中 / 取消选中以下选项:
    • 在选择组件对话框中,选择Cognex Adapter。
    • 在 选择附加任务 对话框:
      • 取消勾选更新设备驱动程序和更新环境变量。
    • 确保注册表未被修改:
      • 在 Select Start Menu Folder 对话框中,选择 Don't create a start menu folder。
      • 在 Select Additional Tasks 对话框中,取消勾选 Desktop icon、Activate Virtual COM Port 和 Always Run COMWrapper Autorun at System Start。
  3. Copy the file SisoCognexAdapter.dll from the bin folder of the Runtime 5.7 installation to <packageRoot>\bin.

部署软件包#

部署基本组件#

要将复制的 Framegrabber SDK 版本部署到目标 PC:

  1. 将 SDK 软件包复制到目标 PC。
  2. 安装 Framegrabber SDK 的驱动程序。
  3. 设置环境变量 BASLER_FG_SDK_DIR to the full path of the <packageRoot> folder.
  4. 将 bin 文件夹添加到 SDK 软件包的 PATH 环境变量中。

部署 Cognex VisionPro Adapter#

若要在目标 PC 上使用 Cognex VisionPro Adapter,请参阅 Cognex VisionPro Adapter 文档中的Installing the Adapter Manually一章。