필터 지우기
필터 지우기

How to protect a subsystem but still change it programmatically?

조회 수: 2 (최근 30일)
Mihir Tasgaonkar
Mihir Tasgaonkar 2022년 12월 2일
답변: Amal Raj 2023년 3월 20일
I am looking to interact between a Simulink model and a MATLAB App GUI, where I use the app to update calibratable values of the model and rebuild it programmatically. However, I do not want to let the user view the model, so I tried protecting the model and interacting with it through the app. I'm using a data store memory block to calibrate the values of certain parameters in the model, but once I protect the model, I am unable to update the values of the data store memory blocks from the GUI.
I have also tried to generate an app from the model using simulink.compiler.genapp function, but it throws up error:
Error using Simulink.BlockDiagram.buildRapidAcceleratorTarget
Unable to build a standalone executable to simulate the model 'BCM_Base_SW_V1_4' in rapid accelerator mode.
My goal is to use the GUI only to update and rebuild the model, but I don't want to grant access of the model to the end-user. Can anyone help out with this?

답변 (1개)

Amal Raj
Amal Raj 2023년 3월 20일
If you want to protect a subsystem in Simulink but still be able to update it programmatically, you can use a protected model reference. This way, the user won't be able to see the contents of the subsystem, but you can still programmatically access and modify it.

카테고리

Help CenterFile Exchange에서 Subsystems에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by