Line Logic#
I/O 라인의 로직은 양성(Positive) 또는 음성(Negative)일 수 있습니다.
Using the Feature#
Line Logic 결정 방법#
I/O 라인의 로직을 확인하려면:
- 다음 파라미터를
LineSelector파라미터를 원하는 I/O 라인에 설정합니다. - 다음의 값을 가져옵니다
LineLogicparameter를 사용하십시오.
이 매개변수는 읽기 전용입니다.
Line Logic 개요#
Positive Line Logic#
Line logic이 양성인 경우, I/O 라인의 전기적 상태와 LineStatus 파라미터는 다음과 같습니다.
| Electrical Status | LineStatus Parameter Value |
|---|---|
| 전압 레벨 높음 | True |
| 전압 레벨 낮음 | False |
Negative Line Logic#
Line logic이 음성인 경우, I/O 라인의 전기적 상태와 LineStatus 파라미터는 다음과 같습니다.
| Electrical Status | LineStatus Parameter Value |
|---|---|
| 전압 레벨 높음 | False |
| 전압 레벨 낮음 | True |
Sample Code#
/* 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);
또한 pylon Viewer를 사용하여 파라미터를 간편하게 설정할 수 있습니다.