跳至內容

透過複製部署安裝 Framegrabber SDK#

透過複製部署(Copy Deployment),您可以將 Framegrabber SDK 安裝中的單一元件複製到您選擇的目錄中。這樣一來,您可以控制或縮減隨使用者應用程式一起交付的套件大小。

請注意,如果透過複製方式部署 Framegrabber SDK,將無法使用 Framegrabber SDK 的所有功能與工具。

先決條件#

  1. 您需要一台具備管理員權限的電腦來安裝 Framegrabber SDK。在後續說明中,此電腦稱為來源電腦。
  2. 從 Basler 網站下載 Basler Framegrabber SDK 並安裝在來源電腦上。
  3. 如果您不想在來源電腦上執行基於 Framegrabber SDK 的應用程式,可以在安裝期間取消勾選所有選項。這樣可避免安裝驅動程式,並避免修改環境變數或登錄檔。
  4. 由於您只是在準備用於複製部署的檔案,因此可以忽略安裝 Framegrabber SDK 後重新啟動來源電腦的要求。
  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 可轉發套件(MSVC Redistributable Package),並安裝在來源電腦上。
  7. 由於您只是在準備用於複製部署的檔案,因此可以忽略安裝 Visual Code 後重新啟動來源電腦的要求。
  8. 在來源電腦上為複製部署建立以下資料夾階層:

    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#

若要在 Cognex VisionPro 中使用 Basler 擷取卡,請遵循以下說明:

  1. 下載 Framegrabber Runtime 5.7 並將其安裝在來源 PC 上。
  2. 執行安裝程式時,請務必選取/取消選取以下選項:
    • 在「選取元件」對話方塊中,選取「Cognex Adapter」。
    • 在 Select Additional Tasks 對話方塊:
      • 取消選取「更新裝置驅動程式」和「更新環境變數」。
    • 確保未修改登錄:
      • 在「選取開始功能表資料夾」對話方塊中,選取「不要建立開始功能表資料夾」。
      • 在「選取附加工作」對話方塊中,取消選取「桌面圖示」、「啟動虛擬 COM 連接埠」以及「永遠在系統啟動時執行 COMWrapper 自動執行」。
  3. Copy the file SisoCognexAdapter.dll from the bin folder of the Runtime 5.7 installation to <packageRoot>\bin.

部署套件#

部署核心元件#

若要在目標 PC 上部署已複製的 Framegrabber SDK 版本:

  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 文件中的手動安裝介面卡一章。