[WIP] Breaking Change - Use Update

Folder name is changed, rework the html templates
Change the organisation.
This commit is contained in:
2019-05-10 16:06:43 +02:00
parent 8d8c03773c
commit 6e3677eb29
162 changed files with 3800 additions and 582492 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,80 @@
* Usefull Simulink Real Time commands
* Get data from the target computer
We first copy the =dat= file from the target computer to the host computer:
#+begin_src matlab
tg=slrt;
f=SimulinkRealTime.openFTP(tg);
mget(f, 'DATA_001.dat', 'local_folder');
close(f);
#+end_src
We then import the =dat= file to the workspace:
#+begin_src matlab
matlab_data = SimulinkRealTime.utils.getFileScopeData('DATA_001.dat');
#+end_src
* Commands with the target object
https://fr.mathworks.com/help/xpc/api/simulinkrealtime.target.html
| Connect | No Yes |
| Status | stopped runing |
| start | Start execution of real-time application on target computer |
| stop | Stop execution of real-time application on target computer |
| tg.viewTargetScreen | Show target computer screen |
| ping | Test communication between development and target computers |
| reboot | Restart target computer |
| close | Close connection between development and target computers |
| load | Download real-time application to target computer |
| unload | Remove real-time application from target computer |
| addscope | Create a scope of specified type |
| getscope | Return scope identified by scope number |
| remscope | Remove scope from target computer |
| getlog | Portion of output logs from target object |
| importLogData | Import buffered logging data to the active session of the Simulation Data Inspector |
| getsignal | Value of signal |
| getsignalid | Signal index from signal hierarchical name |
| getsignalidsfromlabel | Vector of signal indices |
| getsignallabel | Signal label for signal index |
| getsignalname | Signal name from index list |
| getparam | Read value of observable parameter in real-time application |
| setparam | Change value of tunable parameter in real-time application |
| getparamid | Parameter index from parameter hierarchical name |
| getparamname | Block path and parameter name from parameter index |
| loadparamset | Restore parameter values saved in specified file |
| saveparamset | Save real-time application parameter values |
| startProfiler | Start profiling service on target computer |
| stopProfiler | Stop profiling service on target computer |
| getProfilerData | Retrieve profile data object |
| resetProfiler | Reset profiling service state to Ready |
| getDiskSpace | Return free space and total space on the drive, in bytes |
* FTP access to the target computer
https://fr.mathworks.com/help/xpc/api/simulinkrealtime.openftp.html?s_tid=doc_ta
First run the following commands to have the =FTP= Object:
#+begin_src matlab
tg=slrt;
f=SimulinkRealTime.openFTP(tg);
#+end_src
Then, the =f= object can be used to access the filesystem on the target computer.
| cd | | |
| dir | | |
| mget | Used to download data from the target host | =f.mget('data.dat', 'local_folder')= |
| mkdir | | |
| mput | | |
| rename | | |
| rmdir | | |
| close | | |
* ELMO
tutorials: https://www.elmomc.com/products/application-studio/easii/easii-tutorials/

View File

@@ -0,0 +1,53 @@
%%
Tsim = 100; % [s]
%%
tg = slrt;
%% TODO - Build this application if updated
%%
if tg.Connected == "Yes"
if tg.Status == "running"
disp('Target is Running, Stopping...');
tg.stop;
while tg.Status == "running"
pause(1);
end
disp('Target is Stopped');
end
if tg.Status == "stopped"
disp('Load the Application');
tg.load('measure_channels');
%% Run the application
disp('Starting the Application');
tg.start;
pause(Tsim);
tg.stop;
end
else
error("The target computer is not connected");
end
%%
f = SimulinkRealTime.openFTP(tg);
cd(f, 'data/measure_channels/');
mget(f, 'data_001.dat', 'data');
close(f);
data = SimulinkRealTime.utils.getFileScopeData('data/data_001.dat').data;
%%
n = 19;
while isfile(['mat/data_', num2str(n, '%03d'), '.mat'])
disp('File exists.');
if input(['Are you sure you want to override the file ', 'mat/data_', ...
num2str(n, '%03d'), '.mat', ' ? [Y/n]']) == 'Y'
break;
end
n = input('What should be the measurement number?');
end
save(['mat/data_', num2str(n, '%03d'), '.mat'], 'data');

Binary file not shown.