AW00136902000
I/O Control
Basler dart BCON
55
You can set the LineSelector and the LineInverter parameter value from within your application
software by using the pylon API. The following code snippet illustrates using the API to set the
selector and the parameter value:
// Enable the line inverter on output line Line 1
camera.LineSelector.SetValue(LineSelector_Line1);
camera.LineInverter.SetValue(true);
8.3
Checking the Status of the I/O Lines
8.3.1
Checking the Status of an I/O Line
You can determine the current status of any input or output line. The status depends on whether an
electrical signal is present to the line and whether the line inverter is enabled.
1. Use the LineSelector parameter to select, for example, input line CC0.
2. Read the value of the LineStatus parameter to determine the current status of the line. A value
of true means the line’s status is currently high and a value of false means the line’s status is
currently low.
You can set the LineSelector and read the LineStatus parameter value from within your application
software by using the Basler pylon API. The following code snippet illustrates using the API to set
the selector and read the parameter value:
// Select input line CC0 and read the status
camera.LineSelector.SetValue(LineSelector_CC0);
bool b = camera.LineStatus.GetValue();
// Select BCON output line 1 line and read the status
camera.LineSelector.SetValue(LineSelector_Line1);
bool b = camera.LineStatus.GetValue();
8.3.2
Checking the Status of All Lines
Reading the LineStatusAll parameter value allows you to check the current status of all input and
output lines.
The Line Status All parameter is a 32-bit value. As shown in
, certain bits in the value are
associated with each I/O line, and each of these bits will indicate the state of the associated line.
If a bit is 0, it indicates that the state of the associated line is currently low. If a bit is 1, it indicates
that the state of the associated line is currently high.
To check the status of an I/O line: