MATLAB: Can I use protected models with Simulink Real-Time

ipmodelprotectedreal timesimulink

I am receiving some components from a supplier who can only send me protected models, and I want to run these models using Simulink Real-Time. When I try to build the model and connect to the target, however, I see the following error:
Target slrt unsupported for protected model <model name>
How can I fix this? Is there any way I can use protected models with Simulink Real-Time?

Best Answer

You can use protected models with Simulink Real-Time, although there are some limitations:
1) You cannot use protected models in External Mode.
2) There are several (mainly hardware functionality related blocks) in SLRT that are non-inlined S-functions, and these blocks cannot be inside a protected model.
3) You need a Simulink Real-Time license to create a protected model that can be run with Simulink Real-Time.
One thing that could cause the error is if the protected model is not set to have the correct code generation target. To create a protected model that can be run with Simulink Real-Time, in the Configuration Parameters of the protected model under Code Generation > System target file, the "slrt.tlc" option should be selected. If it is set to something else, this could be the cause of the error.