mexPrintf() not working from within mdlStart method of C Mex S-Function
Mostrar comentarios más antiguos
Hi There,
I'm trying to perform some debugging with a C MEX S-Function in Simulink but both mexPrintf() and ssPrintf() do not print anything to either the command window or the diagnostic viewer when called within the mdlStart method. Both mexPrintf() & ssPrintf() work within the mdlOutputs() & mdlTerminate() methods. Is there another function I should be using to print custom debugging messages from within the mdlStart() method?
static void mdlStart(SimStruct *S)
{
//Both of these following lines fail to print to either command window or diagnostic viewer
mexPrintf("Test test");
ssPrintf("Test text");
}
2 comentarios
Yongjian Feng
el 5 de Jul. de 2021
Can you use an external debuger instead? Use gdb or visual studio to attach to the matlab process, and then you can put a break point in this function.
Chris Morley
el 5 de Jul. de 2021
Respuestas (0)
Categorías
Más información sobre Simulink en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!