コンテンツにスキップ

CXP-12インターフェースカードの設定#

このトピックでは、pylon API、pylon Viewer、またはgpioToolを使用してBasler CXP-12インターフェースカードを設定する方法について説明します。

情報

This topic covers basic use cases. For in-depth information about the software features of the interface card, see the acquisition applets PDF documentation.

インターフェースカードの設定は、次の状況で特に役立ちます。

  • インターフェースカードで使用するアプレットを変更する場合。
  • インターフェースカードを介して接続されたBasler boost CXP-12カメラをトリガーする場合。
  • 画像処理システムのパフォーマンスを向上させるために、インターフェースカードでデバイエルを実行する場合。
  • 16ビットモノラル形式など、カメラでは使用できない出力形式を使用する場合。
  • インターフェースカードによって送受信されるトリガー信号を設定する場合。

Limitation

In all applets, buffers larger than 4 GB can't be allocated. Even if the applet allows a larger buffer size, you can't allocate buffers larger than 4 GB due to limitations in the driver and firmware.

You can calculate the buffer size as follows:

Buffer size = image height * image width * (pixel width / 8).

For RGB images: buffer size = (image height * image width * (pixel width / 8)) * 3 .

Available Area Scan Applets and Default Applets#

インターフェースカードのモデルに応じて、次のアプレットが使用可能で、デフォルトとして設定されています。

アプレット名 Available For Interface Card Default Applet On Interface Card
Acq_SingleCXP12Area 1C、2C、4C 1C
Acq_DualCXP12Area 2C、4C 2C
Acq_TripleCXP12Area 4C -
Acq_QuadCXP12Area 4C 4C

Available Line Scan Applets#

Depending on the interface card model, the following applets are available. Note that the default applet (i.e., the applet that is loaded by default) is always an area scan applet. Thus, if you want to use a line scan applet, you must load it first as described in Changing the Applet.

アプレット名 Available For Interface Card
Acq_SingleCXP12Line 1C、2C、4C
Acq_DualCXP12Line 2C、4C
Acq_TripleCXP12Line 4C
Acq_QuadCXP12Line 4C

Documentation#

The following sections provide links to the acquisition applets documentation:

CXP-12インターフェースカード1C#

GenTL Fglib
Acq_SingleCXP12x1Area PDF Acq_SingleCXP12x1Area PDF
Acq_SingleCXP12Line PDF Acq_SingleCXP12Line PDF
Frame Grabber Test Applet PDF Frame Grabber Test Applet PDF

CXP-12インターフェースカード2C#

GenTL Fglib
Acq_SingleCXP12Area PDF Acq_SingleCXP12Area PDF
Acq_DualCXP12Area PDF Acq_DualCXP12Area PDF
Acq_SingleCXP12Line PDF Acq_SingleCXP12Line PDF
Acq_DualCXP12Line PDF Acq_DualCXP12Line PDF
Frame Grabber Test Applet PDF Frame Grabber Test Applet PDF

CXP-12インターフェースカード4C#

GenTL Fglib
Acq_SingleCXP12Area PDF Acq_SingleCXP12Area PDF
Acq_DualCXP12Area PDF Acq_DualCXP12Area PDF
Acq_TripleCXP12Area PDF Acq_TripleCXP12Area PDF
Acq_QuadCXP12Area PDF Acq_QuadCXP12Area PDF
Acq_SingleCXP12Line PDF Acq_SingleCXP12Line PDF
Acq_DualCXP12Line PDF Acq_DualCXP12Line PDF
Acq_TripleCXP12Line PDF Acq_TripleCXP12Line PDF
Acq_QuadCXP12line PDF Acq_QuadCXP12line PDF
FrameGrabberTest Frame Grabber Test Applet PDF

適切なアプレットの選択#

シングルチャンネル(1-CXP)カメラのみを使用している場合、デフォルトのアプレットは常に機能し、変更する必要はありません。

ただし、マルチチャンネル(2-CXPや4-CXPなど)のカメラを使用している場合は、カメラ設定に適したアプレットを選択する必要があります。そうしないと、カメラが動作しなかったり、カメラのパフォーマンスが大幅に低下したりする可能性があります。

