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

Line Format#

透過 Line Format camera feature,您可以決定 I/O 線路的電氣格式。

使用此功能#

決定 Line Format#

若要決定 I/O 線路的電氣格式:

  1. 將 LineSelector 參數至所需的 I/O 線路,例如: Line1.
  2. 取得 LineFormat 參數的值。
    此參數為唯讀。

可能的值#

可能的值包括:

範例程式碼#

// 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

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