Filter löschen
Filter löschen

teensy and simulink through serial port

4 Ansichten (letzte 30 Tage)
Kaveh Allahdin
Kaveh Allahdin am 16 Apr. 2018
Bearbeitet: Kaveh Allahdin am 22 Apr. 2018
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 Kommentar
Kaveh Allahdin
Kaveh Allahdin am 16 Apr. 2018
Bearbeitet: Kaveh Allahdin am 22 Apr. 2018
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)

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by