どちらのアプレットが適切かは、カメラ数、カメラあたりのチャンネル数、目的のROIステップサイズによって異なります。

ROIステップサイズは画像前処理の並列性によって異なるため、カメラやフレームグラバーによって異なります。

CXP-12インターフェースカード1C#

Area Scan Applets for the CXP-12 Interface Card 1C#

1チャンネルカメラの容量 2チャンネルカメラの容量 4チャンネルカメラの容量 アプレット ROIステップサイズ[px] トポロジー
1 Acq_SingleCXP12x1Area x:4
y:1
1台のカメラ、1つのチャンネル

Line Scan Applets for the CXP-12 Interface Card 1C#

1チャンネルカメラの容量 2チャンネルカメラの容量 4チャンネルカメラの容量 アプレット ROIステップサイズ[px] トポロジー
1 Acq_SingleCXP12Line x:4
y:1
1台のカメラ、1つのチャンネル

CXP-12インターフェースカード2C#

Area Scan Applets for the CXP-12 Interface Card 2C#

1チャンネルカメラの容量 2チャンネルカメラの容量 4チャンネルカメラの容量 アプレット ROIステップサイズ[px] トポロジー
1 Acq_DualCXP12Area x:8
y:1
1台のカメラ、1つのチャンネル
2 Acq_DualCXP12Area x:8
y:1
2台のカメラ、それぞれ1つのチャンネル
1 Acq_SingleCXP12Area x:16
y:1
1台のカメラ、2つのチャンネル

Line Scan Applets for the CXP-12 Interface Card 2C#

1チャンネルカメラの容量 2チャンネルカメラの容量 4チャンネルカメラの容量 アプレット ROIステップサイズ[px] トポロジー
1 Acq_DualCXP12Line x:8
y:1
1台のカメラ、1つのチャンネル
2 Acq_DualCXP12Line x:8
y:1
2台のカメラ、それぞれ1つのチャンネル
1 Acq_SingleCXP12Line x:16
y:1
1台のカメラ、2つのチャンネル

CXP-12インターフェースカード4C#

Area Scan Applets for the CXP-12 Interface Card 4C#

1チャンネルカメラの容量 2チャンネルカメラの容量 4チャンネルカメラの容量 アプレット ROIステップサイズ[px] トポロジー
1 Acq_QuadCXP12Area x:8
y:1
1台のカメラ、1つのチャンネル
2 Acq_QuadCXP12Area x:8
y:1
2台のカメラ、それぞれ1つのチャンネル
3 Acq_QuadCXP12Area x:8
y:1
3台のカメラ、それぞれ1つのチャンネル
4 Acq_QuadCXP12Area x:8
y:1
4台のカメラ、それぞれ1つのチャンネル
1 Acq_DualCXP12Area x:16
y:1
1台のカメラ、2つのチャンネル
2 Acq_DualCXP12Area x:16
y:1
2台のカメラ、それぞれ2つのチャンネル
1 Acq_SingleCXP12Area x:32
y:1
1台のカメラ、4つのチャンネル
1 1 Acq_TripleCXP12Area x:8
y:1
1台のカメラ(1つのチャンネル付き)と1台のカメラ(2つのチャンネル付き)
2 1 Acq_TripleCXP12Area x:8
y:1
2台のカメラ(1つのチャンネル付き)と1台のカメラ(2つのチャンネル付き)

Line Scan Applets for the CXP-12 Interface Card 4C#

1チャンネルカメラの容量 2チャンネルカメラの容量 4チャンネルカメラの容量 アプレット ROIステップサイズ[px] トポロジー
1 Acq_QuadCXP12Line x:8
y:1
1台のカメラ、1つのチャンネル
2 Acq_QuadCXP12Line x:8
y:1
2台のカメラ、それぞれ1つのチャンネル
3 Acq_QuadCXP12Line x:8
y:1
3台のカメラ、それぞれ1つのチャンネル
4 Acq_QuadCXP12Line x:8
y:1
4台のカメラ、それぞれ1つのチャンネル
1 Acq_DualCXP12Line x:16
y:1
1台のカメラ、2つのチャンネル
2 Acq_DualCXP12Line x:16
y:1
2台のカメラ、それぞれ2つのチャンネル
1 Acq_SingleCXP12Line x:32
y:1
1台のカメラ、4つのチャンネル
1 1 Acq_TripleCXP12Line x:8
y:1
1台のカメラ(1つのチャンネル付き)と1台のカメラ(2つのチャンネル付き)
2 1 Acq_TripleCXP12Line x:8
y:1
2台のカメラ(1つのチャンネル付き)と1台のカメラ(2つのチャンネル付き)

