How to protect custom block library to conceal the internals of the blocks from 3rd party?

7 次查看(过去 30 天)
I have a custom block library to be published. The library contains several custom blocks (masked subsystems) whose content should be hidden from 3rd party. I want my blocks to be similar to the original Simulink blocks from users' point of view, so that the users double-click and can set block parameters and can do simulations using the blocks but cannot see the internals of the blocks.
I hope there is an easy way to protect all of the blocks in a custom library via a single setting. To be honest, I have looked for a section like protecting custom libraries in create custom library help page.
What is the best way to do this? I have read about protecting models and I think, as the name suggests, this method is more suitable to models than custom libraries.
  2 个评论
Thenmozhi Mayakrishnan
Hi TK,
Can you please update if you have protected your library blocks. I also have to protect my library from 3rd party, but not finding easy way to acheive it. Your feedback will help me.
Thanks in Advance.
Ravi
Ravi 2023-5-25
编辑:Ravi 2023-5-25
Have you got any best way to protect custom library from 3rd Party? I am also looking for a solution.
@MathWorks Support Team Could you please provide any documentation or tutorial? It will be a great help for the MATLAB users community.
Thanks.

请先登录,再进行评论。

回答(1 个)

Sachin Lodhi
Sachin Lodhi 2024-3-4
Hello, based on what you've described, you're looking to secure a custom library in Simulink. Here's the procedure you should follow to achieve this:
  1. Develop the desired functionality within a model.
  2. In your library, include a reference to this model by utilizing a Model block.
  3. Convert the Model block within your library into a protected model, ensuring the library block points to the resulting .slxp file.
  4. Transform the protected model within your library into a subsystem and apply a mask to it to accommodate any necessary parameters.
  5. This library block can now be incorporated into any model, where it will maintain a connection to the original library while keeping its contents secure.
Please note that using this method, when shipping the library, you will have to send both the library file and the .slxp files for the protected blocks. Please ensure to check the 'Argument' option in Model Explorer -> Model -> Model Workspace in order to be able to input values into the mask. Additionally, the following documentation link can be used to understand how to protect a block in Simulink: https://www.mathworks.com/help/rtw/ug/create-a-protected-model-using-the-model-block-context-menu.html

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by