1、从MathWorks公司的官方网站上下载合适install addon. m以及smlink.r2010b. win64压缩文件;
2、不用解压,将压缩包所在路径设置为matlab路径,根据路径运行命令 install_addon('D:\\Program Files\\MATLAB\\R2010b\\toolbox\\smlink.r2010b.win64.zip') 3、使matlab成为自动服务器。在matlab中运行regmatlabserver,为了检查自动服务 器的运行状态,可使用命令enable service('AutomationServer',true) ; 4、安装solidworks插件:在matlab中运行命令smlink_linksw;
5、重新打开solidworks,在选项-插件-SimMechanics Link,如图:
6、将solidworks模型另存为.xml形式
7、在matlab中运行mech_import(‘Robot.xml’),结果如图:
选择.xml文件,
8、Ctrl+D,得仿真模型: