Line Format#
使用功能#
判定 Line Format#
若要決定 I/O 線路的電氣格式:
- 將相機中的
LineSelector參數設為所需的 I/O 線路,例如:Line1. - 取得
LineFormat參數中選擇性地指定 HTML 記錄檔 (*.html) 的路徑與檔名。
此參數為唯讀。
可用值#
可能的數值包括:
NoConnect:此線路未連接。OptoCoupled:此線路為 光耦合 I/O 線路.OpenDrain,TTL,LVTTL,或RS422:此線路為 通用 I/O (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 來輕鬆設定參數。