Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

external mode with custom RTW target

70 views
Skip to first unread message

Frederic

unread,
Nov 16, 2007, 4:32:10 PM11/16/07
to
I have a problem to use "external mode" with a custom TLC
file that derives from grt.tlc (file is attached at the end
of this email).

When I set Interface to "External Mode" in RTW configuration
parameters, the "Transport Layer" control only contains the
"none" option.
When using the grt.tlc target it contains the expected
options "serial, tctpip...".

What do I need to change in my TLC file to have access to
those Transport layers?

I found-out that I can edit the mdl file and force the
"ExtModeMexFile" parameters to "ext_comm" instead of
"noextcomm" and it works! I can connect to my target from
Simulink.

But of course ExtModeMexFile is overwritten next time I save
the model. I need to be able to set the transport layer from
Simulink Configuration's dialog.

Thanks for any help

Frederic


%% SYSTLC: Test Target \
%% TMF: test.tmf MAKE: make_rtw EXTMODE: ext_comm
%%
%%
%selectfile NULL_FILE

%assign TargetType = "RT"
%assign Language = "C"
%assign GenRTModel = 1
%assign _GRT_ = 1

%assign MatFileLogging = 1

%include "codegenentry.tlc"


BEGIN_RTW_OPTIONS

rtwgensettings.DerivedFrom = 'grt.tlc';
rtwgensettings.Version = '1';
rtwgensettings.BuildDirSuffix = '_test_rtw';

END_RTW_OPTIONS
%/


Frederic

unread,
Nov 19, 2007, 5:06:16 PM11/19/07
to
I'm replying to myself, I found the solution after digging
through the m source files in the toolbox/simulink directory.

To add tcpip external mode support to a custom target,
create a sl_customization.m file with the following content:

function sl_customization(cm)
disp('Adding tcpip external mode to test target');
cm.ExtModeTransports.add('test.tlc', 'tcpip',
'ext_comm', 'Level1');
end

Mentioning this in the doc would be nice (in case somebody
at The Mathworks is reading this).

Frederic

"Frederic " <fr...@nowhere.com> wrote in message
<fhl28q$4st$1...@fred.mathworks.com>...

Aaron

unread,
Nov 21, 2007, 11:24:11 PM11/21/07
to
Hi Frederic,

This will be doc'd in the R2008a release.

Thanks,
Aaron

"Frederic " <fr...@nowhere.com> wrote in message <fht1co$li5
$1...@fred.mathworks.com>...

Anthony Torres

unread,
Mar 18, 2010, 1:23:05 PM3/18/10
to
As always your a plethora of information Aaron!

"Aaron " <aaron.draj...@mathworks.com> wrote in message <fi309b$4le$1...@fred.mathworks.com>...

Sriharsha

unread,
Mar 16, 2012, 7:17:27 AM3/16/12
to

Hi Frederic,

I am also facing the same problem, as you faced initially.
But i am not able to resolve it.

Even i created a a function
-----------------------------------------------

function sl_customization(cm)
disp('Adding tcpip external mode to QNX target');
cm.ExtModeTransports.add('qnx.tlc', 'tcpip', 'ext_comm', 'Level1');
end

-----------------------------------------------------------

I have this function in the same folder, where the qnx.tlc file is ...

Kindly help me...
my email id is sriha...@vrindatech.com

Thanks
Sriharsha S


"Frederic" wrote in message <fhl28q$4st$1...@fred.mathworks.com>...

Sriharsha

unread,
Mar 16, 2012, 7:18:17 AM3/16/12
to

Hi Frederic,

I am also facing the same problem, as you faced initially.
But i am not able to resolve it.

Even i created a a function
-----------------------------------------------

function sl_customization(cm)
disp('Adding tcpip external mode to QNX target');
cm.ExtModeTransports.add('qnx.tlc', 'tcpip', 'ext_comm', 'Level1');
end

-----------------------------------------------------------

I have this function in the same folder, where the qnx.tlc file is ...

Kindly help me...
my email id is sriha...@vrindatech.com

Thanks
Sriharsha S


"Frederic" wrote in message <fhl28q$4st$1...@fred.mathworks.com>...

Sriharsha

unread,
Mar 16, 2012, 7:36:17 AM3/16/12
to
Hi Frederic..

I get the following error, wen i run the function..

-----------------------------------------------------------

sl_customization
Adding tcpip external mode to QNX target
Undefined variable cm.

Error in sl_customization (line 4)
cm.ExtModeTransports.add('qnx.tlc', 'tcpip', 'ext_comm','Level1');

--------------------------------------------------------------------------------

please help me..

Please mail me..any related documents if u have for support..

my email id is : sriha...@vrindatech.com

Thanks
Sriharsha S


"Frederic" wrote in message <fhl28q$4st$1...@fred.mathworks.com>...
0 new messages