Code generation from a model made with single precision level 2 s-functions with single precision parameters

6 vues (au cours des 30 derniers jours)
Hello,
I have a simulation model made by use of single precision with few blocks made by level 2 cpp s-functions. The block parameters are structures with single elements. Everything works fine in simulation and now I would like to generate code for dSpace. The first issue I have encountered is:
parameters must be of type double or char if the S-function does not have TLC
That means now I have to options:
  1. Change my model back to support double parameters and convert the parameters in the s-function to single
  2. Make TLC for each s-function
Which option would you recommend?
Regards,
Radu

Réponse acceptée

rachel hybart
rachel hybart le 12 Juin 2019
It would be easiest to go with option 1 if possible.
I am currently trying to write a TLC file for a Level 2 S function, and it is a pain.
If it will not affect the outcomes and performance, I would change it back to double.
  1 commentaire
Radu Dan
Radu Dan le 13 Juin 2019
Actually I have just created the files without any function inside and it seems to compile now. There are other issues but I hope I can fix them.
It will be somewhat wrong to change it to double as I have changed the model it to single in order to gain performance...

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by