Basler dart E cameras that support the Periodic Signal feature provide an additional camera signal source, PeriodicSignal1. The signal is synchronized to electrical signals applied via the camera's input line 1.
// Configure the camera to be triggered by the periodic signal// Note: You must set the trigger source first and then the trigger modecamera.TriggerSource.SetValue(TriggerSource_PeriodicSignal1);camera.TriggerMode.SetValue(TriggerMode_On);// Set the transition type to falling edgecamera.BslPeriodicSignalActivation.SetValue(BslPeriodicSignalActivation_FallingEdge);// Set the signal delay to 0camera.BslPeriodicSignalDelay.SetValue(0);
INodeMap&nodemap=camera.GetNodeMap();// Configure the camera to be triggered by the periodic signal// Note: You must set the trigger source first and then the trigger modeCEnumParameter(nodemap,"TriggerSource").SetValue("PeriodicSignal1");CEnumParameter(nodemap,"TriggerMode").SetValue("On");// Set the transition type to falling edgeCEnumParameter(nodemap,"BslPeriodicSignalActivation").SetValue("FallingEdge");// Set the signal delay to 0CIntegerParameter(nodemap,"BslPeriodicSignalDelay").SetValue(0);
// Configure the camera to be triggered by the periodic signal// Note: You must set the trigger source first and then the trigger modecamera.Parameters[PLCamera.TriggerSource].SetValue(PLCamera.TriggerSource.PeriodicSignal1);camera.Parameters[PLCamera.TriggerMode].SetValue(PLCamera.TriggerMode.On);// Set the transition type to falling edgecamera.Parameters[PLCamera.BslPeriodicSignalActivation].SetValue(PLCamera.BslPeriodicSignalActivation.FallingEdge);// Set the signal delay to 0camera.Parameters[PLCamera.BslPeriodicSignalDelay].SetValue(0);
/* 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 the camera to be triggered by the periodic signal *//* Note: You must set the trigger source first and then the trigger mode */errRes=PylonDeviceFeatureFromString(hdev,"TriggerSource","PeriodicSignal1");CHECK(errRes);errRes=PylonDeviceFeatureFromString(hdev,"TriggerMode","On");CHECK(errRes);/* Set the transition type to falling edge */errRes=PylonDeviceFeatureFromString(hdev,"BslPeriodicSignalActivation","FallingEdge");CHECK(errRes);/* Set the signal delay to 0 */errRes=PylonDeviceSetIntegerFeature(hdev,"BslPeriodicSignalDelay",0);CHECK(errRes);
# Configure the camera to be triggered by the periodic signal# Note: You must set the trigger source first and then the trigger modecamera.TriggerSource.Value="PeriodicSignal1"camera.TriggerMode.Value="On"# Set the transition type to falling edgecamera.BslPeriodicSignalActivation.Value="FallingEdge"# Set the signal delay to 0camera.BslPeriodicSignalDelay.Value=0
/* 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 the camera to be triggered by the periodic signal */errRes=PylonDeviceFeatureFromString(hdev,"TriggerMode","On");CHECK(errRes);errRes=PylonDeviceFeatureFromString(hdev,"TriggerSource","PeriodicSignal1");CHECK(errRes);/* Set the transition type to falling edge */errRes=PylonDeviceFeatureFromString(hdev,"BslPeriodicSignalActivation","FallingEdge");CHECK(errRes);/* Set the signal delay to 0 */errRes=PylonDeviceSetIntegerFeature(hdev,"BslPeriodicSignalDelay",0);CHECK(errRes);
You can also use the pylon Viewer to easily set the parameters.