Line Logic#
I/O 線路的邏輯狀態可以是正邏輯,也可以是負邏輯。
使用功能#
確定Line Logic#
要判斷 I/O 線路的邏輯狀態:
- 將相機中的
LineSelector將參數設定至所需的 I/O 線。 - 取得
LineLogic參數中選擇性地指定 HTML 記錄檔 (*.html) 的路徑與檔名。
此參數為唯讀。
Line Logic 概覽#
正面的Line Logic#
若線路邏輯為正,則 I/O 線路的電氣狀態與 LineStatus 參數如下:
| 電氣狀態 | LineStatus 參數值 |
|---|---|
| 電壓水準過高 | 是 |
| 電壓過低 | 錯誤 |
否Line Logic#
若線路邏輯為負值,則 I/O 線路的電氣狀態與 LineStatus 參數如下:
| 電氣狀態 | LineStatus 參數值 |
|---|---|
| 電壓水準過高 | 錯誤 |
| 電壓過低 | 是 |
範例程式碼#
/* 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 a line */
errRes = PylonDeviceFeatureFromString(hdev, "LineSelector", "Line1");
CHECK(errRes);
/* Get the logic of the line */
len = sizeof(e_str);
errRes = PylonDeviceFeatureToString(hdev, "LineLogic", e_str, &len);
CHECK(errRes);
您也可以 use the pylon Viewer 來輕鬆設定參數。