-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.rtailab
119 lines (81 loc) · 4.23 KB
/
README.rtailab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
Support for Matlab/Simulink/RTW in RTAI User Space
==================================================
This directory contains the support files required to run in hard/soft
real-time a code generated from a Matlab/Simulink/RTW model. The Matlab
version supported is 6.5 Release 13. The support has been completely
re-written using "net_rpc" and it is thus native to RTAI: no more VxWorks
wrappers. The code is generated as a standalone executable, so Matlab/RTW
is used only to build the Simulink model and to create the corresponding
[*.c,*.h] files. Its external mode is now to be carried out wholly by
RTAI-Lab.
If you are familiar with RTW, and you must, it will not be difficult to
understand what follows.
What you find in this directory
===============================
- rtai.tlc: is the Target Language Compiler file to be used for RTAI.
- rtai.tmf: is the template Makefile to be used in Matlab/RTW. In this file
you should check and prossibly modify only the following list
of directories, in order to be compatible with your own
configuration:
LINUX_HOME = /usr/src/linux
RTAI_HOME = /usr/realtime
COMEDI_HOME = /usr/src/comedi
- rtmain.c: is the real time main program that allows the model to be
correctly executed under RTAI.
- setup.m: is a matlab script that simply adds the devices directory to the
"matlab" path.
- devices/sfun_rtai_scope.c: is the Simulink S-Function that performs the
multi-trace real-time scopes
- devices/rtai_scope.mdl: is the Simulink Library of RTAI Scope
- devices/sfun_rtai_log.c: is the Simulink S-Function that performs the
multi-dimensional real time logging
- devices/rtai_log.mdl: is the Simulink Library of RTAI Log
- devices/sfun_rtai_led.c: is the Simulink S-Function that performs the
real time leds
- devices/rtai_led.mdl: is the Simulink Library of RTAI Led
- devices/sfun_rtai_meter.c: is the Simulink S-Function that performs the
real time (volt)meters
- devices/rtai_meter.mdl: is the Simulink Library of RTAI Meter
- devices/sfun_rtai_synchronoscope.c: is the Simulink S-Function that performs the
real time synchronoscope
- devices/rtai_synchronoscope.mdl: is the Simulink Library of RTAI Synchronoscope
- devices/sfun_rtai_comedi_data_read.c: is the Simulink S-Function that performs the
synchronous Comedi analog input operation
- devices/rtai_comedi_data_read.mdl: is the Simulink Library of RTAI Comedi_Data_Read
- devices/sfun_rtai_comedi_data_write.c: is the Simulink S-Function that performs the
synchronous Comedi analog output operation
- devices/rtai_comedi_data_write.mdl: is the Simulink Library of RTAI Comedi_Data_Write
- devices/sfun_rtai_comedi_dio_read.c: is the Simulink S-Function that performs the
synchronous Comedi digital input operation
- devices/rtai_comedi_dio_read.mdl: is the Simulink Library of RTAI Comedi_Dio_Read
- devices/sfun_rtai_comedi_dio_write.c: is the Simulink S-Function that performs the
synchronous Comedi digital output operation
- devices/rtai_comedi_dio_write.mdl: is the Simulink Library of RTAI Comedi_Dio_Write
How to install the support
==========================
- create under $(MATLABROOT)/rtw/c a directory called rtai
(where $(MATLABROOT) is the root directory of Matlab, e.g.
/usr/local/matlab)
- copy "rtmain.c"
"rtai.tlc"
"rtai.tmf"
"setup.m"
and the directory "devices" to $(MATLABROOT)/rtw/c/rtai
- from the Matlab session run "setup"
How to test the support
=======================
- create a *.mdl example in Simulink (test.mdl)
- generate the code from the RTW menu
- compile the code from the directory "test_rtai" (typing "make -f test.mk");
in general a directory called "modelname_rtai" is created at the generation
stage, where modelname is the name of the Simulink model
- load the required rtai modules (you can use the script "loadrtai" in the
RTAI-Lab tree)
- run the real time code "./test [options]" (to see the list of options type
"./test --usage")
- run the RTAI-Lab (rtailab or xrtailab) to communicate with the real time
code locally or remotely
For the execution options available to run the RTW generated standalone code
read the file README in the main RTAI-Lab directory.
Lorenzo Dozio ([email protected])
2003 July 31.