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.
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!
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.