View Full Version : external trigger and video recording
morton
May 13, 2013, 10:35:25
Hi.
I have a DFK23G618 GigE cam. I have an idea of having the trigger input working as a one time start signal for recording video. The video should then be recorded for a certain period and after this switch on, and wait for the next trigger input to start recording again. I program in C# and after having read the .net component user help, I believe that it is not possible to have the trigger input working like i wish. Anybody disagree I look forward to hear from you.
Thanks.
\Morton.
Stefan Geissler
May 13, 2013, 11:12:59
You can use the trigger as GPIn, so you can query the state of the trigger input by software.
I added a C++ sample, that does, what you want to do. Unfortunately I have no C# sample.
For C# you need
private VCDButtonProperty ReadButton;
private VCDRangeProperty GPIn;
Query the properties:
private void QueryVCDProperties()
{
ReadButton = (VCDButtonProperty)_ic.VCDPropertyItems.FindInterf ace(VCDIDs.VCDID_GPIO + ":" + VCDIDs.VCDElement_GPIORead + ":" + VCDIDs.VCDInterface_Button);
GPIn = (VCDRangeProperty)_ic.VCDPropertyItems.FindInterfa ce(VCDIDs.VCDID_GPIO + ":" + VCDIDs.VCDElement_GPIOIn + ":" + VCDIDs.VCDInterface_Range);
}
ReadButton.Push();
if (GPIn.Value == 1)
{
// Do something, if it is 1
}
else
{
// Do something else, if it is 0
}
Please keep in mind, the GP In is not buffered, so the signal must be on high level over a period in that your program checks this. A better approach is to keep the signal high as long as you want to capture an AVI file.
morton
May 13, 2013, 15:12:07
Hi Stephan.
Thanks for replying.
I am not sure excactly how to convert the cpp sample to C#. Could you try to give some more info of what components to use for trying to get hold of the trigger input. The camera I have has only the trigger input and two output. Could you advise how excactly to get these.
Thanks.
\Morton
Stefan Geissler
May 13, 2013, 16:18:39
Dear Morton,
Please see the C# snippets I posted in my first post. This should be a good starting point. The rest can be seen from the C# samples of IC Imaging Control, installed into your user directory.
Powered by vBulletin® Version 4.2.5 Copyright © 2018 vBulletin Solutions Inc. All rights reserved.