PDA

View Full Version : external trigger 100Hz not driving my software



tesla
April 12, 2016, 10:03:42
Hi,

I have a TTL signal 100Hz which correctly trigs my DFK Z12GX236 through the hirose connector. I can se a 100 fps image 1280x720 in the software IC Capture. For this I just need to press the button external trigger in the toolbar and answer yes to disable automations.

Now, my problem is my software that I develop in .NET C#


With the internal trigger of the camera, my sotware works. I fetch my image in

icImageControl.ImageAvailable += icImageControl_ImageAvailable;

With the external trigger, the best result I could have is to have half of the first frame and then it trigs no more.
Can you help me ? How can I reach the same result as in your ic Capture software ?

Thank you in advance for your answer.


Stefan



icImageControl.LiveDisplayHeight = icImageControl.Height;
icImageControl.LiveDisplayWidth = icImageControl.Width;
icImageControl.LiveCaptureLastImage = false;

icImageControl.LiveCaptureContinuous = true;

icImageControl.Device = icImageControl.Devices[0];

icImageControl.VideoFormat = "RGB32 (1280x720)";
icImageControl.DeviceFlipHorizontal = false;
icImageControl.DeviceFlipVertical = false;

icImageControl.LiveDisplayHeight = icImageControl.Height;
icImageControl.LiveDisplayWidth = icImageControl.Width;


if (icImageControl.DeviceValid)
{

icImageControl.ImageRingBufferSize = 1;

icImageControl.LiveCaptureContinuous = false;
icImageControl.DeviceTrigger = false;
icImageControl.LiveStart();

}

Stefan Geissler
April 12, 2016, 12:44:24
Plese keep in mind: while running triggered, the camera sums exposure time and delivery time. If you want to run the camera with 100 fps and 100Hz trigger, you must set a very very very low exposure time. Or you may use a higher frame rate or lower trigger frequency.

tesla
April 12, 2016, 16:42:53
I have set the exposure time to 1/250s, even 1/500s through the ShowPropertyDialog().

The problem is with the Special->Trigger->Delay field.
If I put 30000us or higher it works. But I cannot get the framerate I want. I should put 10000us or less. Why this doesn't work ?

What are the c# functions to set Expo time and trigger delay programmatically ? I cannot find them.

Thank you in advance for your kind reply.


Stefan

tesla
April 12, 2016, 17:58:45
actually I have found the programmatical way to set trigger delay and I am setting it to 10000us. But the same problem as in my initial thread.
With 10000 it doesn't trig. With 40000 it trigs at 25fps. But I need 100fps. How can I do it? What am I missing ?

VCDSwitchProperty Trigger;
Trigger = (VCDSwitchProperty)icImageControl.VCDPropertyItems .FindInterface(VCDIDs.VCDID_TriggerMode + ":" + VCDIDs.VCDElement_Value + ":" + VCDIDs.VCDInterface_Switch);
Trigger.Switch = true;



foreach (var vc in icImageControl.VCDPropertyItems)
{
if ((vc as VCDPropertyItem).Name == "Trigger")
{
foreach (var i in (vc as VCDPropertyItem).Elements)
{
Debug.WriteLine((i as VCDPropertyElement).Name.ToString());

if ((i as VCDPropertyElement).Name == "Delay")
{
foreach (var a in (i as VCDPropertyElement))
{
VCDAbsoluteValueProperty aa = a as VCDAbsoluteValueProperty;
aa.Value = 10000;
}

}

}

}
Debug.WriteLine((vc as VCDPropertyItem).Name.ToString());
}

Stefan Geissler
April 14, 2016, 08:13:58
Hello

Please use a higher frame rate in the camera.

Setting a trigger delay on 1 second tells the camera to wait one second after the trigger pulse occurred and then start exposure. So this delay is not helpful for your issue