Path: news.mathworks.com!not-for-mail
From: "Matthew Wade" <cosmicspacepig@googlemail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Integrating compiled m-file with compiled simulink (RTW?) model
Date: Tue, 8 Jul 2008 14:14:02 +0000 (UTC)
Organization: ttz-Bremerhaven
Lines: 35
Message-ID: <g4vsna$d95$1@fred.mathworks.com>
References: <g4vq6l$8lr$1@fred.mathworks.com> <g4vr3r$m3j$1@fred.mathworks.com>
Reply-To: "Matthew Wade" <cosmicspacepig@googlemail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1215526442 13605 172.30.248.35 (8 Jul 2008 14:14:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 8 Jul 2008 14:14:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1052756
Xref: news.mathworks.com comp.soft-sys.matlab:478166



"Titus" <titus.edelhofer@mathworks.de> wrote in message > 
Hi Matt,
> you will need to use the Rapid-Simulation target for the 
Real-Time Workshop 
> compilation. Take a look at the function rsimgetrtp for 
collecting the 
> parameters, and esp. the option "AddTunableParamInfo" . 
This function itself 
> is not compilable, but once you have the parameter 
structure, you can update 
> it from your code.
> 
> The code will be replaced by something like
> 
> paramStruct = load('paramfile.mat');
> paramStruct.parameters.paramA = 42;
> save paramfile paramStruct
> system('theCompiledModel.exe -p paramfilein=paramfile');
> result = load('output.mat');
> plot(result.rt_tout, result.rt_yout)
> 
> There are some demos under Real-Time Workshop-
>Accelerated Simulations which 
> should give additional help.
> 
> Titus 
> 
Thanks Titus,

At least I now know it can be done. But I first must learn 
RTW before getting to that stage.

Best regards
Matt