MATRIX VISION - mvBlueCOUGAR-X/-XD Technical Documentation
Generating very long exposure times

Basics

At the moment the exposure time is limited to a maximum of 1 up to 20 seconds depending on certain internal sensor register restrictions. So each device might report a different maximum exposure time.

Since
Firmware version 2.28.0

Firmware version 2.28 did contain a major overhaul here so updating to at least this version can result in a much higher maximum exposure time. However, current sensor controllers can be configured to use even longer exposure times if needed using one of the devices timers to create an external exposure signal that can be fed back into the sensor. This use case will explain how this can be done.

This approach of setting up long exposure times requires the sensor of the camera to allow the configuration of an external signal to define the length of the exposure time, so only devices offering the ExposureMode TriggerWidth can be used for this setup.

Note
The maximum exposure time in microseconds that can be achieved in this configuration is the maximum value offered by the timer used.

With GenICam compliant devices that support all the needed features the setup is roughly like this:

  1. Select "Setting -> Base -> Camera -> GenICam -> Counter And Timer Control -> Timer Selector -> Timer 1" and .
  2. set "Timer Trigger Source" = "UserOutput0".
  3. set "Timer Trigger Activation" = "RisingEdge".
    I.e. a rising edge on UserOutput0 will start Timer1.
  4. Then set the "Timer Duration" property to the desired exposure time in us.
  5. In "Setting -> Base -> Camera -> GenICam -> Acquisition Control" set the Trigger Selector = "FrameStart".
    I.e. the acquisition of one frame will start when
  6. Timer1 is active: "Trigger Source" = "Timer1Active".
  7. Exposure time will be the trigger width: "Exposure Mode" = "TriggerWidth".

The following diagram illustrates all the signals involved in this configuration:

Figure 1: Long exposure times using GenICam

To start the acquisition of one frame a rising edge must be detected on UserOutput0 in this example but other configurations are possible as well.

Setting up the device

The easiest way to define a long exposure time would be by using a single timer. The length of the timer active signal is then used as trigger signal and the sensor is configured to expose while the trigger signal is active. This allows to define exposure time with micro-second precision up the the maximum value of the timer register. With a 32 bit timer register this results in a maximum exposure time of roughly 4295 seconds (so roughly 71.5 minutes). When writing code e.g. in C# this could look like this:

private static void configureDevice(Device pDev, int exposureSec, GenICam.DigitalIOControl ioc)
{
  try
  {
    // establish access to the CounterAndTimerControl interface
    GenICam.CounterAndTimerControl ctc = new mv.impact.acquire.GenICam.CounterAndTimerControl(pDev);
    // set TimerSelector to Timer1 and TimerTriggerSource to UserOutput0
    ctc.timerSelector.writeS("Timer1");
    ctc.timerTriggerSource.writeS("UserOutput0");
    ctc.timerTriggerActivation.writeS("RisingEdge");

    // Set timer duration for Timer1 to value from user input
    ctc.timerDuration.write(exposureSec * 1000000);

    // set userOutputSelector to UserOutput0 and set UserOutput0 to inactive. 
    // We will later generate a pulse here to initiate the exposure
    ioc.userOutputSelector.writeS("UserOutput0");
    ioc.userOutputValue.write(TBoolean.bFalse);

    // establish access to the AcquisitionCotrol interface
    GenICam.AcquisitionControl ac = new mv.impact.acquire.GenICam.AcquisitionControl(pDev);
    // set TriggerSelector to FrameStart and try to set ExposureMode to TriggerWidth
    ac.triggerSelector.writeS("FrameStart");
    // set TriggerSource for FrameStart to Timer1Active and activate TriggerMode
    ac.triggerSource.writeS("Timer1Active");
    ac.triggerMode.writeS("On");

    // expose as long as we have a high level from Timer1
    ac.exposureMode.writeS("TriggerWidth");
  }
  catch (Exception e)
  {
    Console.WriteLine("ERROR: Selected device does not support all features needed for 
    this long time exposure approach: {0}, terminating...", e.Message);
    System.Environment.Exit(1);
  }
}
Note
Make sure that you adjust the ImageRequestTimeout_ms either to 0 (infinite)(this is the default value) or to a reasonable value that is larger than the actual exposure time in order not to end up with timeouts resulting from the buffer timeout being smaller than the actual time needed for exposing, transferring and capturing the image:
ImageRequestTimeout_ms = 0 # or reasonable value
See also
Counter And Timer Control
Digital I/O Control
Acquisition Control