アプレットの変更#

インターフェースカード上で実行されるアプレットによって、その機能が定義されます。一部のカメラ設定では、デフォルトのアプレットを変更する必要があります。

To change the applet used by the interface card, set the InterfaceApplet parameter to the name of the applet to be loaded, e.g., Acq_DualCXP12Area.

インターフェースカードを使用したBasler boost CXP-12カメラの起動#

情報

このセクションは、インターフェースカードを介してカメラをトリガーする場合にのみ関係があります。通常、カメラはカメラのI/Oコネクターを介してトリガーされます。詳細については、「トリガーされた画像取得」を参照してください。

ハードウェアトリガー(外部)#

外部トリガーが有効な場合、トリガー入力信号をインターフェースカードに送信できます。インターフェースカードはこれらの信号をBasler boostカメラに転送します。

外部ハードウェアトリガー用にインターフェースカードを設定するには:

  1. Set the AreaTriggerMode parameter to External.
  2. Set the TriggerInSource parameter to the desired "Front GPI" input line.
    For example, if you want to use GPI0 (pin 11 and 12 on the interface card) for external triggering, set the parameter to FrontGpiTriggerSource0.
  3. Set the TriggerCameraOutSelect parameter to the corresponding "Bypass" option.
    For example, if you selected FrontGpiTriggerSource0, set the TriggerCameraOutSelect parameter to BypassFrontGpi0.
  4. Set the TriggerState parameter to Active.
  5. 必要に応じて、以下の説明に従ってトリガー信号を設定します。

All trigger signals will be forwarded to the camera's source signals CxpTrigger0 and CxpTrigger1. The signals can be used for various purposes. The most common use case is image acquisition. See the example below.

ハードウェアトリガー(内部)#

内部トリガーが有効な場合、インターフェースカードは、指定された周波数でトリガー信号を内部で生成します。すべての外部トリガー信号は無視されます。

内部ハードウェアトリガー用にインターフェースカードを設定するには:

  1. Set the AreaTriggerMode parameter to Generator.
  2. Set the TriggerOutputFrequency parameter to the desired trigger output frequency. For example, if you set the parameter to 8, the interface card will generate 8 trigger signals per second.
  3. Set the TriggerCameraOutSelect parameter to the desired output line, e.g., PulseGenerator0.
  4. Set the TriggerState parameter to Active.

これで、画像取得を開始する際には必ず、インターフェースカードが指定された周波数でトリガー信号を生成します。

All trigger signals will be forwarded to the camera's source signals CxpTrigger0 and CxpTrigger1. The signals can be used for various purposes. The most common use case is image acquisition. See the example below.

例:画像取得のトリガー信号の使用#

インターフェースカードによって生成された外部または内部トリガー信号を使用して画像を取得するには:

  1. On the camera, set the TriggerSelector parameter to FrameStart.
  2. Set the TriggerMode parameter to On.
  3. Set the ExposureMode parameter to Timed.
  4. Set the TriggerSource parameter to CxpTrigger0 or CxpTrigger1.

これで、インターフェースカードがトリガー信号を受信または生成するたびに、カメラは画像を取得します。

情報

You can use the trigger signals as the source for any Basler boost camera feature that can be controlled by a signal source. For example, setting the CounterTriggerSource parameter to CxpTrigger0 allows you to control the Counter feature using the interface card.

インターフェースカードでのデベイヤリングの実行#

CXP-12インターフェースカード1Cでは、インターフェースカードでディベートを行うことができます。これにより、カメラとホストコンピューターのコンピューティング負荷が軽減されます。

