Skip to Main Content Skip to Search
Product Documentation

C2000 To RTDX - Add RTDX communication channel to send data from target to host

Library

Embedded Coder/ Embedded Targets/ Processors/ Texas Instruments C2000/ RTDX Instrumentation

Description

When you generate code from Simulink in Simulink Coder software with a To RTDX block in your model, code generation inserts the C commands to create an RTDX output channel on the target DSP. The output channels transfer data from the target DSP to the host.

The generated code contains this command:

RTDX_enableOutput(&channelname)

where channelname is the name you enter in the channelName field in the To RTDX dialog box.

To use RTDX blocks in your model, you must do the following:

  1. Add one or more To RTDX or From RTDX blocks to your model.

  2. Download and run your model on your target.

  3. Enable the RTDX channels from MATLAB or use Enable RTDX channel on start-up on the block dialog.

  4. Use the readmsg and writemsg functions on the MATLAB command line to send and retrieve data from the target over RTDX.

For more information about using RTDX in your model, see the following demos:

Dialog Box

Channel name

Name of the output channel to be created by the generated code. The channel name must meet C syntax requirements for length and character content.

Enable blocking mode

Enables blocking mode (selected by default). In blocking mode, writing a message is suspended while the RTDX channel is busy, that is, when data is being written in either direction. The code waits at the RTDX_write call site while the channel is busy. Any interrupt of the higher priority will temporary divert the program execution from this site, but it will eventually come back and wait until the channel stops writing.

When blocking mode is not enabled (when the check box is cleared), writing a message is abandoned if the RTDX channel is busy, and the code proceeds with the current iteration.

Enable RTDX channel on start-up

Enables the RTDX channel when you start the channel from MATLAB. With this selected, you do not need to use the enable function to prepare your RTDX channels. This option applies only to the channel you specify in Channel name. You do have to open the channel.

See Also

C2000 From RTDX

References

RTDX 2.0 User's Guide, Literature Number: SPRUFC7, available from the Texas Instruments Web site.

How to Write an RTDX Host Application Using MATLAB, Literature Number: SPRA386, available from the Texas Instruments Web site.

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS