Filter löschen
Filter löschen

Why no output file from standalone Simulink Coder executable?

3 Ansichten (letzte 30 Tage)
Hugh
Hugh am 13 Okt. 2023
Bearbeitet: Hugh am 25 Okt. 2023
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
-----------------------------------------------------------------------------------------------------

Antworten (1)

Mark McBroom
Mark McBroom am 21 Okt. 2023
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 Kommentar
Hugh
Hugh am 25 Okt. 2023
Bearbeitet: Hugh am 25 Okt. 2023
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Produkte


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by