This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem using the F28335 with Matlab simulink



Dear all,

i start with a card F28335 using Matlab simulink. Actually, when i use the toolbox "Target Support Package" -> Supportd Processors -> Texas Instruments C2000 -> Chip Support -> C28x3x  and every components in this folder which work well (like comonent : ADC, ePWM, GPIO...), but in this project, when i add other component, for example "Clock" or "Signal generator" from Simulink -> Source. Then i compile : Tools-> Real-time Workshop -> Buil Model, there is a error like:

Real-time Workshop Error

The Embedded-C code format does not support continuous sample time blocks

I use CCS 3.3, Matlab 2009b and the eZdsp F28335.

Please help me to resolve this problem.

Thanks before

Dang Thanh

 

  •  Thanh,

    I've asked The Mathworks to respond to this. My guess is it has something to do with the way the generic Simulink blocks are pre-configured. (that is a complete guess)

     

  • I also encounter this problem with matlab 2009b with the following error.

    I use CCS 3.3, Matlab 2009b and the eZdsp F28335.

    Please help me to resolve this problem.

     

    Please assist on how to solved the problem.

     

    Error: Real-Time Workshop Error:

    The Embedded-C code format does not support continuous sample time blocks.

    Thanks.

  • Nigro,

                I will recommend you to check the Matlab help for your specific target. This will help you to see how the target is configured (remenber that you are working in discrete time)

    Regards

    Gastón

  • Thank you Gaston for your quick response, but the problem here is, in my model, I am using transport delay which is a continuous sample time and i am working on discrete time. How do I resolve this problem?

    Thanks.

  • Nigro,

               in discrete time the delay is referenced as Z^-1. In simulink you can use any block (as far as I remember you can't use scope, this block doesn't have C embeded code) if you assign a delay time (in the sample time specification). This particular error is generated beacuse you are using a continuos time block (or didin't assign a sample time) in your particular model. Check the matlab help for this block and how can be use it. Also Do a web search, there's a LOT of INFO out there.

    Regards

    Gastón

    P.S : In my files you have some models you can check if you want too.

  • Thanks once again but still can solved the problem. How can i check your model pls?

  • Dear Dang Thanh,

    Like the error message says, you can't use continous sample time blocks while generating C code for your Simulink model.

    A few options you could try:

    The control system toolbox provides a way to discretize continous blocks, if you have this toolbox installed on your machine you should see "Model Dicretizer" on the tool bar of your Simulink model under "Tools > Control Design". This tool will be able to convert blocks like the clock to a discrete implementation.

    Otherwize, it's usually simple to use different blocks. The clock block can easily be replaced with a counter that will provide you how much time has elapsed from the beginning of the execution of the program.

    I hope it helps,

    Good luck!

    Antonin.

     

  • Hi Nigro,

                MATLAB has its own limitations for auto code generation, not every simulink block can be used for code generation.  

    Regards,

    Nishanth