To determine the status of all I/O lines in a single operation, use the Line Status All feature.
In this topic Hide
To determine the status of an I/O line:
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.
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.
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.
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.
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.
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 |
|
All ace 2 USB 3.0 camera models |
|
All ace GigE camera models |
|
All ace USB 3.0 camera models |
|
All boost CXP-12 camera models |
|
All dart BCON for LVDS camera models |
|
All dart BCON for MIPI camera models | Line Status feature not supported |
All dart USB 3.0 camera models |
|
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.
// 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.