Problems with data visualization in parameter tuning with serial communication and buffered data (Ti C2000)
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a current control model for a permanent-magnet synchronous motor, in simulink, that works with the embedded coder on a C2000 (F28379D) microcontroller.
Now I wanted to try the parameter tuning over serial communication. It is possible to change parameters online but I have problems with visualizing data. I want to aquire data with 10kHz. From this post: https://de.mathworks.com/matlabcentral/answers/353179-how-to-increase-acquisition-frequency-in-real-time-ti-board-f28379d
I learned that I need to buffer the data to be abled to reach this frequency. When I want to compile the code with buffered data I get this result:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/808879/image.jpeg)
The error note is: All sample times must be descrete. No continuous or constant sample times are allowed.
I have tried to fix this error with a rate transition block but it was without success. When I try to view the data without buffering the model will run but the output looks like this:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/808884/image.jpeg)
I am guessing these are the data gaps caused by the limited speed of the serial communication.
My suspicion is, that the problem is caused by the asynchronous design of the model, but I am not abled to solve it. I have also tried to put the scope in a seperate function, that is called with 1 kHz. See picture below.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/808889/image.jpeg)
I would be happy for hints and tips on how to solve this.
Dominik
0 个评论
采纳的回答
Venkatesh Chilapur
2021-11-23
Hi Dominik,
See if you can use the two model approach.
Regards,
Venkatesh C
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!