Line Status

The Line Status camera feature allows you to determine the status of an I/O line (high or low).

To determine the status of all I/O lines in a single operation, use the Line Status All feature.

In this topic Hide

Using the Feature

Determining the Status of an I/O Line

To determine the status of an I/O line:

  1. Set the LineSelector parameter to the desired I/O line.
  2. Get the value of the LineStatus parameter.
    This parameter is read-only.

A value of false (0) means that the line's status was low at the time of polling.

A value of true (1) means the line's status was high at the time of polling.

If the Line Inverter feature is enabled, the camera inverts the LineStatus parameter value. A true parameter value changes to false, and vice versa.

Line Status and I/O Status

GPIO Line Configured as Input

If your camera has a GPIO line and that line is configured as input, the relation between its input status and the LineStatus parameter is as follows:

Input Status LineStatus Parameter Value
Input open (not connected) True
Voltage level low False
Voltage level high True

This means that the line logic is positive.

GPIO Line Configured as Output

If your camera has a GPIO line and that line is configured as output, the relation between its output status and the LineStatus parameter depends on your camera model.

Opto-Coupled Input Line

If your camera has an opto-coupled input line, the relation between its input status and the LineStatus parameter is as follows:

Input Status LineStatus Parameter Value
Input open (not connected) False
Voltage level low False
Voltage level high True

This means that the line logic is positive.

Opto-Coupled Output Line

If your camera has an opto-coupled output line, the relation between its output status and the LineStatus parameter is as follows:

Output Status LineStatus Parameter Value Electrical Status
0 (e.g., User Output Value set to false or Flash Window signal low) True Voltage level higha
1 (e.g., User Output Value set to true or Flash Window signal high) False Voltage level low

aAn external pull-up resistor must be installed. Otherwise, the voltage level will be undefined.

This means that the line logic is negative.

Specifics

For information about the line status on GPIO lines configured as input and on opto-coupled I/O lines, see the tables above.

GPIO Line Configured as Output

Camera Model Output Status Relation
All ace 2 GigE camera models
  • Output status 0 (e.g.  User Output Value set to false or Flash Window signal low) = LineStatus false = voltage level lowb

  • Output status 1 = LineStatus true = voltage level high

All ace 2 USB 3.0 camera models
  • Output status 0 (e.g.  User Output Value set to false or Flash Window signal low) = LineStatus false = voltage level lowb

  • Output status 1 = LineStatus true = voltage level high

All ace GigE camera models
  • Output status 0 (e.g.  User Output Value set to false or Flash Window signal low) = LineStatus true = voltage level higha
  • Output status 1 = LineStatus false = voltage level low
All ace USB 3.0 camera models
  • Output status 0 (e.g.  User Output Value set to false or Flash Window signal low) = LineStatus true = voltage level higha

  • Output status 1 = LineStatus false = voltage level low

All boost CXP-12 camera models
  • Output status 0 (e.g.  User Output Value set to false or Flash Window signal low) = LineStatus false = voltage level lowb

  • Output status 1 = LineStatus true = voltage level high

All dart BCON for LVDS camera models
  • Output status 0 (e.g.  User Output Value set to false or Flash Window signal low) = LineStatus false = voltage level lowb

  • Output status 1 = LineStatus true = voltage level high

All dart BCON for MIPI camera models Line Status feature not supported
All dart USB 3.0 camera models
  • Output status 0 (e.g.  User Output Value set to false or Flash Window signal low) = LineStatus false = voltage level lowb

  • Output status 1 = LineStatus true = voltage level high

All pulse USB 3.0 camera models Line Status feature not supported

aThis means that the line logic is negative.

bThis means that the line logic is positive. However, the LineLogic parameter is not available for this camera model.

 

Sample Code

// Select a line
camera.LineSelector.SetValue(LineSelector_Line1);
// Get the status of the line
bool status = camera.LineStatus.GetValue();
INodeMap& nodemap = camera.GetNodeMap();
// Select a line
CEnumerationPtr(nodemap.GetNode("LineSelector"))->FromString("Line1");
// Get the status of the line
bool status = CBooleanPtr(nodemap.GetNode("LineStatus"))->GetValue();
// Select a line
camera.Parameters[PLCamera.LineSelector].SetValue(PLCamera.LineSelector.Line1);
// Get the status of the line
bool status = camera.Parameters[PLCamera.LineStatus].GetValue();
// Select a line
Pylon.DeviceFeatureFromString(hdev, "LineSelector", "Line1");
// Get the status of the line
bool status = Pylon.DeviceGetBooleanFeature(hdev, "LineStatus");
/* 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 */
_Bool status = false;
/* Select a line */
errRes = PylonDeviceFeatureFromString(hdev, "LineSelector", "Line1");
CHECK(errRes);
/* Get the status of the line */
errRes = PylonDeviceGetBooleanFeature(hdev, "LineStatus", &status);
CHECK(errRes);

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