External trigger not working for VideoDevice but is working for videoinput?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Acquisition Using Any Hardware en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!