91 lines
3.5 KiB
HTML
91 lines
3.5 KiB
HTML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
|
<head>
|
|
<!-- 2021-01-08 ven. 15:30 -->
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
|
<title>Simulink Project for the Stewart Simscape folder</title>
|
|
<meta name="generator" content="Org mode" />
|
|
<meta name="author" content="Dehaeze Thomas" />
|
|
<link rel="stylesheet" type="text/css" href="https://research.tdehaeze.xyz/css/style.css"/>
|
|
<script type="text/javascript" src="https://research.tdehaeze.xyz/js/script.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="org-div-home-and-up">
|
|
<a accesskey="h" href="./index.html"> UP </a>
|
|
|
|
|
<a accesskey="H" href="./index.html"> HOME </a>
|
|
</div><div id="content">
|
|
<h1 class="title">Simulink Project for the Stewart Simscape folder</h1>
|
|
<p>
|
|
A Simulink Project is used for the study of Stewart platforms using Simscape.
|
|
</p>
|
|
|
|
<p>
|
|
From the <a href="https://mathworks.com/products/simulink/projects.html">Simulink project</a> mathworks page:
|
|
</p>
|
|
<blockquote>
|
|
<p>
|
|
Simulink® and Simulink Projects provide a collaborative, scalable environment that enables teams to manage their files and data in one place.
|
|
</p>
|
|
|
|
<p>
|
|
With Simulink Projects, you can:
|
|
</p>
|
|
<ul class="org-ul">
|
|
<li><b>Collaborate</b>: Enforce companywide standards such as company tools, libraries, and standard startup and shutdown scripts. Share your work with rich sharing options including MATLAB® toolboxes, email, and archives.</li>
|
|
<li><b>Automate</b>: Set up your project environment correctly every time by automating steps such as loading the data, managing the path, and opening the models.</li>
|
|
<li><b>Integrate with source control</b>: Enable easy integration with source control and configuration management tools.</li>
|
|
</ul>
|
|
</blockquote>
|
|
|
|
<p>
|
|
The project can be opened using the <code>simulinkproject</code> function:
|
|
</p>
|
|
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> simulinkproject(<span class="org-string">'../'</span>);
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
When the project opens, a startup script is ran.
|
|
The startup script is defined below and is exported to the <code>project_startup.m</code> script.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> project = simulinkproject;
|
|
projectRoot = project.RootFolder;
|
|
|
|
myCacheFolder = fullfile(projectRoot, <span class="org-string">'.SimulinkCache'</span>);
|
|
myCodeFolder = fullfile(projectRoot, <span class="org-string">'.SimulinkCode'</span>);
|
|
|
|
Simulink.fileGenControl(<span class="org-string">'set'</span>,...
|
|
<span class="org-string">'CacheFolder'</span>, myCacheFolder,...
|
|
<span class="org-string">'CodeGenFolder'</span>, myCodeFolder,...
|
|
<span class="org-string">'createDir'</span>, <span class="org-constant">true</span>);
|
|
|
|
<span class="org-matlab-cellbreak"><span class="org-comment">%% Load the Simscape Configuration</span></span>
|
|
load(<span class="org-string">'mat/conf_simscape.mat'</span>);
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
When the project closes, it runs the <code>project_shutdown.m</code> script defined below.
|
|
</p>
|
|
<div class="org-src-container">
|
|
<pre class="src src-matlab"> Simulink.fileGenControl(<span class="org-string">'reset'</span>);
|
|
</pre>
|
|
</div>
|
|
|
|
<p>
|
|
The project also permits to automatically add defined folder to the path when the project is opened.
|
|
</p>
|
|
</div>
|
|
<div id="postamble" class="status">
|
|
<p class="author">Author: Dehaeze Thomas</p>
|
|
<p class="date">Created: 2021-01-08 ven. 15:30</p>
|
|
</div>
|
|
</body>
|
|
</html>
|