Skip to content

Acquisition Mode#

The Acquisition Mode camera feature allows you to choose between single frame or continuous image acquisition.

Info

  • This feature is not available via the pylon Viewer feature tree. Instead, the acquisition mode is set automatically when you use the Single Shot and Continuous Shot buttons in the toolbar of the pylon Viewer.
  • The pylon C++ API and the pylon .NET API provide configuration event handlers that set the AcquisitionMode parameter automatically. Basler recommends using these event handlers.

For more information, see the Grab (C++) and Grab (.NET) code samples in the pylon API Documentation.

Using the Feature#

Specifying the Acquisition Mode#

To specify the acquisition mode, set the AcquisitionMode parameter to one of the following values:

  • SingleFrame: Enables the Single Frame acquisition mode.
  • Continuous: Enables the Continuous acquisition mode.

Available Acquisition Modes#

Single Frame Acquisition Mode#

In Single Frame acquisition mode, the camera will acquire exactly one image.

After the Acquisition Start command has been executed, the camera waits for trigger signals. Trigger signals can either be generated internally by the camera (free run) or applied externally (triggered image acquisition).

Info

To check whether the camera is waiting for trigger signals, monitor the camera's Trigger Wait signals or use the Acquisition Status feature, if available.

When a Frame Start trigger signal has been received and an image has been acquired, the camera switches off image acquisition. To acquire another image, you must execute the Acquisition Start command again.

Continuous Acquisition Mode#

In Continuous acquisition mode, the camera continuously acquires and transfers images until acquisition is switched off.

After the Acquisition Start command has been executed, the camera waits for trigger signals. Trigger signals can either be generated internally by the camera (free run image acquisition) or applied externally (triggered image acquisition). The camera will continue acquiring images until an Acquisition Stop command is executed.

Sample Code#

// Configure single frame acquisition on the camera
camera.AcquisitionMode.SetValue(AcquisitionMode_SingleFrame);
// Switch on image acquisition
camera.AcquisitionStart.Execute();
// The camera waits for a trigger signal.
// When a Frame Start trigger signal has been received,
// the camera executes an Acquisition Stop command internally.
// Configure continuous image acquisition on the camera
camera.AcquisitionMode.SetValue(AcquisitionMode_Continuous);
// Switch on image acquisition
camera.AcquisitionStart.Execute();
// The camera waits for trigger signals.
// (...)
// Switch off image acquisition
camera.AcquisitionStop.Execute();
INodeMap& nodemap = camera.GetNodeMap();
// Configure single frame acquisition on the camera
CEnumParameter(nodemap, "AcquisitionMode").SetValue("SingleFrame");
// Switch on image acquisition
CCommandParameter(nodemap, "AcquisitionStart").Execute();
// The camera waits for a trigger signal.
// When a Frame Start trigger signal has been received,
// the camera executes an Acquisition Stop command internally.
// Configure continuous image acquisition on the camera
CEnumParameter(nodemap, "AcquisitionMode").SetValue("Continuous");
// Switch on image acquisition
CCommandParameter(nodemap, "AcquisitionStart").Execute();
// The camera waits for trigger signals.
// (...)
// Switch off image acquisition
CCommandParameter(nodemap, "AcquisitionStop").Execute();
// Configure single frame acquisition on the camera
camera.Parameters[PLCamera.AcquisitionMode].SetValue(PLCamera.AcquisitionMode.SingleFrame);
// Switch on image acquisition
camera.Parameters[PLCamera.AcquisitionStart].Execute();
// The camera waits for a trigger signal.
// When a Frame Start trigger signal has been received,
// the camera executes an Acquisition Stop command internally.
// Configure continuous image acquisition on the camera
camera.Parameters[PLCamera.AcquisitionMode].SetValue(PLCamera.AcquisitionMode.Continuous);
// Switch on image acquisition
camera.Parameters[PLCamera.AcquisitionStart].Execute();
// The camera waits for trigger signals.
// (...)
// Switch off image acquisition
camera.Parameters[PLCamera.AcquisitionStop].Execute();
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK;  /* Return value of pylon methods */
/* Configure single frame acquisition on the camera */
errRes = PylonDeviceFeatureFromString(hdev, "AcquisitionMode", "SingleFrame");
CHECK(errRes);
/* Switch on image acquisition */
errRes = PylonDeviceExecuteCommandFeature(hdev, "AcquisitionStart");
CHECK(errRes);
/* The camera waits for a trigger signal. */
/* When a Frame Start trigger signal has been received, */
/* the camera executes an Acquisition Stop command internally. */
/* Configure continuous image acquisition on the camera */
errRes = PylonDeviceFeatureFromString(hdev, "AcquisitionMode", "Continuous");
CHECK(errRes);
/* Switch on image acquisition */
errRes = PylonDeviceExecuteCommandFeature(hdev, "AcquisitionStart");
CHECK(errRes);
/* The camera waits for trigger signals. */
/* (...) */
/* Switch off image acquisition */
errRes = PylonDeviceExecuteCommandFeature(hdev, "AcquisitionStop");
CHECK(errRes);
# Configure single frame acquisition on the camera
camera.AcquisitionMode.Value = "SingleFrame"
# Switch on image acquisition
camera.AcquisitionStart.Execute()
# The camera waits for a trigger signal.
# When a Frame Start trigger signal has been received,
# the camera executes an Acquisition Stop command internally.
# Configure continuous image acquisition on the camera
camera.AcquisitionMode.Value = "Continuous"
# Switch on image acquisition
camera.AcquisitionStart.Execute()
# The camera waits for trigger signals.
# (...)
# Switch off image acquisition
camera.AcquisitionStop.Execute()

You can also use the pylon Viewer to easily set the parameters.