Serial Communication involving terminator in MATLAB

조회 수: 10 (최근 30일)
Muhammad Hammad
Muhammad Hammad 2014년 9월 3일
답변: Rushikesh Tade 2014년 9월 15일
Hi I am trying to read data from serial port in MATLAB at 115200 baudrate.Serial data has terminator character and i want to read data untill first terminator is reached. Then read data again untill next terminator character and so on.I have tried several function like fread, fgetl, fgets, fscanf etc. But on most occasions when i read data my last character is not terminator but some other character. When i used fgets and fgetl only three characters were read. please suggest solutions.
  댓글 수: 1
Muhammad Hammad
Muhammad Hammad 2014년 9월 15일
still waiting for the reply from any resourceful person... :?

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

채택된 답변

Rushikesh Tade
Rushikesh Tade 2014년 9월 15일
Use MATLAB Serial port object:
serialObj= serial('COM1','BaudRate',115200,'DataBits',7);
For more info and documentation you can visit:

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Large Files and Big Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by