MATLAB Answers

Diane
0

The parameters field of an rtp structure built using RSIMGETRTP is empty. Why?

Asked by Diane
on 16 Jun 2014
Latest activity Answered by Kurt Stewart on 10 Jul 2019
Using rsimgetrtp to build the Rapid Accelerator executable for a Simulink model of an electrical circuit. Inline parameters is enabled within the Model Configuration Parameters dialogue. Parameters which are meant to remain tunable have been declared as global variables within the model preload function space. The model is saved with Rapid Accelerator selected under Simulation Mode. The function is run with the following syntax:
rtp = rsimgetrtp('Model Name','AddTunableParamInfo','on');
The rtp output is a 1x1 structure with fields 'modelChecksum' (1x4 vector of doubles) and 'parameters' (empty 0x0 double). The subsequent code cannot run because the parameters field is empty. The following error message is displayed:
Error using modifyRTP (line 76)
The rtp structure passed in did not have a map field.
Please make sure that your model has inline parameters
turned on and the RTP structure was generated with
'ADDTUNABLEPARAMINFO' on. For more information please
see the help on RSIMGETRTP.
Error in sl (line 16)
[varargout{1:nargout}]=feval(varargin{:});
Error in Simulink.BlockDiagram.modifyTunableParameters
(line 25)
out_rtp = sl('modifyRTP', in_rtp, varargin{:});
Also built using Simulink.BlockDiagram.buildRapidAcceleratorTarget with syntax:
rtp = Simulink.BlockDiagram.buildRapidAcceleratorTarget(mdl,'AddTunableParamInfo','on');
Same results, an empty parameter field and impossible to proceed.
All Help pages that we have consulted thus far have pointed at the need to enable Inline Parameters under Model Configuration (done) and the need to use 'AddTunableParamInfo' and 'on' as function inputs (also done). Can anybody provide some insight as to why the parameters field of the output structure is still blank?
Model file is attached.

  1 Comment

I know this is an old thread, but did you ever resolve this problem? I have encountered the same thing and cannot find a work around.
Rob

Sign in to comment.

1 Answer

Answer by Kurt Stewart on 10 Jul 2019

I don't know if this fixes the problem but is your configuration for builidng rsim.tlc?

  0 Comments

Sign in to comment.