コンテンツにスキップ

Line Selector#

Line Selectorカメラ機能を使用すると、設定するI/Oラインを選択できます。

機能を使用する#

ラインの選択#

To select a line, set the LineSelector parameter to the desired I/O line, e.g., Line1.

カメラのモデルによって、I/Oラインの総数、ラインのフォーマット(光結合またはGPIO)、およびピンの割り当てが異なる場合があります。お使いのカメラモデルの機能を確認するには、カメラトピックの「Physical Interface」セクションを参照してください。カメラのトピックは、「Models」セクションにあります。

実行可能なタスクは、I/Oラインが入力または出力のいずれかとして機能するかによって異なります。

ラインを選択したら、次の操作を実行できます。

Task 機能
入力ラインのデバウンサーの設定 Line Debouncer
出力ラインのソース信号の選択 Line Source
出力ラインの最小pulse幅の設定 Line Minimum Output Pulse Width
ユーザー設定が可能な出力ラインのラインステータスの設定 User Output Value
GPIOラインのラインモードの設定 Line Mode
反転機能の有効化 Line Inverter
単一I/Oラインのステータスの確認 Line Status

サンプルコード#

// Select input line 1
camera.LineSelector.SetValue(LineSelector_Line1);
INodeMap& nodemap = camera.GetNodeMap();
// Select input line 1
CEnumParameter(nodemap, "LineSelector").SetValue("Line1");
// Select input line 1
camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line1);
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK;  /* Return value of pylon methods */
/* Select input line 1 */
errRes = PylonDeviceFeatureFromString(hdev, "LineSelector", "Line1");
CHECK(errRes);
# Select input line 1
camera.LineSelector.Value = "Line1"

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