当前位置:网站首页>Modeling specifications: environment settings
Modeling specifications: environment settings
2022-06-27 01:01:00 【chhttty】
This article describes MAAB The meaning of modeling specification , At the same time, study the environment setting specification .
List of articles
1 Modeling specifications
Mathworks The company puts forward the following suggestions for the automotive industry MAAB Modeling specifications , By following the modeling specification , It can improve the readability of the model 、 Improve code generation quality . The model engineer should follow the modeling specification in the development process .
The modeling specification is divided into many chapters , Include naming conventions 、 Architecture specification 、 The module specification 、Stateflow Specification etc. . Be careful , Bloggers will not analyze it item by item in their subsequent articles MAAB Modeling specifications , But to study the more important part , And talk about how to realize it in practical application and why to do so in combination with work experience .
This article first describes the simplest environment construction specification .
2 Environment settings
2.1 Matlab edition
In the project development team , Make sure everyone uses the same version of Matlab.Matlab The software itself is updated twice a year , There are slight differences between different versions . for example , For the same model ,2015b Version and 2020a The code generated by version will be slightly different . Two people do the same code generation process , But the result is different , This is very risky . So the unified version bears the brunt .
stay Matlab in , Enter the following command to view the version and toolbox information :
>> ver
The following results will appear after entering :
2.2 Built in compiler
The team needs to be in Matlab Install the same compiler in , be used for Simulink Of S-Function Or call an external C Function compilation .
stay Matlab in , Enter the following instructions to view compiler information :
>> mex -setup
The following results will appear after entering :
As you can see, the installed compiler is MinGW64.
2.3 The model configuration
in addition , Project team members must use the same model configuration , To ensure that the same simulation results or the same code can be generated on different people's computers .
Click on Simulink Interface pinion , You can open the following configuration window . The same configuration means that every option here should be the same .
In order to achieve each installation Matlab All computers have the same configuration when modeling , There are two ways to do this .
2.3.1 Refer to the configuration in the data dictionary
A data dictionary can be created in the same directory of the model sldd file , In addition to the data , It can also store model configuration information .
Associate data dictionary through model , You can use the configuration file . here , If you open the pinion in the model again , You will be prompted that the configuration has referenced the data dictionary .
The advantage of this method lies in its fast loading speed , The disadvantage is that the configuration items cannot be found directly , But it is easy to tamper . therefore , If the team technology is stable , This method can be considered when the configuration item is not modified very much .
2.3.2 Import configuration when opening model
Many companies manage all configuration items in one table , Then when you open a model, configure the model through a script . The method is as follows :
1) First, you need to develop a form template Config.xlsx, The configuration properties and values are recorded ;
2) If you want the model to import the configuration after startup , Can be in Callback Of PostLoadFcn Edit import script in ;
Through this program , You can directly overwrite the configuration in the table after the model is opened .
3) If you want the model to start without importing the configuration ( Maybe just looking at the model , Don't want to wait for the import time ), Instead, engineers manually import before simulation , You can double-click the subsystem ;
In this way , As long as the Config.xlsx Form for version management , Then everyone gets the latest table import configuration , You can achieve the same configuration for everyone . Even if the configuration is temporarily modified for other authentication , The next time you open a model, you can import it according to the standard configuration in the template .
The specific script implementation process can refer to other bloggers' articles .
3 summary
Setting up the environment is the first step in the modeling specification , On this basis, the division of labor can be carried out to build models .
边栏推荐
猜你喜欢
Implementation of ARP module in LwIP
Find the minimum value in the rotation sort array ii[classical Abstract dichotomy + how to break the game left, middle and right are equal]
Lambda表达式
The [MySQL] time field is set to the current time by default
Lambda expression
其他服务注册与发现
Unable to create a folder to save the sketch: MKDIR sketch
How to control the quality of HD slip ring in the production process
Pet hospital management system based on SSMP
网络中的网络(套娃)
随机推荐
Redis detailed tutorial
【Mysql】时间字段默认设置为当前时间
其他服务注册与发现
Solution of idea hot start failure
网络中的网络(套娃)
Great health industry annual must attend event, 2022 Shandong International Great Health Industry Expo
Solve the problem that only one line of text is displayed or not displayed in u8glib
The most difficult 618 in history, TCL won the first place in both jd.com and tmall.com shares in the TV industry
leetcode 1143. Longest Commom Subsequence 最长公共子序列(中等)
高清滑环生产过程当中的质量如何把控
滑环选型选购时需要注意的技巧
memcached基础4
buuctf-pwn write-ups (6)
Law of Large Numbers
How to measure the thickness of glass substrate by spectral confocal
JS library for number formatting
解决unable to create a folder to save the sketch: mkdir sketch
气液滑环与其他滑环的工作原理有什么区别
Batch generate folders based on file names
大白话高并发(一)