Ho to configure Serial Receive block for 8-N-1

조회 수: 1 (최근 30일)
Per Johansson
Per Johansson 2018년 5월 6일
답변: Gael Goron 2018년 5월 15일
I am trying to read load cell data from Sparkfun OpenScale serial output with Serial Receive block (from the Hardware Arduino support package). I have the default setting in the OpenScale and have calibrated it. I have connected Tx to Rx and Rx to Tx and serial data baud rate is set to 9600 in simulink. I get some data out from the Receive block but do not correlate to the raw value I see in the terminal window. The Port number I know (1) but there is Data type and Data length. I know that the data from one reading is 24 bit and the serial transmission type is suppose to be 8-N-1. Does this mean that I shall set Data type to uint8 and Data length 3? Those resulting three bytes I can not correlate to the raw value in the terminal window even if I flip around the order of the bytes. What information do I need to get about a serial output devise to be able to configure and understand the data output from Serial Receive block? Thanks, Per

답변 (1개)

Gael Goron
Gael Goron 2018년 5월 15일
Hello,
Please note that Sparkfun OpenScale is not a supported device for the Hardware Arduino support package. For the list of supported boards, you can refer to this page.

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by