跳转到内容

Line Termination#

The Line Termination camera feature allows you to enable a termination resistor at the end of the camera's differential transmission line.

The camera's GPIO lines are designed to transmit RS-422 differential signals. Enabling a 120 Ω resistor at the end of the transmission line avoids signal reflections and ensures signal integrity.

信息

For detailed information about the camera's I/O circuitry, see the I/O Control of racer 2 L Cameras topic.

该功能的使用#

Enabling the Line Termination#

  1. 设置 LineSelector parameter to the desired I/O line.
  2. 设置 LineTermination parameter to true to enable the termination resistor. By default, the parameter is set to false, i.e., line termination is disabled.

示例代码#

// 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 轻松设置参数。