AppDesigner: values don't get updated
11 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
Rasmita
2023-6-9
编辑:Rasmita
2023-6-9
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!
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Environment Customization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!