不完全确定为什么我不断收到此错误queueOutputData
:
data 参数必须包含会话中每个输出通道的一列。
我只有一个输出通道,为什么我还需要列?任何帮助将不胜感激。
%Initial variables
%set stimulation protoccol
t = 0:1/fs:stimlength;
data = sawtooth(2*pi*freq*t,0.5);
data=data+1;
data=data*ampli;
%set video object, set frames per trigger
vid = videoinput('dalsa', 1, 'C:\Users\IOS User\Documents\MATLAB\IOS\D_DS-21- 01M60_12b_SC.cca');
set(vid,'FramesPerTrigger',FRAMERATE*length);
%Set stim callback halfway through acquisiton
set(vid,'FramesAcquiredFcnCount', FRAMERATE*length/2+1);
set(vid,'FramesAcquiredFcn', {'stimulate'});
%Create session object and save it to the variable, ao
ao = daq.createSession('ni');
ao.Rate = 10000;
%Add an analog output 'Voltage' channel:
ao.addAnalogOutputChannel('Dev1',0,'Voltage')
ao.queueOutputData(data);