Control sending frequency for serial communication
조회 수: 2 (최근 30일)
이전 댓글 표시
I am trying to read/write data from an arduino over serial using Simulink. I am sending two floats down (as sin waves for now) and echoing them back to valdiate my communication is working. However I seem to be having a problem with overriding the serial buffer by writting to fast.
My question is can you control the writing rate in simulink so that is only sends a messsage over xx ms or maybe only write when simulink gets a reply message?
Here is my simulink model
THis is the responce I am getting back:
One of the sine waves is very noise. I think that his has to do with the control rate. I am sending values to fast and the arduino cannot keep up.
How can I slow down the rate at which message are being send over the Serial bus? This is just a simple example, i plan on incooperating this into my controller down the line.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Arduino Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!