これを行うには:

  1. Start the pylon Viewer and open a connection to the interface card and the camera.
  2. Use the feature tree to make the following settings:
    • On the camera, set the Pixel Format option to a Bayer pixel format, e.g., Bayer RG 12.
    • Navigate to Device Transport Layer and disable the Automatic Format Control option.
      This allows you to set the output format independently of the pixel format used by the camera.
    • On the interface card, set the OutputFormat option to the corresponding RGB pixel format.
      The bit depth must be three times the bit depth of the Bayer pixel format. For example, Bayer RG 12 (camera) = Color 36 bit (interface card).

これで、インターフェースカードは、カメラの生画像データでデベイヤリングを実行し、RGB画像データを出力します。

情報

上記の手順3で、正しいRGBピクセルフォーマットを設定していることを確認します。そうでない場合は、画像が正しく取得されません。

カメラでは使用できない出力形式の使用#

Basler boostカメラは、いくつかのピクセルフォーマットで画像データを出力できます(Bayer RG 8やRBG 8など)。詳細については、ピクセルフォーマットのトピックを参照してください。

必要なピクセルフォーマットがカメラで使用できず、ホストコンピューターでの画像変換も避けたい場合は、インターフェースカードが提供するピクセルフォーマットのいずれかを使用できる場合があります。

インターフェースカードには、次の形式があります。

Gray8bit Gray10bit Gray12bit Gray16bit
Color24bit Color30bit Color36bit Color48bit
Bayergr8 Bayergr10 Bayergr12 Bayergr16
Bayerrg8 Bayerrg10 Bayerrg12 Bayerrg16
Bayergb8 Bayergb10 Bayergb12 Bayergb16
Bayerbg8 Bayerbg10 Bayerbg12 Bayerbg16

カメラで使用できない出力形式を使用するには:

  1. On the camera, set the PixelFormat parameter to the desired camera pixel format, e.g., Mono12.
  2. On the interface card, set the AutomaticFormatControl parameter to false.
    This allows you to set the output format independently of the pixel format used by the camera.
  3. On the interface card, set the Format parameter to the desired output format, e.g., Gray16bit.

上記の例の値を使用すると、インターフェースカードは12ビットカメラの画像データに基づいて16ビットの画像データを出力します。パディングビット(ゼロ)は、下図のように挿入されます。

12ビットカメラ画像データに基づく16ビット画像データ

Configuring the Trigger Signals Using the gpioTool#

gpioToolコマンドラインツールを使用すると、インターフェースカードで受信または送信されるトリガー信号の物理的特性を次のように設定できます。

  • シングルエンドまたは差動信号を受信するように入力ラインを設定できます。
  • プルアップまたはプルダウンモードで動作するように入力ラインを設定できます。
  • 出力信号を反転するかどうかを指定できます。

gpioToolは、pylon Camera Software Suiteに付属しています。

ツールを起動するには:

  1. コマンドプロンプトウィンドウ(Windows)またはターミナルウィンドウ(Linux)を開きます。
  2. pylonインストールのbinディレクトリーに移動します。

    • Windows(64ビット):%programfiles%\Basler\pylon x\Runtime\x64\pylonCXP\bin
    • Windows(32ビット):%programfiles%\Basler\pylon x\Runtime\Win32\pylonCXP\bin
    • Linux:/opt/pylon/lib/pylonCXP/bin
  3. 以下のオプションを使用してgpioToolを起動します。

オプション#

次のオプションが使用できます。

gpioTool -b [board_index]
         -g
         -v
         -s [bank]:[settings]
         -h

-b [board_index]
Specify which CXP-12 Interface Card in your system you want to address. This parameter is mandatory for all options except -h.
The value range of [board_index] is the index numbers of all CXP-12 Interface Card boards installed in your system. If you only have one CXP-12 Interface Card in your system, set [board_index] to 0.

-b [board_index] -g
Show the current GPIO bank settings of the CXP-12 Interface Card specified.

-b [board_index] -v
Show the current GPIO bank settings with verbose output.

