Line Termination#
相机的 GPIO 线路旨在传输 RS-422 差分信号。在传输线末端启用 120 Ω 电阻可避免信号反射并确保信号完整性。
信息
有关相机 I/O 电路的详细信息,请参阅 I/O Control of racer 2 L and racer 2 XL Cameras 主题。
该功能的使用#
启用 Line Termination#
- 设置
LineSelector参数设置为所需的 I/O Line。 - 设置
LineTerminationacquisition modetrue以启用端接电阻。默认情况下,该参数设置为false,即禁用 Line Termination。
示例代码#
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 轻松设置参数。