Real-Time Data Exchange via RTDX™

This example shows how to use the From RTDX and To RTDX blocks to send data from host to target and receive data from target to host. The model implements a simple sine wave generator that runs on the F28335 board.

NOTE: The Real-Time Data Exchange via RTDX™ supports only Code Composer Studio v3.3.

Required Hardware:

Available versions of this example:

This example can be run on all boards by changing the processor selection of the model: c28x_rtdxtest.mdl

Contents

Model

The following figure shows the example model.

Description

The first step to run this example is to generate code for the model and to build it to run on the target. Once the model is running, we use a MATLAB® script to read the sine wave values from the channel specified by the "To RTDX" block and plot them. To change the frequency and amplitude of the sine wave while it is running on the target, we use the same MATLAB script to write data to the channels specified by the "From RTDX" blocks. Note that the RTDX™ channel names specified in the RTDX blocks in the Simulink® model are the same channel names used in the MATLAB script. Open the example script to see the specific MATLAB code used to establish RTDX communication.

How to Run the Example