MATLAB Answers

Real-time simulation with C2000 device

22 ビュー (過去 30 日間)
Eduard Monlleo
Eduard Monlleo 2019 年 3 月 21 日
Commented: Eduard Monlleo 2019 年 3 月 25 日
I am trying to do a Real-time simulation with a F28004 DSP.
I am currently using the PIL block to check a component running on the DSP while simulating the work environment on the computer, but it has been noticed that the speed that runs the model on the device is around 15 ms instead of 10 us (for example).
Is there any way to make it Real-Time?
Thank you.

  0 件のコメント

サインイン to comment.

件の回答 (1)

Antonin 2019 年 3 月 22 日
Hi Eduard,
PIL is not meant to be realtime. The primary use case for PIL is verification of the results produced by the generated code vs simulation.
If you are looking for a way to monitor signals in Simulink while the model runs in realtime on the hardware, you should use External mode.
Please refer to the answer provided on this page, it shows 3 different techniques to achieve this and points to a video where I demonstrate how to visualize variables updated at 200kHz (5µs).
I hope it helps,

  1 件のコメント

Eduard Monlleo
Eduard Monlleo 2019 年 3 月 25 日
Hello Antonin, thanks for your response.
I don't understand at all how does the double model DC/DC work from a top view.
I mean, there are two different models. One model is supposed to set the tunning parameters and show the response, and the other one is just the plant.
Is the plant running in External mode or it is deployed to HW? Because when using External mode, isn't it using the SCI for communicating Simulink and the board?
Then, the host model is just running in Normal mode? How can it get data from the communication port? When I use the SCI block (for example) while using the Normal mode, the model itself can't get any info from it.
Using the Instrument Control toolbox could it be possible?

サインイン to comment.

サインイン してこの質問に回答します。




Translated by