Simulink Real-Time Build is Not Building!
36 次查看(过去 30 天)
显示 更早的评论
Good afternoon,
I am trying to use rti_build to create a real-time itnerface with Simulink and dSpace Control Desk. I made a fairly simple model called test_map. A picture of it is attached. When I run rti_build('test_map'), the following slew of code ensues, and ultimately fails in "ans = 204". I am unable to determine the cause of this failure. What could I be missing?
System: Windows 7 x64
Matlab: R2012b
Hardware: MicroAutoBox D1401
dSpace Control Desk 5.2
Here is the code I get in the Matlab Command Window: NOTE: The working directory has been replaced with "...". I know all of my files are in the correct directory.
>> rti_build('test_map')
----------------------------------------------------------------------
Starting build procedure with RTI 7.2 (RTI1401, 02-May-2014)
Model: "test_map" (C:\...\test_map.slx)
----------------------------------------------------------------------
*** Using configuration set : "Configuration"
*** Working directory : "C:\...\"
*** Initializing code generation
### Starting Simulink Coder build procedure for model: test_map
### Generating code into build folder: C:\...\test_map_rti1401
Warning: The model 'test_map' does not have continuous states, hence Simulink is using the solver
'FixedStepDiscrete' instead of solver 'ode1'. You can disable this diagnostic by explicitly specifying
a discrete solver in the solver tab of the Configuration Parameters dialog, or by setting the
'Automatic solver parameter selection' diagnostic to 'none' in the Diagnostics tab of the Configuration
Parameters dialog
*** Skipping confirmation of 'RTI Task Configuration' dialog.
*** Optional User System Description File test_map_usr.sdf not available
### Invoking Target Language Compiler on test_map.rtw
### Using System Target File: C:\Program Files\dSPACE RCPHIL 2014-A\MATLAB\RTI\RTI1401\TLC\rti1401.tlc
.
### Loading TLC function libraries
.....
### Initial pass through model to cache user defined code
..
*** Postprocessing RTI blocks
*** Starting I/O block checking
*** Passed I/O block checking
### Caching model source code
..................................
### Writing header file test_map.h
### Writing header file test_map_types.h
.
### Writing source file test_map.c
### Writing header file rtwtypes.h
### Writing header file test_map_private.h
.
### Writing header file rtmodel.h
### Writing source file test_map_data.c
### Writing header file rt_nonfinite.h
.
### Writing source file rt_nonfinite.c
### Writing header file rt_defines.h
.
### Writing header file rtGetInf.h
### Writing source file rtGetInf.c
### Writing header file rtGetNaN.h
.
### Writing source file rtGetNaN.c
### TLC code generation complete.
### Generating TLC interface API.
......
*** Generating file test_map_rti.c
*** Generating file test_map_rti.mk
*** Generating Variable Description File test_map.trc
-------------------------------------------------------------------------------
NOTE: The following option in the Configuration Parameters dialog has been
used:
Optimization:
"Conditional input branch execution" On
This leads to code optimization in which blocks are not computed if their
outputs are not required in the simulation step, for example, if their
output values are used as input for a Switch block and the Switch
currently routes another signal. When the corresponding output signals
are displayed in ControlDesk, their values are static.
To ensure that the blocks are computed, turn off the
"Conditional input branch execution" option and rebuild the model.
-------------------------------------------------------------------------------
.
*** Generating template: User-Code File test_map_usr.c
*** Generating template: User Makefile test_map_usr.mk
*** Optional User Variable Description File test_map_usr.trc not available
### Creating project marker file: rtw_proj.tmw
.
### Processing Template Makefile: C:\Program Files\dSPACE RCPHIL 2014-A\MATLAB\RTI\RTI1401\RTI\rti1401.tmf
### Creating test_map.mk from C:\Program Files\dSPACE RCPHIL 2014-A\MATLAB\RTI\RTI1401\RTI\rti1401.tmf
### Successful completion of Simulink Coder build procedure for model: test_map
*** Finished RTI build procedure for model test_map (code generation only)
----------------------------------------------------------------------
BUILDING APPLICATION "test_map" (Single Timer Task Mode)
WORK DIRECTORY "C:\...\"
BUILD DIRECTORY "C:\...\test_map_rti1401"
TARGET COMPILER "C:\Program Files\dSPACE RCPHIL 2014-A\Compiler\PPCTools"
COMPILING "test_map.c"
COMPILING "rtGetInf.c"
COMPILING "rtGetNaN.c"
COMPILING "C:\MATLAB\R2012b\rtw\c\src\rt_matrx.c"
COMPILING "rt_nonfinite.c"
COMPILING "C:\Program Files\dSPACE RCPHIL 2014-A\MATLAB\RTI\RTI\C\rt_printf.c"
COMPILING "test_map_data.c"
COMPILING "test_map_trc_ptr.c"
COMPILING "C:\Program Files\dSPACE RCPHIL 2014-A\MATLAB\RTI\RTI\C\rti_sim_engine.c"
COMPILING "C:\Program Files\dSPACE RCPHIL 2014-A\MATLAB\RTI\RTI\C\rti_init_c.c"
COMPILING "C:\MATLAB\R2012b\rtw\c\src\rt_sim.c"
COMPILING "C:\Program Files\dSPACE RCPHIL 2014-A\MATLAB\RTI\RTI1401\SFcn\ds1401dac_t1.c"
COMPILING "C:\Program Files\dSPACE RCPHIL 2014-A\MATLAB\RTI\RTI\C\rti_assert.c"
LINKING APPLICATION ...
LINKING FINISHED
MAKE PROCESS SUCCEEDED
----------------------------------------------------------------------
LOADING APPLICATION "test_map.sdf" ("C:\...\") ...
PLATFORM: ds1401
The platform ds1401 is not registered.
LOADING FAILED (1)
Loading failed.
ans =
204
Here is my model:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165494/image.png)
2 个评论
Sangkai Huang
2018-7-3
try uncheck "Load application after build" in Configuration Parameters/Code Generation/RTI load options
Souarv De
2022-4-16
@Sangkai Huang Nope this does not solve the pupose. In my control desk platform is not showing.
回答(2 个)
Omnaath Guptha Harihara Gupta
2018-10-18
Open control desk and register the microlab box before the application is loaded and this solves the issue
2 个评论
Souarv De
2022-4-16
@Omnaath Guptha Harihara Gupta Please explain it in more details. I am new this thus I have not understand what microlab box is. When I open control desk, there is no option like microlab box.
Alim Huseynov
2018-6-9
I am experiencing the same problem. mine are Matlab R2015a Control Desktop 5.4 DS1202 for MicroLabBox
please help
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!