External trigger not working for VideoDevice but is working for videoinput?

2 ビュー (過去 30 日間)
Andrew Davies
Andrew Davies 2015 年 9 月 9 日
編集済み: Andrew Davies 2015 年 9 月 9 日
I am using an allied vision technologies manta camera. I would like it to acquire a frame every time the camera is externally triggered. Using vid= videoinput('gentl',1) I can get the trigger to work. But using vid = imaq.VideoDevice('gentl',1); I get this error
"Warning: The videoinput object is not configured for hardware trigger, therefore FrameStartTriggerMode is being set to 'Off'."
This leads me to think that the way I'm configuring the video objects trigger is the problem. For videoinput I use "triggerconfig(vid, 'hardware', 'DeviceSpecific', 'DeviceSpecific');" but for imaq.VideoDevice I use
"handles.vid1.HardwareTriggering = 'On';" and "handles.vid1.TriggerConfiguration = 'DeviceSpecific/DeviceSpecific';". But I can't find any additional trigger options.
Thanks, Andy
For reference
The code that doesn't work is:
handles.vid1 = imaq.VideoDevice('gentl',1);
handles.vid1.DeviceProperties.AcquisitionRecordTriggerSource = 'Line1';
handles.vid1.DeviceProperties.AcquisitionRecordTriggerMode = 'On';
handles.vid1.DeviceProperties.FrameStartTriggerMode = 'On';
handles.vid1.DeviceProperties.FrameStartTriggerSource = 'Line1';
handles.vid1.DeviceProperties.AcquisitionEndTriggerMode = 'off'; %keep taking frames with each tirgger
handles.vid1.DeviceProperties.AcquisitionEndTriggerSource = 'Line1';
handles.vid1.DeviceProperties.AcquisitionEndTriggerActivation = 'FallingEdge';
handles.vid1.DeviceProperties.AcquisitionStartTriggerMode = 'On';
handles.vid1.DeviceProperties.AcquisitionStartTriggerSource = 'Line1';
handles.vid1.HardwareTriggering = 'On';
handles.vid1.TriggerConfiguration = 'DeviceSpecific/DeviceSpecific';
The code that works is:
handles.vid1 = videoinput('gentl',1,'Mono12');
handles.vid1.FramesPerTrigger = 1;
src = getselectedsource(handles.vid1);
src.AcquisitionRecordTriggerSource = 'Line1';
src.AcquisitionRecordTriggerMode = 'On';
src.FrameStartTriggerMode = 'On';
src.FrameStartTriggerSource = 'Line1';
% src.AcquisitionEndTriggerMode = 'On'; %one frame and end
src.AcquisitionEndTriggerMode = 'Off'; %keep taking frames with each tirgger
src.AcquisitionEndTriggerSource = 'Line1';
src.AcquisitionEndTriggerActivation = 'FallingEdge';
src.AcquisitionStartTriggerMode = 'On';
src.AcquisitionStartTriggerSource = 'line1';
triggerconfig(handles.vid1, 'hardware', 'DeviceSpecific', 'DeviceSpecific');
handles.vid1.TriggerRepeat = 0;

回答 (0 件)


Help Center および File ExchangeDevice Connection についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by