콘텐츠로 바로 가기
STAGING SERVER
DEVELOPMENT SERVER

Line Logic#

Line Logic 카메라 기능을 사용하면 I/O 라인의 로직을 결정할 수 있습니다.

I/O 라인의 로직은 포지티브 또는 네거티브일 수 있습니다.

기능 사용#

Line Logic 결정하기#

I/O 라인의 논리를 확인하려면 다음을 수행합니다.

  1. 파라미터를 원하는 LineSelector 원하는 I/O 라인에 매개변수를 설정합니다.
  2. 다음의 값을 가져옵니다. LineLogic 파라미터에 HTML 로그 파일(*.html)의 경로와 이름을 지정할 수 있습니다.
    이 파라미터는 읽기 전용입니다.

Line Logic 개요#

Positive Line Logic#

라인 로직이 포지티브인 경우, I/O 라인의 전기적 상태와 LineStatus 파라미터 간의 관계는 다음과 같습니다.

전기적 상태 LineStatus 파라미터 값
전압 레벨 높음 True
전압 레벨 낮음 False

Negative Line Logic#

라인 로직이 네거티브인 경우, I/O 라인의 전기적 상태와 LineStatus 파라미터 간의 관계는 다음과 같습니다.

전기적 상태 LineStatus 파라미터 값
전압 레벨 높음 False
전압 레벨 낮음 True

샘플 코드#

// Select a line
camera.LineSelector.SetValue(LineSelector_Line1);
// Get the logic of the line
LineLogicEnums e = camera.LineLogic.GetValue();
INodeMap& nodemap = camera.GetNodeMap();
// Select a line
CEnumParameter(nodemap, "LineSelector").SetValue("Line1");
// Get the logic of the line
String_t e = CEnumParameter(nodemap, "LineLogic").GetValue();
// Select a line
camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line1);
// Get the logic of the line
string e = camera.Parameters[PLCamera.LineLogic].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 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);
# Select a line
camera.LineSelector.Value = "Line1"
# Get the logic of the line
e = camera.LineLogic.Value

pylon Viewer를 사용하여 파라미터를 손쉽게 설정할 수도 있습니다.