Thread Subject: xpctarget - tg.stop command not working

Subject: xpctarget - tg.stop command not working

From: Jonathan

Date: 19 Sep, 2008 17:02:04

Message: 1 of 5

I've recently updated my version of Matlab to R2007b along with Simulink and other packages such as xpctarget.

I've was trying to run one of my existing simulink models in xpctarget and found that after executing the program, it cannot be stopped.

tg.start works fine, which shows that there are no problems with the serial connection to the target PC. Executing tg.stop gives the message "connected = no" and "check serial connection" in the matlab window. I should think that serial connection is fine since I am able to use tg.start each time. It's just stopping the program that is the problem.

I get the problem even when I created a model from scratch. I've also tried using the stop button in xpcexplr...no luck.

Does anyone how this problem could be solved? I would really appreciate any help I can get.

Thanks

Subject: xpctarget - tg.stop command not working

From: Gordon Weast

Date: 19 Sep, 2008 17:30:16

Message: 2 of 5

Jonathan,

While you should probably call tech support with this problem, I'll
offer a couple of things to try first.

1. Which compiler are you using?

2. Does xpctest run or error out?

3. Which COM port on the target are you using? The target kernel
auto detects the one with commands coming in and either should work.

4. Does switching ports on the target before booting make any difference?

5. Is your model using the other COM port?

6. If you set the stop time to something short, do you regain communication
with the target after it stops?

7. You didn't switch to polling mode did you? That prevents communication
and graphics until it gets to the stop time.

Gordon Weast
xPC Target Development
The MathWorks

Jonathan wrote:
> I've recently updated my version of Matlab to R2007b along with Simulink and other packages such as xpctarget.
>
> I've was trying to run one of my existing simulink models in xpctarget and found that after executing the program, it cannot be stopped.
>
> tg.start works fine, which shows that there are no problems with the serial connection to the target PC. Executing tg.stop gives the message "connected = no" and "check serial connection" in the matlab window. I should think that serial connection is fine since I am able to use tg.start each time. It's just stopping the program that is the problem.
>
> I get the problem even when I created a model from scratch. I've also tried using the stop button in xpcexplr...no luck.
>
> Does anyone how this problem could be solved? I would really appreciate any help I can get.
>
> Thanks

Subject: xpctarget - tg.stop command not working

From: Jonathan

Date: 22 Sep, 2008 15:46:17

Message: 3 of 5

I'm using Watcom 1.3.

There is only one COM port at the back of the target PC that I can physically connect the host PC to.

The tests i have done so far use a simulation time of inf. By setting the simulation time to a finite value, xpctarget fails to start.

I updated my version of Matlab because I needed to use a standalone version. I have now installed a standalone version of Matlab 2006a (the version I was using previously) and everything is working fine.

I'm guessing it's some sort of bug associated with R2007b, but i'm just as happy to use R2006a since most of my models were created using that version in any case.

 

Gordon Weast <gweast@mathworks.com> wrote in message <gb0nj8$5pk$1@fred.mathworks.com>...
> Jonathan,
>
> While you should probably call tech support with this problem, I'll
> offer a couple of things to try first.
>
> 1. Which compiler are you using?
>
> 2. Does xpctest run or error out?
>
> 3. Which COM port on the target are you using? The target kernel
> auto detects the one with commands coming in and either should work.
>
> 4. Does switching ports on the target before booting make any difference?
>
> 5. Is your model using the other COM port?
>
> 6. If you set the stop time to something short, do you regain communication
> with the target after it stops?
>
> 7. You didn't switch to polling mode did you? That prevents communication
> and graphics until it gets to the stop time.
>
> Gordon Weast
> xPC Target Development
> The MathWorks
>
> Jonathan wrote:
> > I've recently updated my version of Matlab to R2007b along with Simulink and other packages such as xpctarget.
> >
> > I've was trying to run one of my existing simulink models in xpctarget and found that after executing the program, it cannot be stopped.
> >
> > tg.start works fine, which shows that there are no problems with the serial connection to the target PC. Executing tg.stop gives the message "connected = no" and "check serial connection" in the matlab window. I should think that serial connection is fine since I am able to use tg.start each time. It's just stopping the program that is the problem.
> >
> > I get the problem even when I created a model from scratch. I've also tried using the stop button in xpcexplr...no luck.
> >
> > Does anyone how this problem could be solved? I would really appreciate any help I can get.
> >
> > Thanks

