Why no output file from standalone Simulink Coder executable?

조회 수: 7 (최근 30일)
Hugh
Hugh 2023년 10월 13일
편집: Hugh 2023년 10월 25일
I have a large Simulink model that was originally developed under R2012a and which I have ported to R2023b. All of the model ouputs are written to the MATLAB workspace using the "To Workspace" block. I've verified the presence of valid output data in the workspace when the model is executed from Simulink.
Next, I build a standalone Simulink Coder executable file from the model using slbuild(). I then run the executable, which appears to complete without any errors. However, it produces no output MAT-file. I've run the program both with and without the -o <results.mat> command line option.
I have no idea how to even begin to debug this!
>> ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 23.2.0.2380103 (R2023b) Update 1
MATLAB License Number: 41135996
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 19045)
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------

답변 (1개)

Mark McBroom
Mark McBroom 2023년 10월 21일
When running a .exe created from Simulink, there is no such thing as a "workspace" for the code to write to. You need to use a "fo file" block in the Simulink model.
  댓글 수: 1
Hugh
Hugh 2023년 10월 25일
편집: Hugh 2023년 10월 25일
I should probably have titled my posting "Rsim target no output". I'm attempting to run multiple simulations to study effects of varying parameter settings as described here. When I run the executable generated by Simulink Coder, I expect the contents of the "To Workspace" blocks in my model to appear in a MAT file. However, no MAT file is created.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by