File Exchange

image thumbnail

Receive serial data and decode it

version 1.0 (7.57 KB) by

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

4.33333
3 Ratings

13 Downloads

Updated

View License

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.

Comments and Ratings (4)

Dave Smith

Emad Ravari

zhang

zhang (view profile)

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!

Tortuka

MATLAB Release
MATLAB 7.6 (R2008a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video