How do I add Live IO through "simulink.​compiler.g​enapp"?

2 views (last 30 days)
I'm using Simulink Compiler and I am originally following the steps in the following link to set up Live IO during simulations:
I am also aware of "simulink.compiler.genapp" , which helps speed up the development process of the generated app. I want to know whether it's possible to use "simulink.compiler.genapp" to rapidly generate an app that supports Live IO during simulations but couldn't find any examples.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 May 2022

For R2022b and after

If you are using R2022b or later, you can use the "MultiPaneSimApp" default template for simulink.compiler.genapp to quickly generate an app with Live IO . This is the default template for R2022b so you only need to call genapp with the model name.
>>simulink.compiler.genapp('modeName')

For R2022a and before

If you are using R2022a release or earlier, then you can use the steps below.
After running "simulink.compiler.genapp", replace "@AppHelper" in the generated app with the supplied "@AppHelper" folder from "option1.zip":
  1. Extract the attached "option1.zip" into a directory of your choice
  2. Use the extracted @AppHelper folder to replace the one in your app
  3. Run the app using:\n
    AppUtils.run
You can also control the live plotting window size in "AppHelper.m" using the "WindowSize" property.
The files modified in @AppHelper are:
  • AppHelper.m
  • refreshTimerFcn.m
  • stopButtonPushed.m
  • updateSigsAndAxesGL.m
  • runPauseResumeButtonPushed.m
The following file was added to @AppHelper:
  • resetLivePlotData.m

More Answers (0)

Categories

Find more on Project Management in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!