nass-micro-station-measurem.../speedgoat-measurement/index.html

316 lines
8.0 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>
<!-- 2020-11-12 jeu. 10:30 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Vibrations induced by the translation stage motion</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">Vibrations induced by the translation stage motion</h1>
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org47ff289">1. Get data from the target computer</a></li>
<li><a href="#orgc235aed">2. Commands with the target object</a></li>
<li><a href="#org3891b86">3. FTP access to the target computer</a></li>
</ul>
</div>
</div>
<div id="outline-container-org47ff289" class="outline-2">
<h2 id="org47ff289"><span class="section-number-2">1</span> Get data from the target computer</h2>
<div class="outline-text-2" id="text-1">
<p>
We first copy the <code>dat</code> file from the target computer to the host computer:
</p>
<div class="org-src-container">
<pre class="src src-matlab">tg=slrt;
f=SimulinkRealTime.openFTP(tg);
mget(f, <span class="org-string">'DATA_001.dat'</span>, <span class="org-string">'local_folder'</span>);
close(f);
</pre>
</div>
<p>
We then import the <code>dat</code> file to the workspace:
</p>
<div class="org-src-container">
<pre class="src src-matlab">matlab_data = SimulinkRealTime.utils.getFileScopeData(<span class="org-string">'DATA_001.dat'</span>);
</pre>
</div>
</div>
</div>
<div id="outline-container-orgc235aed" class="outline-2">
<h2 id="orgc235aed"><span class="section-number-2">2</span> Commands with the target object</h2>
<div class="outline-text-2" id="text-2">
<p>
<a href="https://fr.mathworks.com/help/xpc/api/simulinkrealtime.target.html">https://fr.mathworks.com/help/xpc/api/simulinkrealtime.target.html</a>
</p>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left">Connect</td>
<td class="org-left">No Yes</td>
</tr>
<tr>
<td class="org-left">Status</td>
<td class="org-left">stopped runing</td>
</tr>
<tr>
<td class="org-left">start</td>
<td class="org-left">Start execution of real-time application on target computer</td>
</tr>
<tr>
<td class="org-left">stop</td>
<td class="org-left">Stop execution of real-time application on target computer</td>
</tr>
</tbody>
</table>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left">tg.viewTargetScreen</td>
<td class="org-left">Show target computer screen</td>
</tr>
</tbody>
</table>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left">ping</td>
<td class="org-left">Test communication between development and target computers</td>
</tr>
<tr>
<td class="org-left">reboot</td>
<td class="org-left">Restart target computer</td>
</tr>
<tr>
<td class="org-left">close</td>
<td class="org-left">Close connection between development and target computers</td>
</tr>
</tbody>
</table>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left">load</td>
<td class="org-left">Download real-time application to target computer</td>
</tr>
<tr>
<td class="org-left">unload</td>
<td class="org-left">Remove real-time application from target computer</td>
</tr>
</tbody>
</table>
<table border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides">
<colgroup>
<col class="org-left" />
<col class="org-left" />
</colgroup>
<tbody>
<tr>
<td class="org-left">addscope</td>
<td class="org-left">Create a scope of specified type</td>
</tr>
<tr>
<td class="org-left">getscope</td>
<td class="org-left">Return scope identified by scope number</td>
</tr>
<tr>
<td class="org-left">remscope</td>
<td class="org-left">Remove scope from target computer</td>
</tr>
<tr>
<td class="org-left">getlog</td>
<td class="org-left">Portion of output logs from target object</td>
</tr>
<tr>
<td class="org-left">importLogData</td>
<td class="org-left">Import buffered logging data to the active session of the Simulation Data Inspector</td>
</tr>
<tr>
<td class="org-left">getsignal</td>
<td class="org-left">Value of signal</td>
</tr>
<tr>
<td class="org-left">getsignalid</td>
<td class="org-left">Signal index from signal hierarchical name</td>
</tr>
<tr>
<td class="org-left">getsignalidsfromlabel</td>
<td class="org-left">Vector of signal indices</td>
</tr>
<tr>
<td class="org-left">getsignallabel</td>
<td class="org-left">Signal label for signal index</td>
</tr>
<tr>
<td class="org-left">getsignalname</td>
<td class="org-left">Signal name from index list</td>
</tr>
<tr>
<td class="org-left">getparam</td>
<td class="org-left">Read value of observable parameter in real-time application</td>
</tr>
<tr>
<td class="org-left">setparam</td>
<td class="org-left">Change value of tunable parameter in real-time application</td>
</tr>
<tr>
<td class="org-left">getparamid</td>
<td class="org-left">Parameter index from parameter hierarchical name</td>
</tr>
<tr>
<td class="org-left">getparamname</td>
<td class="org-left">Block path and parameter name from parameter index</td>
</tr>
<tr>
<td class="org-left">loadparamset</td>
<td class="org-left">Restore parameter values saved in specified file</td>
</tr>
<tr>
<td class="org-left">saveparamset</td>
<td class="org-left">Save real-time application parameter values</td>
</tr>
<tr>
<td class="org-left">startProfiler</td>
<td class="org-left">Start profiling service on target computer</td>
</tr>
<tr>
<td class="org-left">stopProfiler</td>
<td class="org-left">Stop profiling service on target computer</td>
</tr>
<tr>
<td class="org-left">getProfilerData</td>
<td class="org-left">Retrieve profile data object</td>
</tr>
<tr>
<td class="org-left">resetProfiler</td>
<td class="org-left">Reset profiling service state to Ready</td>
</tr>
<tr>
<td class="org-left">getDiskSpace</td>
<td class="org-left">Return free space and total space on the drive, in bytes</td>
</tr>
</tbody>
</table>
</div>
</div>
<div id="outline-container-org3891b86" class="outline-2">
<h2 id="org3891b86"><span class="section-number-2">3</span> FTP access to the target computer</h2>
<div class="outline-text-2" id="text-3">
<p>
<a href="https://fr.mathworks.com/help/xpc/api/simulinkrealtime.openftp.html?s_tid=doc_ta">https://fr.mathworks.com/help/xpc/api/simulinkrealtime.openftp.html?s_tid=doc_ta</a>
</p>
<p>
First run the following commands to have the <code>FTP</code> Object:
</p>
<div class="org-src-container">
<pre class="src src-matlab">tg=slrt;
f=SimulinkRealTime.openFTP(tg);
</pre>
</div>
<p>
Then, the <code>f</code> object can be used to access the filesystem on the target computer.
</p>
<ul class="org-ul">
<li><code>cd</code></li>
<li><code>dir</code></li>
<li><code>mget</code>: Used to download data from the target host. <code>f.mget('data.dat', 'local_folder')</code></li>
<li><code>mkdir</code></li>
<li><code>mput</code></li>
<li><code>rename</code></li>
<li><code>rmdir</code></li>
<li><code>close</code></li>
</ul>
</div>
</div>
</div>
<div id="postamble" class="status">
<p class="author">Author: Dehaeze Thomas</p>
<p class="date">Created: 2020-11-12 jeu. 10:30</p>
</div>
</body>
</html>