Effacer les filtres
Effacer les filtres

Simulink Real-Time Build is Not Building!

55 vues (au cours des 30 derniers jours)
Paul Thieme
Paul Thieme le 31 Mai 2016
Commenté : Souarv De le 16 Avr 2022
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:
  2 commentaires
Sangkai Huang
Sangkai Huang le 3 Juil 2018
try uncheck "Load application after build" in Configuration Parameters/Code Generation/RTI load options
Souarv De
Souarv De le 16 Avr 2022
@Sangkai Huang Nope this does not solve the pupose. In my control desk platform is not showing.

Connectez-vous pour commenter.

Réponses (2)

Omnaath Guptha Harihara Gupta
Open control desk and register the microlab box before the application is loaded and this solves the issue
  2 commentaires
Carlos Orduno
Carlos Orduno le 13 Mai 2019
This worked for me. thanks
Souarv De
Souarv De le 16 Avr 2022
@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.

Connectez-vous pour commenter.


Alim Huseynov
Alim Huseynov le 9 Juin 2018
I am experiencing the same problem. mine are Matlab R2015a Control Desktop 5.4 DS1202 for MicroLabBox
please help

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by