Subject: xpctarget - tg.stop command not working

From: Gordon Weast

Date: 22 Sep, 2008 18:20:50

Message: 4 of 5

Jonathan,

You didn't say if xpctest runs to completion or not. That uses
the simple xpcosc test model. If this works, but your model
doesn't, then there is something wrong somewhere in your model.
If this doesn't work, then something is wrong with the installation.

Changing to a short finite stop time shouldn't change the startup
behavior at all. This is very strange.

There must be something in your setup that is causing a problem since
we don't see anything like this anywhere else.

Gordon Weast
xPC Target Development
The MathWorks

Jonathan wrote:
> I'm using Watcom 1.3.
>
> There is only one COM port at the back of the target PC that I can physically connect the host PC to.
>
> The tests i have done so far use a simulation time of inf. By setting the simulation time to a finite value, xpctarget fails to start.
>
> I updated my version of Matlab because I needed to use a standalone version. I have now installed a standalone version of Matlab 2006a (the version I was using previously) and everything is working fine.
>
> I'm guessing it's some sort of bug associated with R2007b, but i'm just as happy to use R2006a since most of my models were created using that version in any case.
>
>
>
> Gordon Weast <gweast@mathworks.com> wrote in message <gb0nj8$5pk$1@fred.mathworks.com>...
>> Jonathan,
>>
>> While you should probably call tech support with this problem, I'll
>> offer a couple of things to try first.
>>
>> 1. Which compiler are you using?
>>
>> 2. Does xpctest run or error out?
>>
>> 3. Which COM port on the target are you using? The target kernel
>> auto detects the one with commands coming in and either should work.
>>
>> 4. Does switching ports on the target before booting make any difference?
>>
>> 5. Is your model using the other COM port?
>>
>> 6. If you set the stop time to something short, do you regain communication
>> with the target after it stops?
>>
>> 7. You didn't switch to polling mode did you? That prevents communication
>> and graphics until it gets to the stop time.
>>
>> Gordon Weast
>> xPC Target Development
>> The MathWorks
>>
>> Jonathan wrote:
>>> I've recently updated my version of Matlab to R2007b along with Simulink and other packages such as xpctarget.
>>>
>>> I've was trying to run one of my existing simulink models in xpctarget and found that after executing the program, it cannot be stopped.
>>>
>>> tg.start works fine, which shows that there are no problems with the serial connection to the target PC. Executing tg.stop gives the message "connected = no" and "check serial connection" in the matlab window. I should think that serial connection is fine since I am able to use tg.start each time. It's just stopping the program that is the problem.
>>>
>>> I get the problem even when I created a model from scratch. I've also tried using the stop button in xpcexplr...no luck.
>>>
>>> Does anyone how this problem could be solved? I would really appreciate any help I can get.
>>>
>>> Thanks

Subject: xpctarget - tg.stop command not working

From: Omur Bas

Date: 25 Sep, 2008 06:51:01

Message: 5 of 5

We get a similar problem in 2006b, with TCP/IP, in one particular model. xpcosc and our other models (which include the same hardware drivers as the one that fails to stop) work fine. We tracked the problem down to the existence of file scopes in this model. We are still working on it - this model just has to work - and will keep you posted.

Omur Bas
www.promodsoftware.com.tr

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
xpctarget Jonathan 19 Sep, 2008 13:29:19
rssFeed for this Thread

Contact us at files@mathworks.com