20/33
Sentech GigE Vision Camera StGigE SDK
Sample Guide Rev.1.00
if( !lResult.IsOK() ) return FALSE;
sprintf( PLCText, "TimerDelayRaw" );
lPvGenInteger = dynamic_cast<PvGenInteger *>(pDevice->GetGenParameters()->Get( PLCText ) );
if(lPvGenInteger==NULL) return FALSE;
lResult = lPvGenInteger->SetValue( durationOfLow );
if( !lResult.IsOK() ) return FALSE;
sprintf( PLCText, "TimerGranularityFactor" );
lPvGenInteger = dynamic_cast<PvGenInteger *>(pDevice->GetGenParameters()->Get( PLCText ) );
if(lPvGenInteger==NULL) return FALSE;
lResult = lPvGenInteger->SetValue( pulseScale-1 );
if( !lResult.IsOK() ) return FALSE;
sprintf( PLCText, "TimerTriggerSource" );
lPvGenEnum = dynamic_cast<PvGenEnum *>(pDevice->GetGenParameters()->Get( PLCText) );
if(lPvGenEnum==NULL) return FALSE;
lResult = lPvGenEnum->SetValue( bTrgMode );
if( !lResult.IsOK() ) return FALSE;
return TRUE;
}
D. Sets the operation mode to the trigger mode.
// Sets the operation mode.
//bTriggerMode: Operation mode, True: Trigger mode, False: Free-run mode
BOOL SetTriggerMode( PvDevice *pDevice, BOOL bTriggerMode )
{
PvResult lResult;
PvGenEnum* PvGenEnum=dynamic_cast<PvGenEnum*>(pDevice->GetGenParameters()->Get( "TriggerMode" ) );
if( lPvGenEnum==NULL ) return FALSE;
if( bTriggerMode ){
lResult = lPvGenEnum->SetValue("On");
}
else
{
lResult = lPvGenEnum->SetValue("Off");
}
return (BOOL)lResult.IsOK();
}
E. Sets the exposure mode.
// Sets the exposure mode
//iExposureMode
:
0:Timed 1:TriggerWidth
BOOL SetExposureMode( PvDevice *pDevice, int iExposureMode )
{
PvGenEnum* lPvGenEnum=dynamic_cast<PvGenEnum*>(pDevice->GetGenParameters()->Get( "ExposureMode" ) );
if( lPvGenEnum==NULL ) return FALSE;
PvResult lResult = lPvGenEnum->SetValue(iExposureMode);
return (BOOL)lResult.IsOK();