Sample time of serial comunication

조회 수: 4 (최근 30일)
Giulio Griguoli
Giulio Griguoli 2021년 12월 9일
답변: Priyanka Kondapalli 2022년 2월 8일
I have to transmit through serial comunication some data from Simulink to my STM32F103RB board. I want to send a byte periodically (ideally every 1 millisecond).
I'm using a Serial Send Block, but I don't know how to set in Matlab the period time of the transmission. I thought it was enough to set the solver in the right way, putting the value of the sample time at 1 millisecond, but it is not enough. In fact I went to check at micro side whenever I get the data and I ascertained that it is transmitted with a random sample time.
The Matlab Scheme is:
I want to specify that the sample time of the constant block is also set to 1 millisecond.
So the question is: how can I set the simulation to send data everi 1 millisecond? I think there's something I'm doing wrong, but I don't know what....

답변 (1개)

Priyanka Kondapalli
Priyanka Kondapalli 2022년 2월 8일
Hi,
Please refer to below documentation link that can help you guide on sending and receiving data

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by