跳转到内容
STAGING SERVER
DEVELOPMENT SERVER

Line Selector#

相机的 Line Selector 功能允许您选择要配置的 I/O 线路。

该功能的使用#

选择一条线路#

To select a line, set the LineSelector parameter to the desired I/O line, e.g., Line1 or LinkSignal1.

Depending on the camera model, the total number of I/O lines, the format of the lines (opto-coupled or GPIO), and the pin assignment may vary. For some camera models, you can also configure I/O link signals (i.e. virtual I/O signals). To find out what your camera model offers, check the "General Specifiations" table and "Physical Interface" section in your camera topic. You can find your camera topic in the "Models" section.

可能的任务取决于 I/O 线路用作输入还是输出

选择一条线路后,可以执行以下操作:

任务 功能
Configuring input filtering for an input line Input Filter (if available)
为输入线路配置消抖 Line Debouncer (if available)
选择输出线路的源信号 Line Source
设置输出线路的最小脉宽 Line Minimum Output Pulse Width
设置用户可设置输出线路的线路状态 User Output Value
设置 GPIO 线路的线路模式 Line Mode
启用反转功能 Line Inverter
检查单条 I/O 线路的状态 Line Status

示例代码#

// Select input line 1
camera.LineSelector.SetValue(LineSelector_Line1);
INodeMap& nodemap = camera.GetNodeMap();
// Select input line 1
CEnumParameter(nodemap, "LineSelector").SetValue("Line1");
// Select input line 1
camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line1);
/* 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 input line 1 */
errRes = PylonDeviceFeatureFromString(hdev, "LineSelector", "Line1");
CHECK(errRes);
# Select input line 1
camera.LineSelector.Value = "Line1"

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