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.

Data exchange while program running

Other Parts Discussed in Thread: UNIFLASH

Hi all,

how can I exchange data (e.g. update/change constants, gains etc.) between ControlCard C2000 F28335 and Matlab Simulink? 

The more I look at the similar questions and answers (e.g. 1 or 2) things get more complicated. 

This is my example:

All I would like to do is to change inputs In1 and In2 from TRUE to FALSE and vice-versa so that LED lights on F28335 can turn on/off.

Do I need any other blocks (e.g. To/From RTDX, SCI Transmit/Receive, etc.)? And how to configure them?

OR can I somehow access In1 and In2 values within the ControlCard?

I am using Matlab 2012b and CCS UniFlash for loading program.

Thanks!

  • Hi Mike,

    Check my Matlab Demos in this link: e2e.ti.com/.../543547

    Regards,
    Gautam
  •  Mike, 

    Basically you are looking for a way to tune the parameters in the board on the go.

    One way to achieve this is using the external mode which makes use of CCP on R2012a.

    Here is  a link to example for the same:

     

    https://www.mathworks.com/help/releases/R2012a/toolbox/ecoder/ug/bsylgi1-1.html#bsylgkh-8Using External Mode*

    *The above example would need additional hardware like CAN case.

     

    The easy way to try it out is using the serial COM port (SCI Rx/Tx) running the simulation in the Normal mode and be able to control the state of GPIO.

    You can model (first part of attached fig - 'host') using Host serial block(Instrument Control Toolbox) to send bytes (1/0)(ON/OFF) to control the state of the LED (GPIO34).

     

    On the target side you can use the target specific serial block (second part of attached fig - 'target') to read and bang the GPIO port.

    Once your model is ready, you can download the code in the target board and run the simulation in ‘Normal’ mode to control the LED state.

     

    Regards,

    Venkatesh C, Mathworks Support