Synchronizing MATLAB with the Serial Port

조회 수: 6 (최근 30일)
Mohammed Alsharif
Mohammed Alsharif 2013년 10월 30일
답변: Walter Roberson 2013년 10월 30일
Hi All,
I am reading the data in the serial port using MATLAB, I was able to indicate the end of reading point using the terminator LF, but still I have a problem with the start-reading point because MATLAB isn't synchronized with my microprocessor, this result in reading the data from the middle or any other point but rarely from the beginning.
Any idea how to solve this problem?
Thanks in advance

답변 (1개)

Walter Roberson
Walter Roberson 2013년 10월 30일
Have you using an application protocol with the device you are communicating with, so that the MATLAB session has to request that data be sent?
Is there any reason not to read until the first LF, discard, and then start reading and keeping data?

카테고리

Help CenterFile Exchange에서 Data Acquisition Toolbox Supported Hardware에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by