Line Debouncer#
十分な長さの信号のみがカメラを通過し、有効になります。
この機能はInput Filter機能に似ており、 ace 2 boostカメラおよびdart IMXカメラでのみ利用可能です。
機能を使用する#
仕組み#
ラインデバウンサーは、着信ハードウェアトリガー信号の立ち上がりエッジおよび立ち下がりエッジから不要な短い信号(接点バウンス)を除外します。これを実現するために、ラインデバウンサーはハードウェア信号の論理状態のすべての変化と期間を評価します。
この評価期間の最大長さは、LineDebbounderTime
パラメーターで定義されます。ラインデバウンサーは、信号の持続時間を測定して有効な信号を識別するクロックのように動作します。
クロックは、ハードウェア信号がその論理状態(高から低、またはその逆)を変更するたびにカウントを開始します。
- 新しい論理状態の継続時間が指定されたラインデバウンスタイムより短い場合、新しい論理状態は無効と見なされ、影響はありません。
- 新しい論理状態の継続時間がラインデバウンスタイムと同等、またはそれ以上の場合、新しい論理状態は有効と見なされ、カメラで有効になります。
情報
ラインデバウンスタイムを指定すると、カメラに到着した有効なトリガー信号と、関連する論理状態の変化がカメラに渡された瞬間との間に遅延が発生します。
遅延時間は、LineDebouncerTime
パラメーターの値以上です。これは、カメラが指定された時間だけ待機して、信号が有効かどうかを判断するためです。同様に、ラインデバウンサーは有効なトリガー信号の終了を遅延させます。
次の図は、ラインデバウンサーがハードウェアトリガー信号の立ち上がりエッジと立ち下がりエッジから無効な信号をフィルタリングする方法を示しています。カメラの論理的な状態の変更を可能にするラインデバウンスタイムには、「OK」というラベルが付きます。また、ハードウェアトリガー信号に関する遅延も図示されています。
Line Debouncerの有効化#
- カメラがハードウェアトリガー用に設定されていることを確認します。
LineSelector
パラメーターをLine1
などの目的の入力ラインに設定します。LineDebbounderTime
パラメーターの値を入力します。
Debouncer Valueの選択#
LineDebouncerTime
の値が小さすぎると、無効な信号や信号状態を受け入れることになります。- 値が大きすぎると、有効な信号や信号状態が拒否されてしまいます。
Baslerでは、無効な信号の予想される最長時間よりもわずかに長いラインデバウンスタイムを選択することをお勧めします。
短い有効な信号を拒否するリスクがわずかにありますが、ほとんどのシナリオでは、このアプローチは良好な結果をもたらすはずです。アプリケーションを監視し、必要に応じて、拒否される有効な信号が多すぎる場合は値を調整します。
サンプルコード#
ace Classic/U/L GigEカメラ#
// Select the desired input line
camera.LineSelector.SetValue(LineSelector_Line1);
// Set the parameter value to 10 microseconds
camera.LineDebouncerTimeAbs.SetValue(10.0);
INodeMap& nodemap = camera.GetNodeMap();
// Select the desired input line
CEnumParameter(nodemap, "LineSelector").SetValue("Line1");
// Set the parameter value to 10 microseconds
CFloatParameter(nodemap, "LineDebouncerTimeAbs").SetValue(10.0);
// Select the desired input line
camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line1);
// Set the parameter value to 10 microseconds
camera.Parameters[PLCamera.LineDebouncerTimeAbs].SetValue(10.0);
/* 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 the desired input line */
errRes = PylonDeviceFeatureFromString(hdev, "LineSelector", "Line1");
CHECK(errRes);
/* Set the parameter value to 10 microseconds */
errRes = PylonDeviceSetFloatFeature(hdev, "LineDebouncerTimeAbs", 10.0);
CHECK(errRes);
その他のカメラ#
// Select the desired input line
camera.LineSelector.SetValue(LineSelector_Line1);
// Set the parameter value to 10 microseconds
camera.LineDebouncerTime.SetValue(10.0);
INodeMap& nodemap = camera.GetNodeMap();
// Select the desired input line
CEnumParameter(nodemap, "LineSelector").SetValue("Line1");
// Set the parameter value to 10 microseconds
CFloatParameter(nodemap, "LineDebouncerTime").SetValue(10.0);
// Select the desired input line
camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line1);
// Set the parameter value to 10 microseconds
camera.Parameters[PLCamera.LineDebouncerTime].SetValue(10.0);
/* 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 the desired input line */
errRes = PylonDeviceFeatureFromString(hdev, "LineSelector", "Line1");
CHECK(errRes);
/* Set the parameter value to 10 microseconds */
errRes = PylonDeviceSetFloatFeature(hdev, "LineDebouncerTime", 10.0);
CHECK(errRes);
pylon Viewerを使用して、パラメーターを簡単に設定することもできます。