Thread Subject: tg.start versus play button for xpctarget 4.1

Subject: tg.start versus play button for xpctarget 4.1

From: Marc

Date: 10 Nov, 2009 04:16:02

Message: 1 of 2

Just curious to see if there's a difference between starting a model using the play button in the model window versus tg.start at the command line?

I'm getting different behaviour for these two methods: tg.start everything works perfectly (can run the model arbitrarily long uninterrupted), but when I run using the play button my app will appear to freeze every few seconds and then resume correct display some seconds later (although no messages about tcp/ip errors etc are given)

My model is a simple loopback test of general standards cards, displaying the signals on the input on an xpc target scope.

Subject: tg.start versus play button for xpctarget 4.1

From: Arnaud Miege

Date: 10 Nov, 2009 09:14:38

Message: 2 of 2


"Marc " <marcpiggott@gmail.com> wrote in message
news:hdape2$ofv$1@fred.mathworks.com...
> Just curious to see if there's a difference between starting a model using
> the play button in the model window versus tg.start at the command line?
>
> I'm getting different behaviour for these two methods: tg.start everything
> works perfectly (can run the model arbitrarily long uninterrupted), but
> when I run using the play button my app will appear to freeze every few
> seconds and then resume correct display some seconds later (although no
> messages about tcp/ip errors etc are given)
>
> My model is a simple loopback test of general standards cards, displaying
> the signals on the input on an xpc target scope.
>

When you run the model by pressing the play button in the model window, you
must be using the external mode. If that's the case, then when you press
play, Simulink needs to connect to the target, checks the checksum is
correct (i.e. what's on the target is the same as your model on the host),
and then start the execution of the model on the target, so I would say it's
normal that it takes a bit of time before the model starts. When using
tg.start, you are just starting the execution of the model on the target
using the MATLAB API. That doesn't require doing all the steps that Simulink
performs when running in external mode (in fact, the Simulink model doesn't
even need to be open).

http://www.mathworks.com/access/helpdesk/help/toolbox/xpc/ref/starttargetapplicationobject.html
http://www.mathworks.com/access/helpdesk/help/toolbox/rtw/ug/f1000932dfi4.html
http://www.mathworks.com/access/helpdesk/help/toolbox/xpc/ug/f6-79480.html#bqnlfj_-1
http://www.mathworks.com/access/helpdesk/help/toolbox/xpc/ug/f6-31896.html#f6-76992

HTH,

Arnaud

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
xpc Ned Gulley 10 Nov, 2009 00:54:37
tgstart Marc 9 Nov, 2009 23:19:08
play Marc 9 Nov, 2009 23:19:08
general standards Marc 9 Nov, 2009 23:19:07
rssFeed for this Thread

Contact us at files@mathworks.com