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.
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 or a Line Start trigger signal have 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.
// Configure single frame acquisition on the cameracamera.AcquisitionMode.SetValue(AcquisitionMode_SingleFrame);// Switch on image acquisitioncamera.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 cameracamera.AcquisitionMode.SetValue(AcquisitionMode_Continuous);// Switch on image acquisitioncamera.AcquisitionStart.Execute();// The camera waits for trigger signals.// (...)// Switch off image acquisitioncamera.AcquisitionStop.Execute();
INodeMap&nodemap=camera.GetNodeMap();// Configure single frame acquisition on the cameraCEnumParameter(nodemap,"AcquisitionMode").SetValue("SingleFrame");// Switch on image acquisitionCCommandParameter(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 cameraCEnumParameter(nodemap,"AcquisitionMode").SetValue("Continuous");// Switch on image acquisitionCCommandParameter(nodemap,"AcquisitionStart").Execute();// The camera waits for trigger signals.// (...)// Switch off image acquisitionCCommandParameter(nodemap,"AcquisitionStop").Execute();
// Configure single frame acquisition on the cameracamera.Parameters[PLCamera.AcquisitionMode].SetValue(PLCamera.AcquisitionMode.SingleFrame);// Switch on image acquisitioncamera.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 cameracamera.Parameters[PLCamera.AcquisitionMode].SetValue(PLCamera.AcquisitionMode.Continuous);// Switch on image acquisitioncamera.Parameters[PLCamera.AcquisitionStart].Execute();// The camera waits for trigger signals.// (...)// Switch off image acquisitioncamera.Parameters[PLCamera.AcquisitionStop].Execute();
/* Macro to check for errors */#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)GENAPIC_RESULTerrRes=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 cameracamera.AcquisitionMode.Value="SingleFrame"# Switch on image acquisitioncamera.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 cameracamera.AcquisitionMode.Value="Continuous"# Switch on image acquisitioncamera.AcquisitionStart.Execute()# The camera waits for trigger signals.# (...)# Switch off image acquisitioncamera.AcquisitionStop.Execute()