Acquisition Mode#
情報
- この機能は、pylon Viewer機能ツリーからは使用できません。代わりに、pylon ViewerのツールバーのSingle ShotとContinuous Shotボタンを使用すると、取得モードが自動的に設定されます。
- 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.
詳細については、「pylon APIドキュメント」のGrab (C++)」およびGrab (.NET)コードサンプルを参照してください。
機能を使用する#
Acquisition Modeの指定#
To specify the acquisition mode, set the AcquisitionMode
パラメーターを次のいずれかの値に設定します。
SingleFrame
: Enables the Single Frame acquisition mode.Continuous
: Enables the Continuous acquisition mode.
使用可能なAcquisition Mode#
Single Frame Acquisition Mode#
Single Frame取得モードでは、カメラは1枚の画像のみを取得します。
Acquisition Startコマンドが実行されると、カメラはトリガー信号を待機します。トリガー信号は、カメラによって内部で生成される(フリーラン)か、外部で適用されます(トリガー画像取得)。
情報
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.
Continuous Acquisition Mode#
Continuous取得モードでは、取得スイッチがオフになるまで、カメラは画像を連続的に取得して転送します。
Acquisition Startコマンドが実行されると、カメラはトリガー信号を待機します。トリガー信号は、カメラによって内部で生成される(フリーラン画像取得)か外部で適用されます(トリガー画像取得)。カメラは、Acquisition Stopコマンドが実行されるまで、画像の取得を続行します。
サンプルコード#
// 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()
pylon Viewerを使用して、パラメーターを簡単に設定することもできます。