필터 지우기
필터 지우기

teensy and simulink through serial port

조회 수: 4 (최근 30일)
Kaveh Allahdin
Kaveh Allahdin 2018년 4월 16일
편집: Kaveh Allahdin 2018년 4월 22일
Hi, I am trying to read the data sent by a teensy module through serial port, in Simulink for further data analysis. the signal should look like a sinusoidal wave(in this case not generally), but what appears to me and also obvious in the attached picture, every 5 6 second i get a copy of all data of last 5 6 second within 1 or half a second, which makes the data useless.
I captured the data directly with help of a processing code and the send data are ok.
I am using "stream input" from Realtime Desktop toolbox to read data from serial port. My guess is that the buffer simulink uses become full and spit out all buffer at once in the input signal.
My question is What am I doing wrong here? How can I get rid of this phenomen ? Is there a buffer setting somewhere that I can change/adjust or every stepp should empty to have buffer always on the safe side ?
Please let me know if you ever experienced this, also any tip or hint would be greatly appreciated!. bests, Kaveh
  댓글 수: 1
Kaveh Allahdin
Kaveh Allahdin 2018년 4월 16일
편집: Kaveh Allahdin 2018년 4월 22일
Teensy sends data with a rate of around 100Hz and Simulink model has/should always stay above 100 Hz.(My other guess is also the difference between data arrival in serial port and simulink reading them could be also causing this -although I can not adjust these two that much as I am limited to the set-up I am using)

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

답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by