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

Line Format#

「Line Format 」相機功能可讓您判定 I/O 線路的電氣規格。

使用功能#

確定Line Format#

要確定 I/O 線路的電氣規格:

  1. 將相機中的 LineSelector 將參數設定至所需的 I/O 線,例如: Line1.
  2. 取得 LineFormat 參數中選擇性地指定 HTML 記錄檔 (*.html) 的路徑與檔名。
    此參數為唯讀。

可能的值#

可能的數值包括:

範例程式碼#

// Select the desired I/O line
camera.LineSelector.SetValue(LineSelector_Line1);
// Get the electrical format of the line
LineFormatEnums e = camera.LineFormat.GetValue();
INodeMap& nodemap = camera.GetNodeMap();
// Select the desired I/O line
CEnumParameter(nodemap, "LineSelector").SetValue("Line1");
// Get the electrical format of the line
String_t e = CEnumParameter(nodemap, "LineFormat").GetValue();
// Select the desired I/O line
camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line1);
// Get the electrical format of the line
string e = camera.Parameters[PLCamera.LineFormat].GetValue();
/* 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 */
size_t len = 0;
char e_str[64] = {0};
/* Select the desired I/O line */
errRes = PylonDeviceFeatureFromString(hdev, "LineSelector", "Line1");
CHECK(errRes);
/* Get the electrical format of the line */
len = sizeof(e_str);
errRes = PylonDeviceFeatureToString(hdev, "LineFormat", e_str, &len);
CHECK(errRes);
# Select the desired I/O line
camera.LineSelector.Value = "Line1"
# Get the electrical format of the line
e = camera.LineFormat.Value

您也可以 use the pylon Viewer 來輕鬆設定參數。