Desktop Real-Time slow initialization
I am using the input from an mcc usb-231 daq to feed data into my simulink model through a function block. The issue I am running into is that when the simulation first starts up. it takes almost an entire minute before my simulation begins simulating through the desktop realtime kernal.
Here is my function block.
function output = fcn()
coder.extrinsic(‘daq’,’read’,’addinput’); %lets simulink know to read commands as MATLAB commands
d = daq(‘mcc’);
addinput(d,’Board0′,0,’Voltage’)
data = read(d,’OutputFormat’,’Matrix’);
output = zeros(1,1);
output = data(1,1);
Is there a way to get rid of this initialization buffer at the start?I am using the input from an mcc usb-231 daq to feed data into my simulink model through a function block. The issue I am running into is that when the simulation first starts up. it takes almost an entire minute before my simulation begins simulating through the desktop realtime kernal.
Here is my function block.
function output = fcn()
coder.extrinsic(‘daq’,’read’,’addinput’); %lets simulink know to read commands as MATLAB commands
d = daq(‘mcc’);
addinput(d,’Board0′,0,’Voltage’)
data = read(d,’OutputFormat’,’Matrix’);
output = zeros(1,1);
output = data(1,1);
Is there a way to get rid of this initialization buffer at the start? I am using the input from an mcc usb-231 daq to feed data into my simulink model through a function block. The issue I am running into is that when the simulation first starts up. it takes almost an entire minute before my simulation begins simulating through the desktop realtime kernal.
Here is my function block.
function output = fcn()
coder.extrinsic(‘daq’,’read’,’addinput’); %lets simulink know to read commands as MATLAB commands
d = daq(‘mcc’);
addinput(d,’Board0′,0,’Voltage’)
data = read(d,’OutputFormat’,’Matrix’);
output = zeros(1,1);
output = data(1,1);
Is there a way to get rid of this initialization buffer at the start? simulink, data acquisition, matlab MATLAB Answers — New Questions