Hello friends hope you all are healthy and enjoying good health. In today's tutorial, I am going to share How to Protect Simulink Design in MATLAB and in order to do so I have used S Function method. In my previous post I have explained How to Protect your m-file Codes in MATLAB by converting it to p-file so that no one can reach to your code and now I am gonna explain how to protect your simulations in MATLAB which you create in Simulink so that your intellectual work wont go waste.There are many methods to protect the Simulink simulations and the easiest of them is using S-function. Now follow these simple steps and it won't be much difficult.
Protect Simulink Design in MATLAB
Open the simulation which you want to protect. Make sure you are done with the simulation and don't need any more editing. As after conversion you wont be able to edit it.
Now select whole of your simulation and right click on it.
Click on the Create Subsystem in right click listing.This will create a single block for your whole system.If you double click click this block a new window will pop up and you can see your whole model again.
Now right click on this newly created subsystem block and then in the listing click on Real Time Workshop and the Generate S-Function.
On clicking a new window will pop-up add variables if you want to control any otherwise just tick the corner which says Use Embedded Coder and hit Build.
It will take few seconds to build the S-function for your simulation and when its done Hurrah your simulation is now protected.
Now double click on your subsytem and you won't be able to open your design, instead a window pops up which will give some description.
You can add the complete description while generating your simulation.
Now start your simulation , it will work fine but no one could find your design.
Note :
This method is mostly used by the developers to protect their simulations.
Users can use their simulation but couldn't get the design of it, the design got fully protected.
syedzainnasir
I am Syed Zain Nasir, the founder of The Engineering Projects (TEP). I am a
programmer since 2009 before that I just search things, make small projects and now I am sharing my
knowledge through this platform. I also work as a freelancer and did many projects related to
programming and electrical circuitry. My Google Profile+Follow
Get Connected
Comments on ‘’ Protect Simulink Design in MATLAB ‘’ ( 1 )
0
pm
Says:
This protects your model against editing, but not from viewing. The C code is still visible in the generated files if you need to do code generation... and it isn't too hard to figure out the IP from the C code.
Reply