跳转到内容
STAGING SERVER
DEVELOPMENT SERVER

Line Termination#

通过 Line Termination 相机功能,您可以在相机差分传输线的末端启用端接电阻。

相机的 GPIO 线路旨在传输 RS-422 差分信号。在传输线末端启用 120 Ω 电阻可避免信号反射并确保信号完整性。

信息

有关相机 I/O 电路的详细信息,请参阅 I/O Control of racer 2 L and racer 2 XL Cameras 主题。

该功能的使用#

启用 Line Termination#

  1. 设置 LineSelector 参数设置为所需的 I/O Line。
  2. 设置 LineTermination acquisition mode true 以启用端接电阻。默认情况下,该参数设置为 false,即禁用 Line Termination。

示例代码#

// Select Line 1
camera.LineSelector.SetValue(LineSelector_Line1);
// Enable the line termination for the I/O line selected
camera.BslLineTermination.SetValue(true);
// Disable the line termination for the I/O line selected
camera.BslLineTermination.SetValue(false);
INodeMap& nodemap = camera.GetNodeMap();
// Select Line 1
CEnumParameter(nodemap, "LineSelector").SetValue("Line1");
// Enable the line termination for the I/O line selected
CBooleanParameter(nodemap, "BslLineTermination").SetValue(true);
// Disable the line termination for the I/O line selected
CBooleanParameter(nodemap, "BslLineTermination").SetValue(false);
// Select Line 1
camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line1);
// Enable the line termination for the I/O line selected
camera.Parameters[PLCamera.BslLineTermination].SetValue(true);
// Disable the line termination for the I/O line selected
camera.Parameters[PLCamera.BslLineTermination].SetValue(false);
/* 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 */
/* Select Line 1 */
errRes = PylonDeviceFeatureFromString(hdev, "LineSelector", "Line1");
CHECK(errRes);
/* Enable the line termination for the I/O line selected */
errRes = PylonDeviceSetBooleanFeature(hdev, "BslLineTermination", 1);
CHECK(errRes);
/* Disable the line termination for the I/O line selected */
errRes = PylonDeviceSetBooleanFeature(hdev, "BslLineTermination", 0);
CHECK(errRes);

您也可以使用 pylon Viewer 轻松设置参数。