Simulink rapid accelerator only returns tout

2 次查看(过去 30 天)
My model could be compiled succesfully and also the Simulation seemed to run but the only return I got was tout.
My code:
model = 'myModelName';
% build
rapidAccParams = Simulink.BlockDiagram.buildRapidAcceleratorTarget(model);
% Simulation Parameters
paramValStruct.SimulationMode = 'rapid';
paramValStruct.SaveTime = 'on';
paramValStruct.SaveOutput = 'on';
paramValStruct.LoadExternalInput = 'on';
paramValStruct.RapidAcceleratorParameterSets = rapidAccParams;
paramValStruct.RapidAcceleratorUpToDateCheck = 'off';
paramValStruct.ReturnWorkspaceOutputs = 'on';
paramValStruct.RapidAcceleratorUpToDateCheck = 'off';
% run
simOut = sim(model,paramValStruct)
If i run this in 'normal' or 'accel' mode simOut contains both tout and a result struct, but with 'rapid' I only get tout.
Does anybody know what could cause this problem. Any answers would be greatly apreaciated

回答(1 个)

Ankit Bhatnagar
Ankit Bhatnagar 2017-6-28
Hi,
The element 'yout' of the returned object could be just an empty struct as the logging format for the output is set to 'Dataset' by default. Simulation in rapid accelerator mode does not support logging output to a Simulink.SimulationData.Dataset object. You would need to change this to either 'Array','Structure' or 'StructureWithTime' depending on your preference.
Refer the documentation link for further details:

类别

Help CenterFile Exchange 中查找有关 Multicore Processor Targets 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by