External trigger not working for VideoDevice but is working for videoinput?
5 次查看(过去 30 天)
显示 更早的评论
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:
imaqreset;
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';
preview(handles.vid1);
The code that works is:
imaqreset;
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;
handles.vid1.FramesAcquired
preview(handles.vid1);
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Acquisition Using Any Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!