Logging Active States/Data during Simulation
이전 댓글 표시
I am trying to simulate a Simulink Model containing Statecharts using external inputs set using a time/data structure. I open the model with the following parameters set
set_param(model,...
'RecordCoverage','on',...
'CovMetricSettings','dcmtw',...
'CovSaveCumulativeToWorkspaceVar','on',...
'CovHtmlReporting','off',...
'LoadExternalInput','on',...
'ExternalInput','InputStruct',...
'OutputSaveName','OutputStruct',...
'SaveState','on',...
'SaveFormat','Structure',...
'SaveTime','on',...
'SaveOutput','on',...
'LimitDataPoints','off',...
'Decimation','1');
I am using an Structure containing time and the signal values into the sim command
sim(model,max(InputStruct.time),[],InputStruct);
I wish to store the Frame by Frame detail Active States/Transitions. In other words for a particular element of the Time Structure InputStruct.time I need Matlab to log which are the "Active States" inside the Statechart. Similar to what is shown in the Debugger Window.
I was also hoping if this information can be stored during simulation so that I need not post process the logged data after simulation is complete. I shall be using the frame by frame data to write into a structured CSV file in form of Comments containing the State Details with a row followed by the signal data where the input and output are in respective column pertaining to the signal values in the frame.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Active State Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!