- Import your custom C code into Simulink using a C MEX S-Function block.
- Open Simulink Test Manager and create a new test using "Create Test for Model Component".
- Select the option "Perform back-to-back testing".
- Set Simulation 1 to Normal mode to run the Simulink submodel.
- Set Simulation 2 to Software-in-the-Loop (SIL) mode to run your custom C code.
- Make sure your C code setup supports SIL execution (compiled correctly and compatible with Simulink).
- Run the test to automatically compare outputs from both implementations.
How to perform back-to-back Testing of C-custom code in Simulink
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I am about to use Simulink test for custom C code within simulink. In Simulink model I implemented my submodel and as well I have created its C-source code equivalnt. Now I would like to test my own created code against Simulink submodel.
I am trying to use Simulink test manager for it and configure it for back-to-back testing...
Can I specify and refer to my own code ?

I suppose to run my submodel in parallel with custom C code.
0 Commenti
Risposte (1)
Shishir Reddy
il 21 Lug 2025
Hi Jack
Kindly refer to the following points to gain understanding on performing back-to-back testing between the Simulink submodel and the custom C code in Simulink Test Manager.
For more information regarding Simulink Test Manager, kindly refer the following documentation - https://www.mathworks.com/help/sltest/ref/simulinktestmanager.html
I hope this helps
0 Commenti
Vedere anche
Categorie
Scopri di più su Outputs in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!