当前位置:网站首页>Amesim2016 and matlab2017b joint simulation environment construction
Amesim2016 and matlab2017b joint simulation environment construction
2022-07-07 22:30:00 【Eva215665】
Refer to the following blog :JaySur 's blog post
1 compiler
If you want to carry on Amesim And Matlab Co simulation , It is necessary to determine the compiler as the joint medium of the two (Compiler). Want to be with Matlab Conduct joint simulation , Best use Microsoft Visual C++ The compiler for both .
1.1 Inquire about AMESim16 Supported by VS edition
open AMESim16 Help document , Search for visual studio, The following figure is obtained . It can be seen that ,Windows 64 Supported by the system ,AMESim16 Supported compilers include Microsoft Visual Studio 2010-2013, Professional edition or Standard Edition . Choose here Microsoft Visual Studio 2013.
1.2 Inquire about MATLAB Supported compiler versions
Inquire about MATLAB Supported by VS edition :MATLAB What each version can support VS Compiler can pass This address The query .
You can find ,Matlab 2018b Start , No more right VS2013 And the following compilers . therefore , If you want to Amesim16 And MATLAB Co simulation , be MATLAB It's best not to exceed 2018a, Select the MATLAB The version is MATLAB 2017b.
1.3 Installation sequence
The software to be installed is :
- Microsoft Visual Studio 2013 pro
- matlab 2017b
- Amesim16
The recommended installation sequence is VS2013->matlab2017->Amesim2016. Because of the installation Amesim when , It finds that Visual Studio compiler , It will bring Visual Studio Copy some files under the installation directory to Amesim Installation directory .
Besides , There may also be a problem : The original machine has been installed matlab2018b, At first, I installed it without care vs2013 and amesim, It turned out matlab2018 I won't support it vs2017, So it was unloaded matlab2018 After loading matlab2017, however amesim Can't find matlab The startup path of , Show
windos No files found ’C:\Program Files\MATLAB2018\bin\win32\matlab.exe’
This is obviously because the value of the system environment variable has not been modified , Lead to windows System not found matlab2017 The startup path of . therefore , Recommended installation sequence vs2013->matlab2017->amesim
On this machine ,
- VS2013 The installation path of is
C:\Program Files (x86)\Microsoft Visual Studio 12.0
- Amesim16 The installation path is :
C:\Program Files\Simcenter\v1600\
Friendship tips : There may be an unsuccessful installation , Which leads to multiple uninstallations and installations ,Amesim stay windows10 Installation under system , Unable to get 【 Control panel 】->【 Uninstall program 】 uninstall , You need to use your own uninstall tool . The location of the built-in unloading tool is %your path%\Amesim
, Take this machine as an example , The uninstall tool is located at C:\Program Files\Simcenter\v1600\Amesim
, It's a windows Batch file , full name :AMEUninstall.bat
.
Running this file will uninstall Amesim16, But there are some problems of incomplete file deletion , You need to manually delete the entire Simcenter
Folder .
2 install VS2013
There is only one problem to pay attention to here ,vs2013 Be sure to install the English version , Chinese version of vs2013 It can lead to Amesim There is garbled code when compiling the model .
If you have installed vs2013 English version , Please ignore the following .
If your machine is equipped with vs2013 Chinese version , You can install an English language pack , And then vs2013 Of 【 Tools 】->【 Environmental Science 】->【 Zone setup 】->English Medium change , Detailed as follows .
- vs2013 English language pack : Download link Extraction code :gwto , After downloading , double-click .exe Files installed , All the way next that will do .
- open vs2013, Click on 【 Tools 】->【 Environmental Science 】( Forget to cut the Chinese version of the picture , Replace with the switched English interface )
- Click on 【 Zone setup 】->【English】
- close vs2013 After and restart , Language switching succeeded !
3 install Amesim2016
Amesim Refer to the following two links for the installation of : Reference link 1, Reference link 2
Amesim2016 After decompressing , The file structure is as follows , The path of this structure is E:\AMESIM2016\ENsImaLR16\Siemens.Simcenter.Amesim.16.0-SSQ
. among ,_SolidSQUAD_
It contains the required documents ,Siemens.Simcenter.Amesim.16.0.iso
Is to install the image .
step 1
take E:\AMESIM2016\ENsImaLR16\Siemens.Simcenter.Amesim.16.0-SSQ\_SolidSQUAD_\Win64\_SolidSQUAD_
Under the position LMS_RLM_Server
Copy the folder to the specified location , Copy it here to C Under the root directory .
Right mouse click server_install.bat
choice 【 Run as administrator 】, Installation services .
step 2
After the service is installed , Double click to open the CD image file in the installation package Siemens.Simcenter.Amesim.16.0.iso
step 3
Right click administrator to run setup_win.bat
file
step 4
Choose to install the product Simcenter Amesim
, stand-alone 【next】
step 5
All the way 【next】
step 6
【User name】 and 【Organization】 Feel free to fill in , But it must be in English .
activation code by 【DIGJW72BDR29WJ20HVQ60C721】, Files available in the installation package readme_windows.txt
View in , The location of the file is E:\AMESIM2016\ENsImaLR16\Siemens.Simcenter.Amesim.16.0-SSQ\_SolidSQUAD_\Win64
After filling in, stand alone 【next】, And all the way 【next】
step 7
The installation position is optional , I usually install by default , Do not change the installation position
Step 8
Click on 【install】## Step 9
A prompt will pop up , If there is no... In the computer JAVA runtime environment, Need to install . Because I have... On my computer java Environmental Science , So direct 【OK】
Step 10
Waiting for the installation ...
Step 11
Click on 【next】
Step 12
Installation tips are shown in the figure , It can be found that 【Microsoft Visual C++】, You can make subsequent settings , Realization MATLAB Co simulation , Click on 【next】, And all the way 【next】
Step 13
In the license configuration interface , Select license configuration interface , choice 【Specify [email protected]】, Input 【[email protected]】
Step 14
choice 【No, I will restart my computer later】, Click on 【Finish】
Step 15
Create system variables , Variable name 【AME】, Variable value is Aesim The installation path , This machine is C:\Simcenter\v1600\Amesim
Create system variables [email protected]
Step 16
start-up Amesim when , Run as administrator first C Under the root directory rlm.exe.
By the way, explain 【server_remove.bat】【server_install.bat】 Two documents , They are removal and installation RLM server Of windows Batch file , If you need to delete RLM server, Then run 【server_remove.bat】.
Run the following , Don't close this .
Restart Amesim
4 install matlab2017b And configure the simulation environment
matlab2017 The download and installation of is extremely simple , See link , No more details here .
4.1 Environment variable configuration
When setting the simulation environment , Pay attention to the following environment variables , These environment variables , Some are added automatically when installing the software , Some need to be added manually , So check your list of environment variables .
4.2 MATLAB Compiler settings
Start by opening Matlab 2017b, Enter... In the command window : mex -setup
choice mex setup C++
, as follows
5 Possible problems
5.1 Amesim “Failed to connect to the license server”, What do I do ?
The problem is the license ,Amessim 2016 Your license needs to run RLM.exe. Solution reference :
Reference resources 1, Reference resources 2, Reference resources 3, Reference resources 4
function C Under the packing directory rlm.exe
To start a serve, If you are prompted
Web server starting on port 5053
(rlm) Port 5053 in use, waiting…
(rlm) Port 5053 in use, waiting…
(rlm) Port 5053 in use, waiting…
take [email protected] The value of this environment variable is changed to [email protected], or [email protected],[email protected] This is changed to [email protected]
If it still exists Port 5052 in use, waiting… The situation of , Check whether the task manager has other rlm process , Please close .
meanwhile , take C:\LMS_RLM_Server
Next LMS.lic
One sentence in the document is changed to HOST localhost ANY 5052
5.2 Amesim LMS License Error What do I do ?
The problem is not started LMS Server caused , please C:\LMS_RLM_Server
Under the table of contents rlm.exe
This file .
5.3 Amesim What if the code is garbled when compiling the model ?
If you encounter amesim There is garbled code when compiling the model , Modify system not unicode The software language is English , At the same time guarantee vs2013 Install for English .
5.4 Amesim It won't start MATLAB, What do I do ?
Here's the picture , stay Amesim Click on the Tools->Matlab after , Appear below
This problem is due to the incorrect setting in the system environment variable matlab route , Lead to amesim( That's the system ) Can't find matlab Start position . Because I first installed matlab2018b, As the configuration of the joint simulation environment requires , After uninstallation, it is installed matlab2017b, But the value of the system environment variable has not been changed , Lead to amesim2016 I only know the original address . The solution is 4.1 Subsection , Pay attention to setting environment variables .
6 verification
Now let's verify whether the Simulink environment can run .
- open 【AMESim 16->Help->Help】 in , Enter 【simulink】, open 【Hybrid_bus_steps_simulink】 routine :
- Click on 【Amesim 16-Tools-MATLAB】, It will turn on automatically 【MATLAB 2017b】, And automatically add 【AMESIM】 The relevant path to 【MATLAB PATH】 in , Then it will open automatically 【Hybrid_bus_steps_simulink.mdl】.( Be careful , The 【.mdl】 Must be 【matlab 2016b】 And above versions can be opened .)
- 【MATLAB】 Open the interface
- Back to 【Amesim 16】, Click on 【SIMULATION】, It will compile the model
- After compiling , In this model directory, it will generate 【.mexw64】 Wait for the documents , This is a necessary document for the joint module
- stay 【Amesim 16】 After compiling , Back to 【Simulink】 in , Click on 【Run】 that will do ( Here, the simulation time is changed from 【inf】 Change it to 【30s】 了 , If it is the original routine 【inf】, It will not stop .
----------------------------------------------------- The end , And the flower !------------------------------------------------------
--------------------------------------------------- If you have any questions, please leave a message for discussion --------------------------------------------------
边栏推荐
- Reinforcement learning - learning notes 9 | multi step TD target
- php 记录完整对接腾讯云直播以及im直播群聊 所遇到的坑
- The function is really powerful!
- Why can't win11 display seconds? How to solve the problem that win11 time does not display seconds?
- Antd date component appears in English
- SAR image quality evaluation
- 微服务架构开源框架详情介绍
- Where is the big data open source project, one-stop fully automated full life cycle operation and maintenance steward Chengying (background)?
- Welcome to CSDN markdown editor
- TCP/IP 协议栈
猜你喜欢
【Azure微服务 Service Fabric 】在SF节点中开启Performance Monitor及设置抓取进程的方式
OpenGL configuration vs2019
TCP/IP 协议栈
IP网络主动测评系统——X-Vision
Display optimization when the resolution of easycvr configuration center video recording plan page is adjusted
[environment] pycharm sets the tool to convert QRC into py file
微服务远程Debug,Nocalhost + Rainbond微服务开发第二弹
[JDBC Part 1] overview, get connection, CRUD
Tcp/ip protocol stack
Record a garbled code during servlet learning
随机推荐
Record layoutrebuild Forcerebuildlayoutimmediate does not take effect
Revit secondary development - link file collision detection
微服务架构开源框架详情介绍
Use partial derivatives to display normals in unity
UWA问答精选
Display optimization when the resolution of easycvr configuration center video recording plan page is adjusted
强化学习-学习笔记9 | Multi-Step-TD-Target
Preparing for the interview and sharing experience
How to choose the appropriate automated testing tools?
Add get disabled for RC form
海外代理推荐
Why can't win11 display seconds? How to solve the problem that win11 time does not display seconds?
Revit secondary development - operation family documents
The free styling service of Dyson's official direct store is now open for appointment. Pioneer Technology interprets the styling concept of hair care and helps consumers unlock diversified and shiny s
Crawler (17) - Interview (2) | crawler interview question bank
Variables and constants
Remove the default background color of chrome input input box
How to judge whether the input content is "number"
OpenGL configure assimp
Revit secondary development - cut view