跳转到内容

Trigger Delay#

相机的 Trigger Delay可让您增加接收到硬件触发信号或操作命令信号到触发激活之间的延迟。

该功能的使用#

要添加触发延迟:

  1. TriggerSelector 参数设置为所需的 触发类型,例如 FrameStart
  2. TriggerDelay 参数设置为所需的延迟(以 µs 为单位)。
    最小值为 0 μs(无延迟)。最大值为 1,000,000 μs(1 秒)。

示例代码#

ace classic/U/L GigE 相机#

// Select the frame start trigger
camera.TriggerSelector.SetValue(TriggerSelector_FrameStart);
// Set the delay for the frame start trigger to 300 µs
camera.TriggerDelayAbs.SetValue(300.0);
INodeMap& nodemap = camera.GetNodeMap();
// Select the frame start trigger
CEnumerationPtr(nodemap.GetNode("TriggerSelector"))->FromString("FrameStart");
// Set the delay for the frame start trigger to 300 µs
CFloatPtr(nodemap.GetNode("TriggerDelayAbs"))->SetValue(300.0);
INodeMap& nodemap = camera.GetNodeMap();
// Select the frame start trigger
CEnumParameter(nodemap, "TriggerSelector").SetValue("FrameStart");
// Set the delay for the frame start trigger to 300 µs
CFloatParameter(nodemap, "TriggerDelayAbs").SetValue(300.0);
// Select the frame start trigger
camera.Parameters[PLCamera.TriggerSelector].SetValue(PLCamera.TriggerSelector.FrameStart);
// Set the delay for the frame start trigger to 300 µs
camera.Parameters[PLCamera.TriggerDelayAbs].SetValue(300.0);
// Select the frame start trigger
Pylon.DeviceFeatureFromString(hdev, "TriggerSelector", "FrameStart");
// Set the delay for the frame start trigger to 300 µs
Pylon.DeviceSetFloatFeature(hdev, "TriggerDelayAbs", 300.0);
/* 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 */
/* Select the frame start trigger */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerSelector", "FrameStart");
CHECK(errRes);
/* Set the delay for the frame start trigger to 300 µs */
errRes = PylonDeviceSetFloatFeature(hdev, "TriggerDelayAbs", 300.0);
CHECK(errRes);

其他相机#

// Select the frame start trigger
camera.TriggerSelector.SetValue(TriggerSelector_FrameStart);
// Set the delay for the frame start trigger to 300 µs
camera.TriggerDelay.SetValue(300);
INodeMap& nodemap = camera.GetNodeMap();
// Select the frame start trigger
CEnumerationPtr(nodemap.GetNode("TriggerSelector"))->FromString("FrameStart");
// Set the delay for the frame start trigger to 300 µs
CIntegerPtr(nodemap.GetNode("TriggerDelay"))->SetValue(300);
INodeMap& nodemap = camera.GetNodeMap();
// Select the frame start trigger
CEnumParameter(nodemap, "TriggerSelector").SetValue("FrameStart");
// Set the delay for the frame start trigger to 300 µs
CIntegerParameter(nodemap, "TriggerDelay").SetValue(300);
// Select the frame start trigger
camera.Parameters[PLCamera.TriggerSelector].SetValue(PLCamera.TriggerSelector.FrameStart);
// Set the delay for the frame start trigger to 300 µs
camera.Parameters[PLCamera.TriggerDelay].SetValue(300);
// Select the frame start trigger
Pylon.DeviceFeatureFromString(hdev, "TriggerSelector", "FrameStart");
// Set the delay for the frame start trigger to 300 µs
Pylon.DeviceSetIntegerFeature(hdev, "TriggerDelay", 300);
/* 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 */
/* Select the frame start trigger */
errRes = PylonDeviceFeatureFromString(hdev, "TriggerSelector", "FrameStart");
CHECK(errRes);
/* Set the delay for the frame start trigger to 300 µs */
errRes = PylonDeviceSetIntegerFeature(hdev, "TriggerDelay", 300);
CHECK(errRes);

您也可以使用 pylon Viewer 轻松设置参数。