This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Reference Protected Models from Third Parties

A protected model provides third parties with the ability to deliver a model without revealing the intellectual property in the model. A protected model is a referenced model that does not support editing. The protected model creator can enable read-only view, simulation, and code generation for a protected model. A protected model uses encryption technology for an operation only when its creator enables password protection for the operation. Enabling password protection for an operation protects the supporting file contents using AES-256 encryption. Creating a protected model requires a Simulink® Coder™ license.

To locate protected models, look for:

  • Files in the MATLAB® Folder Browser with a badge icon.

  • Model blocks with a badge icon in the lower left corner.

  • Files with an .slxp extension.

Note

Protected models do not appear in the model hierarchy in the Model Explorer.

View Protected Model Contents

You can view block and line information in the protected model if:

  • The protected model supports read-only view.

  • Read-only view is not password protected, or you have the password to authorize access. To authorize access, right-click the protected-model badge icon and select Authorize. In the Model view box, enter the password, then click OK.

  • You have access to the licenses used in the protected model. The protected model report shows the required licenses. To open the report, right-click the protected-model badge icon and select Display Report. If the report is available, you can view the required licenses in the Summary of the report in the Licenses table.

To open read-only view, double-click the Model block referencing the protected model or the .slxp file in the Current Folder browser. To view block parameters, click a block in the read-only view. To view Model and Subsystem block contents, double-click the block or navigate to the block using the View All tab. You cannot view protected referenced model contents.

Protected Model Simulation Requirements

Before you reference a protected model for simulation, make sure that the model meets these simulation requirements.

  • The protected model supports simulation.

  • Simulation is not password protected, or you have the password to authorize access. To authorize access, right-click the protected-model badge icon and select Authorize. In the Model view box, enter the password, then click OK.

  • You have access to the licenses used in the protected model. The protected model report shows the required licenses. To open the report, right-click the protected-model badge icon and select Display Report. If the report is available, you can view the required licenses in the Summary of the report, in the Licenses table.

  • You are using the same platform and version of Simulink used to create the protected model. The software stores the protected model as a compiled MEX binary.

  • You reference the protected model in a Model block that executes in Normal, Accelerator, or Rapid Accelerator mode.

  • The protected model is on the MATLAB path.

  • The protected model does not use noninlined S-functions directly or indirectly.

  • The Model block provides the values needed by any defined model arguments.

  • The Model block connects to the protected model using input and output signals that match the input and output signals of the protected model.

Reference a Protected Model

To reference a protected model, complete this workflow:

  1. If you received a protected model package, unpack files according to accompanying directions.

  2. If you received a MAT-file, load the MAT-file containing workspace definitions. You can configure a callback function, such as LoadFcn, to load the MAT-file automatically. See Callbacks for Customized Model Behavior.

  3. If you received a harness model, copy the Model block from the harness model into your model. Otherwise, reference the protected model in a Model block. When you set a Model block to reference a protected model, the Simulation mode of the block becomes Accelerator. You cannot change this mode or use this Model block in External mode.

  4. If the protected model is password protected, right-click the protected-model badge icon and select Authorize. In the Model view box, enter the password, then click OK.

  5. Connect signals to the Model block that match its input and output port requirements. See Model Reference Interface.

  6. Provide any needed model argument values. See Parameterize a Referenced Model.

See Also

Blocks

Related Examples

More About