跳至內容
測試伺服器
開發伺服器

Line Minimum Output Pulse Width#

Line Minimum Output Pulse Width camera feature 允許您增加輸出訊號的訊號寬度(「脈衝寬度」),以達到最小訊號寬度。

增加相機輸出訊號的寬度可能是必要的,以配合某些需要特定最小訊號寬度才能偵測訊號的接收端。

使用此功能#

指定 Line Minimum Output Pulse Width#

  1. 將 LineSelector 參數設至所需的相機輸出 Line。
  2. 為 LineMinimumOutputPulseWidth 參數的值。

運作原理#

為了確保可靠地偵測相機輸出訊號,Line Minimum Output Pulse Width 功能允許您將輸出訊號寬度增加至最小寬度。最小寬度以微秒 (μs) 為單位指定,最大值可達 100 μs。

  • 若原始訊號寬度小於指定的最小訊號寬度,系統會加寬訊號以達到最小寬度。
  • 若原始訊號寬度大於或等於設定的最小訊號寬度,此功能將不會生效。

範例程式碼#

// Select output line Line 2
camera.LineSelector.SetValue(LineSelector_Line2);
// Set the parameter value to 10.0 microseconds
camera.LineMinimumOutputPulseWidth.SetValue(10.0);
INodeMap& nodemap = camera.GetNodeMap();
// Select output line Line 2
CEnumParameter(nodemap, "LineSelector").SetValue("Line2");
// Set the parameter value to 10.0 microseconds
CFloatParameter(nodemap, "LineMinimumOutputPulseWidth").SetValue(10.0);
// Select output line Line 2
camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line2);
// Set the parameter value to 10.0 microseconds
camera.Parameters[PLCamera.LineMinimumOutputPulseWidth].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 output line Line 2 */
errRes = PylonDeviceFeatureFromString(hdev, "LineSelector", "Line2");
CHECK(errRes);
/* Set the parameter value to 10.0 microseconds */
errRes = PylonDeviceSetFloatFeature(hdev, "LineMinimumOutputPulseWidth", 10.0);
CHECK(errRes);
# Select output line Line 2
camera.LineSelector.Value = "Line2"
# Set the parameter value to 10.0 microseconds
camera.LineMinimumOutputPulseWidth.Value = 10.0

您也可以使用 pylon Viewer 來輕鬆設定參數。