Plot serial data in realtime with sample time of 1ms

3 Ansichten (letzte 30 Tage)
jaydeep panchal
jaydeep panchal am 28 Mär. 2022
Kommentiert: Walter Roberson am 29 Apr. 2023
Hello,
My MCU is sending data with sample rate of 1000 samples/sec via serial port. how can i visualize this data in realtime on scope? please find attached simulnik model snapshot.
Regards,
Jaydeep

Akzeptierte Antwort

Hyunuk Ha
Hyunuk Ha am 29 Apr. 2023
You can easily log signal and check the signal from Simulink Data Inspector :
But I think 1kHz is too high for data visualization,
  1. Use rate transition blk. to reduce sampling rate.
  2. Attach File Log blk. at the signal for the full data(if necessary, this will log data at the target machine, and after simulation ends, all the data will be transferred through TCP/IP).
  1 Kommentar
Walter Roberson
Walter Roberson am 29 Apr. 2023
If each data point were allocated 1 pixel, then 1 kHz would fill the width in 1 to 2 seconds.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu View and Analyze Simulation Results finden Sie in Help Center und File Exchange

Produkte


Version

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by