Line Format#
使用功能#
確定Line Format#
要確定 I/O 線路的電氣規格:
- 將相機中的
LineSelector將參數設定至所需的 I/O 線,例如:Line1. - 取得
LineFormat參數中選擇性地指定 HTML 記錄檔 (*.html) 的路徑與檔名。
此參數為唯讀。
可能的值#
可能的數值包括:
NoConnect: 線路未連接。OptoCoupled: 這條線是一條 光耦合式 I/O 線路.OpenDrain,TTL,LVTTL,或RS422: 這條線是一條 通用輸入/輸出 (GPIO) 行。
範例程式碼#
/* 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);
您也可以 use the pylon Viewer 來輕鬆設定參數。