How to lock code generation support for specific simulink models/subsystems?
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Is it possible to lock specific models e.g. from a library for code generation to avoid reuse in productive code - only use them in Simulink simulations?
1 Kommentar
Sai Teja G
am 23 Aug. 2023
Hi Simon, can you give more details for what exactly you are looking for?
Antworten (1)
Yatharth
am 30 Aug. 2023
Hi Simon, I understand you want to protect a simulink block/model so that it is only used during simulation and is not used while code generation.
Simulink provides a feature called "Model Protection" that allows you to lock models and restrict their usage. Here is how you can use it:
- Open the model that you want to lock in Simulink.
- Go to the "Model Block" tab in the Simulink Editor.
- You will find the "Protection" section.
- In the "Protection" section, check the relevant options (Simulate / Generate Code) .
- Optionally, you can set a password to further restrict access to the locked model. Enter the password in the "Password" field.
- Click "OK" to save the changes and lock the model.
Once the model is locked, it cannot be modified or regenerated for code generation. However, it can still be used for simulations within Simulink.
Siehe auch
Kategorien
Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!