Stateflow fails to compile after calling Simulink from a Matlab script
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Stefan
el 11 de Oct. de 2013
Respondida: samir samir
el 20 de Jul. de 2016
I am trying to run a fairly complex hybrid vehicle model in Simulink, using Matlab2012b. The model has always worked fine until now. Today I created a Matlab script to call the model, run its initialization file, run the model, and gather some data for post-processing. This script ran successfully, once. On the second execution, Simulink failed to run, with the following error messages: Coder Error - unknown - Stateflow - Failed to create file: "model path".h Model error - unknown - Simulink - error using sf, error using construct_error(line 108), failed to create file: "...path and name...".h
What's more, when I try to run the model just in Simulink, it gives the same error. Normal, Accelerator, Rapid Accelerator give the same error. I tried the usual troubleshooting steps (restarts, mex -setup, clearing out slprj and mex32 files), and I re-installed the c++ compiler. Same error. I have tried running Matlab as administrator, and different versions of Matlab. Same error. It's like this model is set to no longer compile correctly.
I can run Matlab scripts and other Simulink models just fine. I have searched the forums and tried the other suggested solutions, but it hasn't fixed the problem. Any ideas out there??
0 comentarios
Respuesta aceptada
Zack Peters
el 25 de Oct. de 2013
Hi Stefan,
This is just a guess at this point but it could be possible that your path names are too long. The Windows maximum path length is 260 Characters. Is the model in a directory with a long filename or is the model name itself quite long?
If so then try renaming the model to a shorter name and move it into a directory with a shorter path name.
~Zack
Más respuestas (1)
samir samir
el 20 de Jul. de 2016
hello stefan,
I myself am currently designing a model of hybrid vehicle on Simulink matlab 2009
can you help me?
I arrived at the coupling phase.
I do not know how to continue?
I have designed vector control of the electric motor.
I modeled the battery, the chopper, the rectifier, the engine, the generatrice.
the rest I do not know how to combine these blocks via a DC bus and especially I have used a state flow control, (I'm beginner of stateflow) to simulate the states of this vehicle: stop startup, acceleration, braking (charging the battery ... etc).
at least is what you can advise me documentation for methodology forward to continue my project?
cordially. samir.
0 comentarios
Ver también
Categorías
Más información sobre Simulink Functions en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!