Protected Model Creator
Specify model protection options and protect model
Renamed from Create Protected Model in R2024a
Description
The Protected Model Creator lets you create a protected model
(.slxp
).
When you protect a model, you can allow the recipient of the protected model to:
Simulate a model that includes the protected model in normal, accelerator, rapid accelerator, or external mode.
Open a read-only web view of the model, including model contents and block parameters. Creating a read-only web view of the model requires a Simulink® Report Generator™ license.
Generate C and C++ code for a model that includes the protected model, if you have a Simulink Coder™ license.
Generate HDL code for a model that includes the protected model, if you have an HDL Coder™ license.
Generate code for the protected model through the standalone interface, if you have an Embedded Coder® license and specify an ERT-based system target file for the model.
You can optionally password-protect each option. If you choose password protection for one of these options, the software protects the supporting files by using AES-256 encryption. Before you create a protected model, consider how the third party will use the model. For best practices, see Best Practices for Creating Protected Models.
Open the Protected Model Creator
How you open the tool depends on whether you want to protect a referenced model or the top model.
To protect a referenced model, select a Model block that references the model you want to protect. In the Simulink Toolstrip, on the Model Block tab, click Protect.
To protect the top model, in the Simulink Toolstrip, on the Simulation tab, click the Save button arrow. Then, select Protected Model.
Examples
Parameters
Tips
To create a protected model programmatically, use the
Simulink.ModelReference.protect
function.This function provides options that the Protected Model Creator does not support. For example, you can create a modifiable protected model, add callbacks to the protected model, sign the protected model with a digital certificate, and add a postprocessing function for protected model files.
When you create a protected model with this function, you must specify whether to generate the protected model report. The function does not generate this report by default.
The Protected Model Creator caches your settings for a model during a MATLAB session. If you close and reopen the Protected Model Creator, the cached settings persist. To restore the default settings, click Reset. Passwords and tunable parameter selections are not cached. (since R2023b)