Simulink & Arduino: Transmit Serial strings

조회 수: 6 (최근 30일)
Daniel Gelman
Daniel Gelman 2020년 8월 24일
댓글: Christoph Spiess 2022년 8월 10일
I am trying to transmit serial data out of an Arduino in Simulink, see model below.
I am getting prompted with
The 'MATLABSystem' block cannot accept a signal of type string. A signal of type string is connected to 'Input Port 1' of block 'simulink_arduino_comm_test/Serial Transmit1'.
An error occurred while propagating data type 'string' from 'simulink_arduino_comm_test/To String1', output port 1.
Can I not transmit serial data?
If not, how can I generate a sentence with a start-character, checksum, and end-character without using a string or char array?

답변 (1개)

Urmila Rajpurohith
Urmila Rajpurohith 2020년 8월 27일
you can refer to the below link which answers "How to implement serial communication between Simulink and Arduino" :
  댓글 수: 1
Christoph Spiess
Christoph Spiess 2022년 8월 10일
The example doesn't use the same blockset like shown in the question.
I'm currently struggling with the same problem:
how can I generate a sentence with a start-character, checksum, and end-character without using a string or char array?

댓글을 달려면 로그인하십시오.

카테고리

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

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by