From: Uzumaki on
"dan schott" <dan1987(a)hotmail.com> wrote in message <hqidro$pbt$1(a)fred.mathworks.com>...
> Hi Jan,
>
> Could you please tell me which versions of Matlab, Simulink and RTWT you are using to achieve 500 Hz? I am having difficulty even getting 100 Hz sampling rate with r2007b and r2008a.
>
> Thanks,
>
> Dan

@Jan: Thank you for your answer.

@Dan: I think it also depends on your CPU and your Simulink model. For example, if your CPU is slow and your model is heavy then it will be hard to achieve such a fast sample rate.

Uzumaki
From: Jan Houska on
Hi Dan,

I was using R2010a. But, after you asked, I went back and tried R2007b
and there was no difference. I was able to achieve 500 Hz as well. I was
able to send up to cca 20 bytes on 115200 baud, using Packet Output
block. I was monitoring the output on the oscilloscope and with 20
bytes, there was still a small regular gap between the end of one packet
and the start of another one, with the frequency of 500 Hz. Of course,
when sending just one byte, the individual packets were separated in a
much more visible way.

The maximum sample rate you are able achieve depends on the amount of
data and RS232 baud rate, but you are probably aware of that. Also, it
may depend on your serial port - mine is a "native" RS232 port on the
motherboard, no add-on or even USB-connected device. And, of course, it
depends on your Simulink model which must be able to provide the data in
time. Mine was very simple, just a constant feeding the Packet Output block.

If you think you should be getting higher sampling rate, you can send me
your model (preferrably some minimalistic version) and I can give it a try.

Best Regards, Jan


dan schott wrote:
> Could you please tell me which versions of Matlab, Simulink and RTWT you
> are using to achieve 500 Hz? I am having difficulty even getting 100 Hz
> sampling rate with r2007b and r2008a.
>
> Thanks,
>
> Dan
>
>
>
> Jan Houska <houska(a)humusoft.com> wrote in message
> <hqe58u$1vsk$1(a)ns.felk.cvut.cz>...
>> Hi,
>>
>> dan schott wrote:
>> > "Uzumaki " <narutofan01234(a)yahoo.com> wrote in message >
>> <hq9hk5$hun$1(a)fred.mathworks.com>...
>> >> > > 1. Yes, RTWT can handle 115200 baud.
>> >> > 2. Approximately, 1/100 = 0.01 s (r2007b, r2008a, r2008b)
>> >> > 3. Because USB is not real-time by design.
>> >> > 4. Follow the link >>
>> http://www.mathworks.com/matlabcentral/linkexchange/links/2041-real-time-control-platform-for-matlab-and-simulink-dc-motor-control
>> >> and also visit the website mentioned in the video >>
>> http://zeltom.com/hilink.aspx.
>> >>
>> >> Hi Dan, thank you for your answer.
>> >>
>> >> According to your answer, 100 Hz seems to be the fastest frequency
>> >> RTWT can handle (with RS232 communication). But basing on the >>
>> information from Zeltom, their product can run at frequency 3.8 kHz >>
>> (the product also communicates with PC via RS232 communication)?
>> >>
>> >> This information contradicts your answer, doesnt it?
>> >>
>> >> Uzumaki
>> > > Uzumaki,
>> > > No, it does not. The number I gave you is for RTWT. Their software
>> > allows such a high rate. They even have a different version that can
>> > achieve 1/15.2e3 = 65.7895e-6 s.
>>
>> Actually, the maximum sampling frequency for RS232 in Real-Time
>> Windows Target is currently 500 Hz, not 100 Hz. Some improvement is
>> planned for the next version, but not all kinds of RS232 hardware will
>> be able to run at those higher speeds.
>>
>> Jan
>>
>>
>> --
>> Jan Houska HUMUSOFT s.r.o.
>> houska(a)humusoft.com Pobrezni 20
>> http://www.humusoft.com 186 00 Praha 8
>> tel: ++ 420 284 011 730 Czech Republic
>> fax: ++ 420 284 011 740


--

--
Jan Houska HUMUSOFT s.r.o.
houska(a)humusoft.com Pobrezni 20
http://www.humusoft.com 186 00 Praha 8
tel: ++ 420 284 011 730 Czech Republic
fax: ++ 420 284 011 740
From: dan schott on
Thanks Uzumaki,

I have a quite decent computer and my model is very simple (for test purpose). I do not think my model is loading my PC.

Thanks,

Dan

"Uzumaki " <narutofan01234(a)yahoo.com> wrote in message <hqln8s$9uq$1(a)fred.mathworks.com>...
> "dan schott" <dan1987(a)hotmail.com> wrote in message <hqidro$pbt$1(a)fred.mathworks.com>...
> > Hi Jan,
> >
> > Could you please tell me which versions of Matlab, Simulink and RTWT you are using to achieve 500 Hz? I am having difficulty even getting 100 Hz sampling rate with r2007b and r2008a.
> >
> > Thanks,
> >
> > Dan
>
> @Jan: Thank you for your answer.
>
> @Dan: I think it also depends on your CPU and your Simulink model. For example, if your CPU is slow and your model is heavy then it will be hard to achieve such a fast sample rate.
>
> Uzumaki
From: dan schott on
Thanks Jan,

