UART Tx-Matlab Block
UART_Tx-Matlab_Block.PNG
UART Tx-Matlab block: send variables to MATLAB® using UART interface. Values are displayed usingpicgui.

Note: In order to use the UART Tx-Matlab block in a Simulink® model, it is necessary to first include and set up theUART Configuration block .

The UART Tx-Matlab block allows sending variables to MATLAB through UART. The protocol used allows sending up to 16 distinct channels, each channel being composed of data of typeuint8,int8,uint16 orint16.

Each channel can be sent using a different sampling rate. Data is typically sent continuously. The MATLAB script (used in thepicgui block) decodes the data that supports hot plug. The overall system allows receiving data from within MATLAB and analyzing or plotting data in pseudo-real-time using MATLAB functions. The system is also useful to log data for performing simulations based on real logged data.

UART_TxMatlab.PNG
Click image to enlarge.
UART Tx-Matlab

UART Tx-Matlab example:

This example usespicgui and Tx-Matlab blocks to plot three overlapping sine waves of different frequencies and amplitudes. Tx-Matlab block is setup to use three channels, one for each signal. The live value of each signal will be displayed inpicgui.

Note: The signals displayed can have different sample rates.

UART_Tx-Matlab_Example.PNG
UART Tx-Matlab example.