Home > C: Programming > Function Descriptions > History back  Previous chapter  Next chapter  Print  

is_ForceTrigger

uEye Camera Manual Version 3.80

is_ForceTrigger

Windows_Logo

Linux_Logo

USB 2.0

GigE

USB 2.0

GigE

Syntax

INT is_ForceTrigger (HIDS hCam)

Description

You can use is_ForceTrigger() to force a software-controlled capture of an image while a capturing process triggered by hardware is in progress. This function can only be used if the triggered capturing process was started using the IS_DONE_WAIT parameter.

Input Parameters

hCam

Camera handle

Return Values

IS_SUCCESS

Function executed successfully

IS_NO_SUCCESS

General error message

Related Functions

is_FreezeVideo()
is_CaptureVideo()
is_SetExternalTrigger()

Code Sample

Enable trigger and wait 1 second for the external trigger. If no trigger signal has arrived, force an exception using is_ForceTrigger().


HANDLE hEvent = CreateEvent(NULL, TRUE, FALSE, "");

if ( hEvent != NULL )

{

  is_InitEvent(hCam, m_hEvent, IS_SET_EVENT_FRAME);

  is_EnableEvent(hCam, IS_SET_EVENT_FRAME);

 

  is_SetExternalTrigger(hCam, IS_SET_TRIGGER_HI_LO);

  is_FreezeVideo(hCam, IS_DONT_WAIT);

 

  if (WaitForSingleObject(m_hEvent, 1000) != WAIT_OBJECT_0)

   {

      // No trigger has been received, so force image capture

      is_ForceTrigger(hCam);

   }

 

  is_DisableEvent(hCam, IS_SET_EVENT_FRAME);

  is_ExitEvent(hCam, IS_SET_EVENT_FRAME);

}


Suggestion for improvement? Send us your short Feedback on this chapter. Thank you very much!


© 2010 IDS Imaging Development Systems GmbH
http://www.ids-imaging.com