4.0

4.0 | 1 rating Rate this file 16 Downloads (last 30 days) File Size: 7.57 KB File ID: #25198

Receive serial data and decode it

by Usman Haider

 

01 Sep 2009

Receive serial data from an instrument or processor and decode it to apply on a plant model

| Watch this File

File Information
Description

This blockreceives serial data from an instrument or processor and decode it to apply on a plant model. You can see how serial receive block works and other blocks like ASCII Decode and Data type conversion . After receiving the data and decoding, it is applied to the plant model (transfer function of the plant). You can see the realtime plant response on oscilloscope block. Out put of various stages is recorded in workspace which can be examined after the simulation. The reader can learn interfacing hardware to the simulink by going through settings of serial configuration block and serial receive block. God knows the best.

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
05 Nov 2009 Tortuka  
11 Aug 2011 zhang

Hi,I try to do hardware in loop simulation,so I use serial send, receive and configure blocks .Now I can send serial data through the send block, but when I use receive block to get unsigned char data from another computer through serial port ,I can't get the data(got all zeros in simulink).I use your mdl example ,but It did't work too.can you explain how to configure the block or any approach to solve the problem.thanks!

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
serial Usman Haider 02 Sep 2009 11:15:46
ascii decode Usman Haider 02 Sep 2009 11:15:46
workspace Usman Haider 02 Sep 2009 11:15:46
data type conversion Usman Haider 02 Sep 2009 11:15:46
real time plant response Usman Haider 02 Sep 2009 11:15:46
embedded control Usman Haider 02 Sep 2009 11:15:46

Contact us at files@mathworks.com