User`s manual
AW00098504000 I/O Control
Basler ace Camera Link 57
6.2.4 Setting the State of a User Settable Output Line
As mentioned in the previous section, the GPIO line (assuming it is set as an output) or the CL
Spare line can each be designated as "user settable". If you have designated a line as user
settable, you can use camera parameters to set the state of the line.
Setting the State Using Basler Pylon
To set the state of a user settable output line:
Use the User Output Selector to select the GPIO line or the CL Spare line.
Set the value of the User Output Value parameter to true (1) or false (0). This will set the state
of the output line.
You can set the Output Selector and the User Output Value parameter from within your application
software by using the Basler pylon API. The following code snippet illustrates using the API to
designate a line as user settable and to set the state of the line:
// Set the GPIO line to be user settable
Camera.LineSelector.SetValue( LineSelector_Line1 );
Camera.LineSource.SetValue( LineSource_UserOutput );
// Select the user settable line and set the state
Camera.UserOutputSelector.SetValue( UserOutputSelector_UserOutputLine1 );
Camera.UserOutputValue.SetValue( true );
bool currentUserOutput1State = Camera.UserOutputValue.GetValue( );
// Set the CL Spare line to be user settable
Camera.LineSelector.SetValue( LineSelector_ClSpare );
Camera.LineSource.SetValue( LineSource_UserOutput );
// Select the user settable line and set the state
Camera.UserOutputSelector.SetValue( UserOutputSelector_UserOutputClSpare );
Camera.UserOutputValue.SetValue( false );
bool currentUserOutput1State = Camera.UserOutputValue.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 19.
If you have the invert function enabled on the output line and the line is
designated as user settable, the user setting sets the state of the line before the
inverter.