This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
We have verified that there is a bug in the Image Acquisition Toolbox 1.7 (R14SP1) in the way the DT frame grabber handles external triggers.
Currently, there are two ways to work around this issue:
The first way is to set the FramesPerTrigger property to a value greater than 1. This should prevent MATLAB from crashing. However, you must capture more than one frame per trigger.
The other way is to call the ADDFRAME function directly, in a callback, rather than using the Image Acquisition Toolbox’s built-in file logging capability. Below is an example. ADDFRAME is a MATLAB function.
vid = videoinput('dt',1,'NTSC');
vid.FramesPerTrigger = 1;
triggerconfig(vid, 'hardware', 'risingEdge', 'triggerinput');
vid.DiskLogger = aviobj;
vid.TriggerRepeat = (300*1)-1;
vid.FramesAcquiredFcn = @loggingCallback
vid.FramesAcquiredFcnCount = 1;
aviobj = avifile(my_log, 'Compression', 'none', 'Quality', 20);
vid.UserData = aviobj;
Create a file logging callback function, naming it Callback.m
Function loggingCallback(obj, event)
frame = getdata(obj, 1);
aviobj = obj.UserData;
aviobj = addframe(aviobj, frame);
obj.UserData = aviobj;
Best Answer