// Enable triggered image acquisition for the Frame Start triggercamera.TriggerMode.SetValue(TriggerMode_On);// Set the trigger source to Line 1camera.TriggerSource.SetValue(TriggerSource_Line1);// Set the trigger activation mode to level highcamera.TriggerActivation.SetValue(TriggerActivation_LevelHigh);
INodeMap&nodemap=camera.GetNodeMap();// Enable triggered image acquisition for the Frame Start triggerCEnumParameter(nodemap,"TriggerMode").SetValue("On");// Set the trigger source to Line 1CEnumParameter(nodemap,"TriggerSource").SetValue("Line1");// Set the trigger activation mode to level highCEnumParameter(nodemap,"TriggerActivation").SetValue("LevelHigh");
// Enable triggered image acquisition for the Frame Start triggercamera.Parameters[PLCamera.TriggerMode].SetValue(PLCamera.TriggerMode.On);// Set the trigger source to Line 1camera.Parameters[PLCamera.TriggerSource].SetValue(PLCamera.TriggerSource.Line1);// Set the trigger activation mode to level highcamera.Parameters[PLCamera.TriggerActivation].SetValue(PLCamera.TriggerActivation.LevelHigh);
/* 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 *//* Enable triggered image acquisition for the Frame Start trigger */errRes=PylonDeviceFeatureFromString(hdev,"TriggerMode","On");CHECK(errRes);/* Set the trigger source to Line 1 */errRes=PylonDeviceFeatureFromString(hdev,"TriggerSource","Line1");CHECK(errRes);/* Set the trigger activation mode to level high */errRes=PylonDeviceFeatureFromString(hdev,"TriggerActivation","LevelHigh");CHECK(errRes);
# Enable triggered image acquisition for the Frame Start triggercamera.TriggerMode.Value="On"# Set the trigger source to Line 1camera.TriggerSource.Value="Line1"# Set the trigger activation mode to level highcamera.TriggerActivation.Value="LevelHigh"
You can also use the pylon Viewer to easily set the parameters.