View Full Version : Software trigger?

January 20, 2014, 20:36:46
I'm struggling to write code to get one image with the software trigger. There is no such example, and the documentation on all the generic VCDProperties APIs is not very helpful on such explicit examples, unfortunately. The API is quite complex for achieving simple tasks and it takes a lot of time to find out how to do such elementary things...

I've got this code, but only get a "null" reference returned in "trigger":

VCDSwitchProperty trigger =
(VCDSwitchProperty)icImagingControl1.VCDPropertyIt ems.FindItem(VCDGUIDs.VCDElement_SoftwareTrigger);
trigger.Switch = true;

Using Imaging Control SDK v. 3.3. and C#

Stefan Geissler
January 21, 2014, 10:09:55
Hello Florian,

The trigger should be used together with ImageAvailable event. Therefore also set LiveCaptureContinuous property to true. So every time, a trigger occurs, the ImageAvailable is called and you can access the image buffer.

Enable the trigger of the camera:

using TIS.Imaging;

public static bool SetTrigger(ICImagingControl ic, bool OnOff )

VCDSwitchProperty Trigger;
Trigger = (VCDSwitchProperty)ic.VCDPropertyItems.FindInterfa ce(VCDIDs.VCDID_TriggerMode + ":" + VCDIDs.VCDElement_Value + ":" + VCDIDs.VCDInterface_Switch);

if (Trigger != null)
Trigger.Switch = OnOff;
return true;

catch (ICException IEx)
System.Windows.Forms.MessageBox.Show(IEx.Message, "SetTrigger");
return false;

Using the Software trigger:

using TIS.Imaging;

VCDButtonProperty SoftTrigger = (VCDButtonProperty)_ic.VCDPropertyItems.FindInterf ace(VCDIDs.VCDID_TriggerMode + ":{FDB4003C-552C-4FAA-B87B-42E888D54147}:" + VCDIDs.VCDInterface_Button);

if (SoftTrigger == null)

I am not sure, whether my programmers added a define for "{FDB4003C-552C-4FAA-B87B-42E888D54147}".

A complete sample is attached to this post. Unfortunatelly it is C++ only, therefore it may is not as helpful.

January 23, 2014, 16:37:58
Thanks! Works great this way. In fact there is a define. The following code works for me:

string itfPath = VCDIDs.VCDID_TriggerMode + ":" +
VCDGUIDs.VCDElement_SoftwareTrigger + ":" +
TIS.Imaging.VCDPropertyInterface itf =
icImagingControl1.VCDPropertyItems.FindInterface(i tfPath);
if (itf != null)
TIS.Imaging.VCDButtonProperty button = (TIS.Imaging.VCDButtonProperty)itf;