AW00123402000 Physical Interface
Basler ace USB 3.0 81
The following example illustrates checking the status of output line Line 2.
1. Use the Line Selector parameter to select, for example, output line Line 2.
2. Read the value of the Line Status 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 Line Selector and read the Line Status 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 output line Line 2 and read the status
camera.LineSelector.SetValue(LineSelector_Line2);
bool b = camera.LineStatus.GetValue();
You can also use the Basler pylon Viewer application to easily set the parameters.
For more information about the pylon API and the pylon Viewer, see Section 3.1 on page 37.
5.13.2 Checking the Status of All Lines
The LineStatusAll parameter value is reported in bits 0 through 3 of a 32-bit word. The parameter
value indicates the line status of all I/O lines: As shown in Figure 43, each bit in the value is
associated with one I/O line and the bits will indicate the status of the lines. If a bit is 0, it indicates
that the line status of the associated line is currently low. If a bit is 1, it indicates that the line status
of the associated line is currently high.
Fig. 43: Bit Field of the LineStatusAll Parameter: Bit Numbers and Assignment of Lines
See Section 5.13.1 on page 79 for details about the relation between line status, electrical signal
level, and line inverter setting.
To check the status of an I/O line: