Why am I unable to get messages from RTDX when running a CCS application created and built from Simulink?

1 view (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 9 Jun 2010
This enhancement has been incorporated in Release 2008a (R2008a). For previous product releases, read below for any possible workarounds:
One of the most common mistakes made is to directly connect a “To RTDX” block to an “ADC” block. Due to current RTDX timing constraints, the generated code from this model will not work as expected.
The following two models show these common mistakes:
ADC2DAC.mdl and ADC2DAC_variant.mdl
This application generated from the above models are likely to overrun because the sampling time of the codec is much faster than RTDX processing time, hence, RTDX will not be able to keep up. Note that this is true even if your application is not generated from Simulink.
When you are using the Link for CCS to transfer data from the target to the host (MATLAB), this overrun is manifested by cc.rtdx.msgcount eventually decreasing to zero.
You need to modify the application such that:
a. Data going to the RTDX block channel is slowed down (e.g. use the Downsample block; note: downsampling to 32 works fine). This is shown in the models below:
ADC2DAC_solution.mdl and ADC2DAC_variant_solution.mdl
b. Give the RTDX more time to process a message transfer by decreasing the size of the data (e.g. use 'short' instead of 'int')
c. Depending on the application type you are developing, you can use the standard RTDX or the high-speed RTDX. If you are using video processing using standard RTDX, you will not get the desired output. Refer to the TI's documentation for more information. To enable high-speed RTDX, in Simulink, go to Simulation->Configuration Parameters, select Real-Time Workshop on the left pane, make sure the RTW system target file of the TI 6000 target is choosen, select "TIC6000 target selection" on the left pane and on the right pane, you can check off the "Enable High-Speed RTDX".
Note that if using “Link for CCS”, you need to properly configure and cleanup RTDX before and after execution. See the sample MATLAB script "RTDXdriver.m" below on how to do this:

More Answers (0)

Categories

Find more on System Composer in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!