We have received a plant model from a customer which has used s-function to replace some of original Simulink blocks. We can use the model for PC based simulation (with mexw32 files included). My question is if I can use the s-function to RTW build an executable code for a HIL system (such as Opal-RT or Pi Autosim). I did try it and it seems not working. I think to build an executable code for a HIL system, we may need either original Simulink model or all .c/.h files while generating the s-function. Is my understanding correct? Thanks for answer and suggestions.
MATLAB: Are .mexw32 files enough to build RTW code
rtw build using s-function
Best Answer