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

15 次查看(过去 30 天)
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

回答(1 个)

Ayush
Ayush 2024-7-24
编辑:Ayush 2024-7-24
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!

类别

Help CenterFile Exchange 中查找有关 Programmatic Model Editing 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by