Skip to content

Line Selector#

The Line Selector camera feature allows you to select the I/O line that you want to configure.

Using the Feature#

Selecting a Line#

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

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. To find out what your camera model offers, check the "Physical Interface" section in your camera topic. You can find your camera topic in the "Models" section.

Possible tasks depend on whether the I/O line serves as input or output.

Once you have selected a line, you can do the following:

Task Feature
Configuring input filtering for an input line Input Filter (if available)
Configuring the debouncer for an input line Line Debouncer (if available)
Selecting the source signal for an output line Line Source
Setting the minimum pulse width for an output line Line Minimum Output Pulse Width
Setting the line status of a user settable output line User Output Value
Setting the line mode of a GPIO line Line Mode
Enabling the invert function Line Inverter
Checking the status of a single I/O line Line Status

Sample Code#

// Select input line 1
INodeMap& nodemap = camera.GetNodeMap();
// Select input line 1
CEnumParameter(nodemap, "LineSelector").SetValue("Line1");
// Select input line 1
/* 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");
# Select input line 1
camera.LineSelector.Value = "Line1"

You can also use the pylon Viewer to easily set the parameters.