Stateflow fails to compile after calling Simulink from a Matlab script
5 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Zack Peters
2013 年 10 月 25 日
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
その他の回答 (1 件)
samir samir
2016 年 7 月 20 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Simulink Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!