Effacer les filtres
Effacer les filtres

How can I deploy a standalone app for obtain data in real time from simulink

5 vues (au cours des 30 derniers jours)
Khang Pham Duy
Khang Pham Duy le 11 Avr 2024
Modifié(e) : Ayush le 24 Juil 2024
I create a simulink file for obtaining data from joystick, then I create an app in appdesigner to show data. In appdesigner I am using set_param() to set time simulation and get_param() to get data from output port in simulink when simulink is running that is the reason why I am using get_param() instead of sim function to run simulink. My app operates well . But afte I deploy a standalone desktop app for my project, when I test it comeout this error: Unsupported command in deployed mode: set_param.
I find that this function is not supported follow this link: https://www.mathworks.com/help/compiler/unsupported-functions.html
Have any another way to help me get data in real time from simulink and I can deploy a standalone app for using in another pc?
I am looking forward to hearing from you.
Thank you

Réponses (1)

Ayush
Ayush le 24 Juil 2024
Modifié(e) : Ayush le 24 Juil 2024
Hello Khang,
As mentioned by you, a Simulink function, in your case set_param, is not supported by the MATLAB Compiler that is responsible for the deployment of a MATLAB App. You can also refer to the following MATLAB answer post for a similar observation and unavailability of a workaround in terms of utilizing the same functionality in a deployed app:
However, to perform real time functionality such as getting/setting the parameter of a block or any such real-time component, you can utilize the Simulink Real-Time components with the "Instruments Panel in App Designer" to connect the app with the components of the app and then deploy them onto a standalone app with "Application Compiler" for further use. You can refer to the below documentations to know more about the creation of such apps with the help of examples:
Hope this helps!

Catégories

En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by