Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to organize long time exposure mode with Jai CV-A50 and PCI-1409?

Hi!
 
I have Jai CV-A50 camera and PCI-1409 grabber. I need the shutter time from 0.1 to 2.0 sec long. Corresponding to the documentation of camera, I have to establish TR=4 trigger mode, drive trigger line with HSYNC  to the camera's HSYNC input and create pulse generation with pulse width about 7.5H and pulse delay =shutter time to the camera's VSYNC input.
 
Here is a code in LabWindowsCVI, that is implemented to start image acquisition. But I don't get a picture.
 What may be a reason?
 
int CVICALLBACK Start (int panel, int control, int event,
    void *callbackData, int eventData1, int eventData2)
{
  int iErr = 0;
  unsigned long delay, width;
  unsigned long timebase;
 
  switch (event)
  {
  case EVENT_COMMIT:
    GetCtrlVal( panelHandle, MAIN_START, &IsGrabStarted );
    if( IsGrabStarted )
    {
      // create ring
      CreateRing();
      // conf trigger SHUTTER_TIME_NUMERIC
      iErr = GetCtrlVal( panelHandle, MAIN_WIDTH_TIME_NUMERIC, &dblWidth );
      iErr = GetCtrlVal( panelHandle, SHUTTER_TIME_NUMERIC, &dblShutter );
      iErr = imgPulseRate (dblShutter, dblWidth, &delay, &width, &timebase);
     
      iErr = imgPulseCreate2 (timebase, delay, width, IMG_SIGNAL_STATUS, IMG_IMMEDIATE, IMG_TRIG_POLAR_ACTIVEH, IMG_SIGNAL_EXTERNAL, 0,   IMG_PULSE_POLAR_ACTIVEL,
                              PULSE_MODE_TRAIN, &pulseId);
      iErr = imgPulseStart (pulseId, sessionId);
                             
      iErr = imgSessionTriggerDrive2( sessionId, IMG_SIGNAL_EXTERNAL, 2, IMG_TRIG_POLAR_ACTIVEL, IMG_TRIG_DRIVE_HSYNC );
    
      iErr = CmtScheduleThreadPoolFunction( DEFAULT_THREAD_POOL_HANDLE,
                                            GrabAndProcess,
                                            NULL,
                                            &threadId );
    }
    else
    {
      StopGrabThread();
    }
    break;
  }
  return 0;
}
 
GrabAndProcess function is OK, if I send TR=0 to the camera, it works normally, but shutter time is not that I need.
 
Thanks.
0 Kudos
Message 1 of 1
(3,092 Views)