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.
Best Answer