AppDesigner: values don't get updated

20 visualizaciones (últimos 30 días)
Ahmed Ellithy
Ahmed Ellithy el 2 de Mayo de 2023
Comentada: Ahmed Ellithy el 15 de Jul. de 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?

Respuestas (1)

Rasmita
Rasmita el 9 de Jun. de 2023
Editada: Rasmita el 9 de Jun. de 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 comentario
Ahmed Ellithy
Ahmed Ellithy el 15 de Jul. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Deploy Standalone Applications en Help Center y File Exchange.

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by