RTP buildRapid​Accelerato​rTarget with S-functions

Hello,
I am trying to get the RTP Parameters from an S-Function with more than 10 tunable parameters. The S-Function has a mask with the paramters listed (10 parameters each page). When using the command buildRapidAcceleratorTarget, only the first page (parameters 1-10) is recognized and written to the rtp struct (rtp.parameters.map).
I am using Matlab 2015b 64-Bit. I already tried to Switch the page in the S-function mask and save the model --> result was no recognized Parameters at all.
mdl = 'sfcn';
rtp = Simulink.BlockDiagram.buildRapidAcceleratorTarget(mdl);
Any further ideas?
Thanks Sebastian

Respuestas (1)

Saurabh Gupta
Saurabh Gupta el 30 de En. de 2017

0 votos

Make sure all your mask parameters are tunable and registered as run-time parameters in your S-function. You may find the Run-Time Parameters documentation page helpful.
If you are using C S-function, you can use ssGetNumRunTimeParams and ssGetRunTimeParamInfo SimStruct functions to verify that all the required parameters are registered.

1 comentario

Thanks for your reply, only tunable parameters will show in the mask. I defined all of them as Simulink.Parameters as well. The S-Function (and the change of parameter values) works fine, as long as I don't use the rapid accelerator (the reason, why I need to create the RTP struct).
I create the S-Function by right-clicking on the block in Simulink and the code Generation --> create S-Function

Iniciar sesión para comentar.

Categorías

Más información sobre Prepare Model Inputs and Outputs en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 23 de En. de 2017

Comentada:

el 30 de En. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by