-b [board_index] -s [bank]:[settings]
Configure the GPIO bank on the CXP-12 Interface Card specified.
[bank] specifies the index number of the GPIO bank. On the CXP Interface Card 1C, exactly one GPIO bank (the front GPIO) is available. Therefore, always set [bank] to 0.
[settings] configures the settings. See below.

-h
Show help.

設定#

For the [settings] part in -b [board_index] -s [bank]:[settings], the following settings are available:

設定 結果
[signal] se シングルエンド信号を受信するように入力ラインを設定します。
[signal] ds 差動信号を受信するように入力ラインを設定します。
[pull-up-down] pu プルアップモードで動作するように入力ラインを設定します。a
[pull-up-down] pd プルダウンモードで動作するように入力ラインを設定します。b
[inversion] ni 出力ラインの反転を無効にします。
[inversion] in 出力ラインの反転を有効にします。

  1. 多くのアプリケーションでは、このモードを設定する必要があります。インターフェースカードは10kΩプルアップ抵抗を有効にして、NPNトランジスター(オープンコレクター、オープンドレイン)からの信号を受信します。

  2. インターフェースカードは、10kΩプルダウン抵抗を有効にして、PNPトランジスター(オープンエミッター、オープンソース)から信号を受信します。

You must enter the settings in the following format: [signal],[pull-up-down],[inversion]. Example: ds,pu,ni

Alternatively, you can set [settings] to default. This resets the configuration of a GPIO bank.

#

gpioTool -b 0 -s 0:ds,pu,ni

このコマンドは、インターフェースカードを次のように設定します。

  • -b 0: Configure the GPIOs on board 0.
  • -s: Start the actual configuration.
  • 0:: Configure GPIO bank 0 (front GPIO).
  • ds,pu,ni: Configure the front GPIO to receive differential signals (ds), to work in pull-up mode (pu), and to send the outgoing signals not inverted (ni).

設定のリセット#

To reset a board and GPIO bank to the default settings, start the gpioTool with [settings] set to default:

gpioTool -b [board_index] -s [bank]:default

Example: gpioTool -b 0 -s 0:default

サンプルコード#

// Select the Acq_SingleCXP12Area applet
camera.GetTLParams().InterfaceApplet.SetValue(Acq_SingleCXP12Area);
// Configure the interface card for external triggering
camera.GetTLParams().AreaTriggerMode.SetValue(AreaTriggerMode_External);
camera.GetTLParams().TriggerInSource.SetValue(TriggerInSource_FrontGpiTriggerSource0);
camera.GetTLParams().TriggerCameraOutSelect.SetValue(TriggerCameraOutSelect_BypassFrontGpi0);
camera.GetTLParams().TriggerState.SetValue(TriggerState_Active);
// Configure the interface card for internal triggering
camera.GetTLParams().AreaTriggerMode.SetValue(AreaTriggerMode_Generator);
camera.GetTLParams().TriggerOutputFrequency.SetValue(8);
camera.GetTLParams().TriggerCameraOutSelect.SetValue(TriggerCameraOutSelect_PulseGenerator0);
camera.GetTLParams().TriggerState.SetValue(TriggerState_Active);
// Use the external or internal trigger signals for image acquisition
camera.TriggerSelector.SetValue(TriggerSelector_FrameStart);
camera.TriggerMode.SetValue(TriggerMode_On);
camera.ExposureMode.SetValue(ExposureMode_Timed);
camera.TriggerSource.SetValue(TriggerSource_CxpTrigger0);
// Perform debayering on the interface card (Bayer RG 12 --> RGB 36 bit)
camera.PixelFormat.SetValue(PixelFormat_BayerRG12);
camera.GetTLParams().AutomaticFormatControl.SetValue(false);
camera.GetTLParams().Format.SetValue(Format_Color36bit);
// Configure the interface card to output 16-bit mono image data based on
// 12-bit mono image data from the camera
camera.PixelFormat.SetValue(PixelFormat_Mono12);
camera.GetTLParams().AutomaticFormatControl.SetValue(false);
camera.GetTLParams().Format.SetValue(Format_Gray16bit);

このサンプルコードは、C++言語でのみ使用できます。

pylon Viewerを使用して、パラメーターを簡単に設定することもできます。