ADAMS 2012 and Matlab 2012 Co-Simulation error
显示 更早的评论
Dear all I want to Co-simulate an Adams model provided by MD_ADAMS 2012 x64 with Matlab Simulink r2012a but there is a problem. that is: when I run the Simulink block diagram that contains adams plant I see the following error message>> Error in S-function 'testmecanum/adams_sub/ADAMS Plant/S-Function': S-Function 'adams_plant' does not exist. Any body know how can I overcome this problem?
All the best
采纳的回答
更多回答(2 个)
mohammad ebrahimy
2021-12-18
0 个投票
Hi
I've been trying to connect adams with simulink using adams controll plugin
and i dealt with different errors from simulink, and sometimes simulnk crashed without any error displayed.
finally i solved it by observing these notes:
1. pick a good "working directory" in your adams model. so you better not to set your working directory inside adams software or adams instalation file directory. also no extera files should be in that folder, just your adams model simulink files and those files created by adams controll should be there. you can change working directory in your model choose: files - select directory.
2. in adams controll plant setting, do not write anything for "user define library name" just keep it blank. also the "adams Host name" must be the name of your computer in case your model created on another computer, you should change it.
3. if you have this error in adams: "There are (number of) objects named "character" in the database", you just need to run a simple simulation to renew it.
4. if you built connection files using adams controll plant in the past you cannot built it again since adams dosen't remove previous files, you should remove all the previous files and/or other adams control project files then press ok.
5. DO NOT PRESS SAVE IN adams_sys.slx I did that once and it corrupt my adams instalation files (if you have same problem, go to 8) . you better not run it, just copy the orange block in your simulink model.
6. before runing simulink model make sure matlab current folder is your working directory. if not, you should run the m file built by adams and then press "change folder".
7. sometimes adams version and matlab version are not Compatible. (I tried to connect adams 2020 with matlab 2014 and failed but adams 2020 with matlab 2016 worked properly.)
8. if you think you might damaged your adams files. you can repair it with adams CD or Installation file.
9. some of my notes are not needed so if you run the simulink without error you don't need to change anything else so good luck.
类别
在 帮助中心 和 File Exchange 中查找有关 Downloads 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!