FG Camera Library  1.7.2.0 (2025-09-18)
Loading...
Searching...
No Matches
VisionSensor PV / PV2

The VisionSensor PV / PV2 is a compact programmable Linux camera based on a single-core ARM Cortex-A9 SoC (armhf architecture). Unlike the VisionCam, it does not provide a "Real Time Communication Controller" (RTCC). Sensor trigger and the integrated LED are controlled by this libraray, while the digital I/Os are controlled by the VisionBox Interface Library.

Take a look at the Sensors page for information about available sensors for each platform.

Trigger Modes

The function FG_set_trigger_mode() is used to configure one of the trigger modes:

  • Free-run
  • Software triggered
  • Hardware triggered

Example:

// Enable hardware trigger
@ FG_TRIGGER_MODE_HARDWARE
Hardware triggered mode.
Definition FG_CameraInterface.h:166
UINT32 DLL_FG_API FG_set_trigger_mode(enum eFG_TRIGGER_MODE trigger_mode)
Sets the trigger mode.
Definition FG_CameraInterface.cpp:849

Hardware trigger

The VisionSensor PV / PV2 uses a fixed connection from digital input IN0 to the sensor in hardware triggered mode. Therefore, no additional initialization code is necessary. The rising edge will be used.

Note
  • The default settings after initialization is software trigger mode.
  • The debounce setting for the digital inputs will also be applied for the trigger signal in hardware triggered mode. See VIB::DigitalInput::ConfigureDebounceTime() for adjustment of the debouncing time.

Controlling the integrated LED and exposure signal output

The operating mode of the integrated LED unit and the exposure output signal can be controlled by software or by a physical mode switch:

  • If the integrated LED is enabled, the LED turns on during the integration period of the sensor. The image brightness can only be changed by adjusting the integration time with FG_set_shutter_time().
  • The exposure signal of the sensor can be mirrored to a digital OUT wire. This allows synchronization of an external lighting unit. The output signal can be selected with the special feature StrobeOutput.

The position of the physical switch is used for mode selection unless it's overwritten by software. For software mode control, use the special feature StrobeMode. The value for this parameter is equal to the switch position for modes 0...2:

Strobe modes
Switch positionSoftware control
(StrobeMode)
Integrated LEDDigital output OUT<i>
0 0 EnabledControlled by VIB::DigitalOutput
1 1 OffSensor exposure signal
2 2 OffControlled by VIB::DigitalOutput
-3 EnabledSensor exposure signal
--1 Controlled by switch
Note
The mode switch is not present on most devices and is therefore only controlled by software.
Special features for strobe
Property nameDescriptionLibrary
StrobeModeSets the operating mode for the integrated LED and the exposure signal for replacing the physical mode switch.
-1...3: strobe mode (default: 2 if no switch is present)
Note
This feature requires PRU firmware ≥ 1.1.0.0.
≥ 1.2.0.0
StrobeOutputSelects the digital output line for the external exposure signal.
0...<i>: index of digital output signal OUT<i> (default: 0)
Note
This feature requires PRU firmware ≥ 1.3.0.0.
≥ 1.2.3.0

Example:

// Enable the integrated LED and exposure signal on digital output:
FG_set_special_option("StrobeMode", 3);
// Select output OUT1 for the exposure signal:
FG_set_special_option("StrobeOutput", 1);
UINT32 DLL_FG_API FG_set_special_option(const char *option, INT64 arg)
Configures a special camera property.
Definition FG_CameraInterface.cpp:972
Note
The maximum LED strobe time gets automatically limited to a duty cycle of 25% for protection of the hardware. For example: when using a frame rate of 60 fps, the LED strobe time will be dynamically limited to 4.17 ms if the exposure time setting is longer. The external strobe signal on digital outputs will not be limited.