AppDesigner: values don't get updated

25 views (last 30 days)
Ahmed Ellithy
Ahmed Ellithy on 2 May 2023
Commented: Ahmed Ellithy on 15 Jul 2023
I'm designing an app compiled from Simulink using Simulink Compiler. In the App there are five parameters that can be inserted, two of which change the value inside Specialized Power System (RLC Branch - Resistance). I get the following warning/errors:
Warning: Value of variable 'NameOfVariable' was modified but it is used in a nontunable parameter. The new value will be ignored.
When running the App (before compiling it), these two variables which are inside two different Resistance Block don't get change, but all the other parameters (the other three) work fine.
I was able to ''solve'' this problem by deleting the command simulink.compiler.configureForDeployment(). However, when i compiled the app as a standalone, i dont get any results but rather a sound which shows that there was an error. i get the following errors:
  • Error using App_Reflection/StartButtonPushed
  • For deployment, set the RapidAcceleratorUpToDateCheck model parameter to 'off', using Simulink.SimulationInput object.
  • Error in appdesigner.internal.service.AppManagementService/executeCallback (line 171)
  • Error in matlab.apps.AppBase>@(source,event)executeCallback(ams,app,callback,requiresEventData,event) (line 62)
  • Error using matlab.ui.control.internal.controller.ComponentController/executeUserCallback
  • Error while evaluating Button PrivateButtonPushedFcn.
which i have done like follows:
simInp = setModelParameter(simInp,"RapidAcceleratorUpToDateCheck","off")
Now when i run the app for testing (before compiling it), i have the same issue as before which is that the variables don't get updated. Even after compiling the app (with the issue), i get very false results with the other parameters!
How can i go around this problem?

Answers (1)

Rasmita
Rasmita on 9 Jun 2023
Edited: Rasmita on 9 Jun 2023
Hi Ahmed,
I understand that you are getting some errors when compiling the MATLAB app using Simulink Compiler.
These error typically occur when you attempt to change the value of a parameter that is marked as non-tunable as these parameters are intended to remain constant throughout the simulation and cannot be modified dynamically.
The command "simulink.compiler.configureForDeployment()" is used to configure the model for deployment, and by removing it, you may be missing some necessary configurations required for successful deployment. Hence you got the above errors.
So, you need to make sure that those two parameters are tunable within the Simulink model itself using Model Parameter Configuration Dialog Box.
Please refer to the below documentation link for more information on declaring specific tunable parameters:
Please refer to the below documentation link for more information on deploying Simulations that use tunable parameters with Simulink Compiler:
Hope this helps you resolve the query!
  1 Comment
Ahmed Ellithy
Ahmed Ellithy on 15 Jul 2023
Unfortunately not :(. I've still been looking for a way to get through it but no luck. The problem related to the RapidAccelerator is understandable, but the the issue with the SPS blocks is the major one here.

Sign in to comment.

Categories

Find more on Deploy Standalone Applications in Help Center and File Exchange

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!