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" code samples in the C++ Programmer's Guide and Reference Documentation and the pylon .NET Programmer's Guide & Reference Documentation delivered with the Basler pylon Camera Software Suite.

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.

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
CEnumerationPtr(nodemap.GetNode("AcquisitionMode"))->FromString("SingleFrame");
// Switch on image acquisition
CCommandPtr(nodemap.GetNode("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
CEnumerationPtr(nodemap.GetNode("AcquisitionMode"))->FromString("Continuous");
// Switch on image acquisition
CCommandPtr(nodemap.GetNode("AcquisitionStart"))->Execute();
// The camera waits for trigger signals.
// (...)
// Switch off image acquisition
CCommandPtr(nodemap.GetNode("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();
// Configure single frame acquisition on the camera
Pylon.DeviceFeatureFromString(hdev, "AcquisitionMode", "SingleFrame");
// Switch on image acquisition
Pylon.DeviceExecuteCommandFeature(hdev, "AcquisitionStart");
// 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
Pylon.DeviceFeatureFromString(hdev, "AcquisitionMode", "Continuous");
// Switch on image acquisition
Pylon.DeviceExecuteCommandFeature(hdev, "AcquisitionStart");
// The camera waits for trigger signals.
// (...)
// Switch off image acquisition
Pylon.DeviceExecuteCommandFeature(hdev, "AcquisitionStop");
/* 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);

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