Skip to content

Image Acquisition and I/O Control#

Basler blaze cameras are equipped with two fast, opto-coupled I/O lines.

The input line allows you to control the camera, e.g., to trigger image capture at particular points in time. The output line allows you to retrieve information about the camera, e.g., when an image capture is in progress.

Opto-Coupled I/O Lines#

blaze cameras provide one opto-coupled input line and one opto-coupled output line:

  • Line0 is preconfigured as the input line of the camera.
  • Line1 is preconfigured as the output line of the camera.

You can't change the line mode of the I/O lines.

Opto-Coupled Input Line#

The following diagram shows a typical circuit using the opto-coupled input line:

Input Line Diagram

The input line is connected to pin 6. Pin 5 is connected to ground.

Opto-Coupled Output Line#

The following diagram shows a typical circuit using the opto-coupled output line:

Output Line Diagram

The output line is connected to pin 4. Pin 5 is connected to ground.

Electrical Requirements#

Input Line#

Voltage Description
30 VDC Absolute maximum voltage.
This voltage must never be exceeded. Doing so may damage the camera and voids the warranty.
0–24 VDC Safe operating range
0–1.4 VDC Logical 0
>2.2 VDC Logical 1
  • Minimum current: 5 mA
  • Typical current: 5–15 mA
Response Times#
  • Typical response time (trigger to FrameActive): <300 µs
  • Maximum response time (trigger to FrameActive): 500 µs

Debouncing of the signal is not implemented. Therefore, you have to ensure that the electrical signal on the input line is clean (e.g., by using a PLC output or applying a low-pass filter).

Output Line#

Voltage Description
30 VDC Absolute maximum voltage
3.3–24 VDC Safe operating range
  • Maximum current: 50 mA
  • Leakage current: <60 µA

I/O Cable#

Basler recommends using the Power-I/O Cable M12, M, 8P/Open. The cable documentation includes the pinout and color coding for the I/O lines.

Features and Configuration#

The DigitalIOControl feature category contains various features for configuring and monitoring I/O line operation.

Line Selector#

The Line Selector feature allows you to select the I/O line that you want to configure. To select a line, set the LineSelector parameter to the desired I/O line, e.g., Line1.

Line Status#

To determine the status of an I/O line:

  1. Set the LineSelector parameter to Line0 for the input line or Line1 for the output line.
  2. Get the value of the LineStatus parameter.

A value of false (0) means that the line status was low at the time of polling. A value of true (1) means that the line status was high at the time of polling.

Line Logic#

To determine the logic of an I/O line:

  1. Set the LineSelector parameter to Line0 for the input line or Line1 for the output line.
  2. Get the value of the LineLogic parameter.
    This parameter is read-only.

Line Source (Output Line Only)#

The output line Line1 can be configured to provide different signals via the LineSource parameter. This allows you to monitor the status of the camera or to control external devices.

To configure the line source:

  1. Set the LineSelector parameter to Line1.
  2. Set the LineSource parameter to one of the following values:
    • Off: The line is always low.
    • UserOutput0: The line is set to the value of the UserOutputValue parameter of UserOutput0.
    • FrameActive: The signal is high while the camera is acquiring all the subframes needed for a depth map.
    • FrameTriggerWait: The signal is high when the camera is ready to receive trigger signals of the corresponding trigger type.

You can use the FrameActive signal to monitor whether the camera is currently exposing. The signal goes high when image acquisition of the first subframe starts and goes low when acquisition of the last subframe ends. This also allows you to use the FrameActive signal to synchronize multiple cameras and external devices.

In addition, you can use the FrameTriggerWait signal to find the right moment for triggering your flash if you're using one.

The following drawing illustrates the timing.

Line Source Example

Example: If an object on a conveyor belt is moved into the camera's field of view for inspection, the conveyor belt should not move while the FrameActive signal is high to avoid motion artifacts.

For more information and alternative methods for multi-camera operation, see Working with Multiple Cameras.

Line Inverter#

The LineInverter parameter inverts the electrical signal level of an I/O line, i.e., its line status from high to low or vice versa.

To enable the line inverter:

  1. Set the LineSelector parameter to the desired I/O line.
  2. Set the LineInverter parameter to true to invert the electrical signal level of the I/O line selected or to false to disable inversion.

Example: If the input line Line0 is configured as a trigger input source, inverting the signal level means that the trigger will come at the falling edge of the trigger signal instead of on the rising edge.

For the output line Line1, the level of the selected output signal is inverted.

User Output#

The UserOutput parameter allows you to manually control the status of the output line. Only a single user output is available.

To set the user output status:

  1. Set the LineSelector parameter to Line1.
  2. Set the LineSource parameter to UserOutput0.
  3. Set the UserOutputSelector parameter to UserOutput0.
  4. Set the UserOutputValue parameter to the desired value:
    • true: Line status is high (1).
    • false: Line status is low (0).

Changes of the UserOutputValue parameter will be visible immediately on the output line.

Free Run and Trigger Operation#

The camera can be operated in free run and in triggered mode.

In free run, the camera is triggered internally according to the frame rate configured (default value or as specified via the AcquisitionFrameRate parameter).

While in free run mode, you can synchronize the triggering of multiple cameras using the Precision Time Protocol and the Synchronous Free Run feature.

In triggered mode, an external trigger source is used to trigger the camera, e.g., via software trigger or via hardware trigger (using input line Line0).

The trigger is always a FrameTrigger, i.e., it triggers the acquisition of a single frame in the current operating mode.

Free Run Image Acquisition#

To enable free run image acquisition:

  1. Set the TriggerSelector parameter to FrameStart.
  2. Set the TriggerMode parameter to Off.

Triggered Image Acquisition#

Info

New trigger signals are ignored until the camera is ready for triggering again. The minimum time between two trigger signals depends on the operating mode of the camera (i.e., the maximum allowed frame rate), the characteristics of the I/O signal, and the processing time required for processing the I/O signal. You can use the FrameTriggerWait signal to find out when the camera is ready to receive trigger signals.

When the camera detects an overtrigger, the LastError parameter will show error code 1.

Software Trigger#

To enable image acquisition via software trigger:

  1. Set the TriggerSelector parameter to FrameStart.
  2. Set the TriggerSource parameter to Software.
  3. Set the TriggerMode parameter to On.
  4. Trigger a single frame with TriggerSoftware.
    A single depth map is now grabbed, processed, and delivered to the client software.

Make sure that the acquisition is started before the software trigger to receive images.

Hardware Trigger#

To enable image acquisition via hardware trigger:

  1. Set the TriggerSelector parameter to FrameStart.
  2. Set the TriggerSource parameter to Line0.
  3. Set the TriggerMode parameter to On.
    Images are triggered on the rising edge of Line0 (if the LineInverter parameter is set to false) or the falling edge (if the LineInverter parameter is true). The image is sent to the host computer after it has been grabbed and processed by the camera.

Make sure that the acquisition is started before the hardware trigger to receive images.