Why no output file from standalone Simulink Coder executable?
4 ビュー (過去 30 日間)
古いコメントを表示
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
-----------------------------------------------------------------------------------------------------
0 件のコメント
回答 (1 件)
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.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!