Clear Filters
Clear Filters

Simulink rapid accelerator only returns tout

3 views (last 30 days)
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

Answers (1)

Ankit Bhatnagar
Ankit Bhatnagar on 28 Jun 2017
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:

Categories

Find more on Multicore Processor Targets in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!