Plot serial data in realtime with sample time of 1ms

조회 수: 3 (최근 30일)
jaydeep panchal
jaydeep panchal 2022년 3월 28일
댓글: Walter Roberson 2023년 4월 29일
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

채택된 답변

Hyunuk Ha
Hyunuk Ha 2023년 4월 29일
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
Walter Roberson
Walter Roberson 2023년 4월 29일
If each data point were allocated 1 pixel, then 1 kHz would fill the width in 1 to 2 seconds.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 View and Analyze Simulation Results에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by