Path: news.mathworks.com!newsfeed-00.mathworks.com!kanaga.switch.ch!switch.ch!kanja.arnes.si!news-hub.siol.net!newsfeed1.eu.ignite.net!news.cesnet.cz!news.felk.cvut.cz!not-for-mail
From: Jan Houska <houska@humusoft.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: RS-232 and RTWT
Date: Wed, 04 Nov 2009 09:42:34 +0100
Organization: HUMUSOFT s.r.o.
Lines: 24
Message-ID: <hcrepq$268h$1@ns.felk.cvut.cz>
References: <hcpv6r$3r4$1@fred.mathworks.com>
NNTP-Posting-Host: hack.humusoft.cz
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: ns.felk.cvut.cz 1257324154 71953 88.208.79.130 (4 Nov 2009 08:42:34 GMT)
X-Complaints-To: usenet@news.felk.cvut.cz
NNTP-Posting-Date: Wed, 4 Nov 2009 08:42:34 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.18 (Windows/20081105)
In-Reply-To: <hcpv6r$3r4$1@fred.mathworks.com>
Xref: news.mathworks.com comp.soft-sys.matlab:582293


Hi,

Alp wrote:
> We have a project which contains PIC microcontroller, RS-232 interface and PC (with Matlab, Simulink).We have to connect PIC to PC via RS-232 and sent datas in real time. 
> I found this link when I search related topics includes RS-232 and PIC keywords.
> http://hades.mech.northwestern.edu/index.php/Serial_communication_with_Matlab 
> However, this example does not working in Simulink's Embedded Matlab Block. PIC should get the 4digit number, we could not send the data from simulink to PIC. Is there anybody work on RTWT Simulink , RS-232 and PIC to help us?

You can try the Packet Output or Stream Output block, and choose 
Standard Devices, Serial Port as the data acquisition driver. These 
blocks are available since R2007b. Please see the "rtpacketio" and 
"rtstreamio" examples - although they use UDP and not RS232, the 
principle is the same and they can be changed to use RS232 just by 
changing the data acquisition driver.

Good Luck, Jan


--
Jan Houska                                           HUMUSOFT s.r.o.
houska@humusoft.com                                  Pobrezni 20
http://www.humusoft.com                              186 00 Praha 8
tel: ++ 420 284 011 730                              Czech Republic
fax: ++ 420 284 011 740