My model is also very simple (a packet input and a packet output sending and receiving a uint8 plus two scopes and two gains to monitor the input and output). My RS232 port is also a 'native' one at COM1 (03F8). I connected TXD and RXD together and observed the data at TXD by an oscilloscope. When the sample rate is greater than 100 Hz, the time between two transmitted bytes is 10 ms. Thus, the maximum sample rate I can get is 1 / 10e-3 = 100 Hz.

I will email you my model. I would greatly appreciate if you look at it and tell me what I am doing wrong.

Thanks,

Dan


Jan Houska <houska(a)humusoft.com> wrote in message <4BCECC12.7000507(a)humusoft.com>...
> Hi Dan,
>
> I was using R2010a. But, after you asked, I went back and tried R2007b
> and there was no difference. I was able to achieve 500 Hz as well. I was
> able to send up to cca 20 bytes on 115200 baud, using Packet Output
> block. I was monitoring the output on the oscilloscope and with 20
> bytes, there was still a small regular gap between the end of one packet
> and the start of another one, with the frequency of 500 Hz. Of course,
> when sending just one byte, the individual packets were separated in a
> much more visible way.
>
> The maximum sample rate you are able achieve depends on the amount of
> data and RS232 baud rate, but you are probably aware of that. Also, it
> may depend on your serial port - mine is a "native" RS232 port on the
> motherboard, no add-on or even USB-connected device. And, of course, it
> depends on your Simulink model which must be able to provide the data in
> time. Mine was very simple, just a constant feeding the Packet Output block.
>
> If you think you should be getting higher sampling rate, you can send me
> your model (preferrably some minimalistic version) and I can give it a try.
>
> Best Regards, Jan
>
>
> dan schott wrote:
> > Could you please tell me which versions of Matlab, Simulink and RTWT you
> > are using to achieve 500 Hz? I am having difficulty even getting 100 Hz
> > sampling rate with r2007b and r2008a.
> >
> > Thanks,
> >
> > Dan
> >
> >
> >
> > Jan Houska <houska(a)humusoft.com> wrote in message
> > <hqe58u$1vsk$1(a)ns.felk.cvut.cz>...
> >> Hi,
> >>
> >> dan schott wrote:
> >> > "Uzumaki " <narutofan01234(a)yahoo.com> wrote in message >
> >> <hq9hk5$hun$1(a)fred.mathworks.com>...
> >> >> > > 1. Yes, RTWT can handle 115200 baud.
> >> >> > 2. Approximately, 1/100 = 0.01 s (r2007b, r2008a, r2008b)
> >> >> > 3. Because USB is not real-time by design.
> >> >> > 4. Follow the link >>
> >> http://www.mathworks.com/matlabcentral/linkexchange/links/2041-real-time-control-platform-for-matlab-and-simulink-dc-motor-control
> >> >> and also visit the website mentioned in the video >>
> >> http://zeltom.com/hilink.aspx.
> >> >>
> >> >> Hi Dan, thank you for your answer.
> >> >>
> >> >> According to your answer, 100 Hz seems to be the fastest frequency
> >> >> RTWT can handle (with RS232 communication). But basing on the >>
> >> information from Zeltom, their product can run at frequency 3.8 kHz >>
> >> (the product also communicates with PC via RS232 communication)?
> >> >>
> >> >> This information contradicts your answer, doesnt it?
> >> >>
> >> >> Uzumaki
> >> > > Uzumaki,
> >> > > No, it does not. The number I gave you is for RTWT. Their software
> >> > allows such a high rate. They even have a different version that can
> >> > achieve 1/15.2e3 = 65.7895e-6 s.
> >>
> >> Actually, the maximum sampling frequency for RS232 in Real-Time
> >> Windows Target is currently 500 Hz, not 100 Hz. Some improvement is
> >> planned for the next version, but not all kinds of RS232 hardware will
> >> be able to run at those higher speeds.
> >>
> >> Jan
> >>
> >>
> >> --
> >> Jan Houska HUMUSOFT s.r.o.
> >> houska(a)humusoft.com Pobrezni 20
> >> http://www.humusoft.com 186 00 Praha 8
> >> tel: ++ 420 284 011 730 Czech Republic
> >> fax: ++ 420 284 011 740
>
>
> --
>
> --
> Jan Houska HUMUSOFT s.r.o.
> houska(a)humusoft.com Pobrezni 20
> http://www.humusoft.com 186 00 Praha 8
> tel: ++ 420 284 011 730 Czech Republic
> fax: ++ 420 284 011 740
First  |  Prev  | 
Pages: 1 2
Prev: moving average
Next: local minimum