Setting A Gpio Line For Input Or Output - Basler acA2040-55 User Manual

Basler ace
Table of Contents

Advertisement

AW00123409000
5.9.2

Setting a GPIO Line for Input or Output

You can set a GPIO line to operate as an input or output line. To set the mode of operation, you
must set the line mode for the GPIO line.
Setting a GPIO Line for Input or Output
To set a GPIO line for input or output using Basler pylon:
1. Set the LineSelector parameter to select the GPIO line that you want to configure.
2. Set the LineMode parameter as desired to Input or Output.
You can set the LineSelector and LineMode parameter values from within your application software
by using the Basler pylon API. The following code snippet illustrates using the API to select a GPIO
line and to set the LineMode parameter value. As an example, the code snippet assumes that you
want to select Line 3 and set it to Input:
// Select GPIO line Line 3
camera.LineSelector.SetValue(LineSelector_Line3).
// Set the line mode for the selected GPIO line
camera.LineMode.SetValue(LineMode_Input);
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
Basler ace USB 3.0
Physical Interface
page
61.
79

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Aca2440-35Aca2040-120Aca2440-75

Table of Contents