Sample time of Host Scopes in Simulink Real-time

조회 수: 2 (최근 30일)
Jonas
Jonas 2019년 11월 28일
답변: Diego Kuratli 2019년 12월 5일
Hi
I am using Host Scopes to capture signal data of my model running on a Simulink Real-time target. My base model has a sample time of 24000Hz, but almost all blocks inside the model are running on 8000 Hz. The timing legend shows that there are in fact no blocks/signals running at 24kHz:
slrt2.png
I have configured the Host Scope to log a signal inside a part that runs on 8000 Hz, with Decimation set to 1. However, the signal data is still sampled at 24000 Hz.
I am not surprised that Decimation = 1 means a sampling at 24000 Hz, but I am surprised that the signal data is different at each sample, while the signal is only going at 8000 Hz.
Shouldn't I need to see the same signal value very three samples? How can it sample at 24kHz in a 8kHz section?
With kind regards,
Jonas

답변 (1개)

Diego Kuratli
Diego Kuratli 2019년 12월 5일
Why do you use 24kHz as base rate of the model, if there isn't any block at that rate?
What are you logging? The data is logged at the base rate, even if the scope appears on a different rate. It is hard to answer your question without the model.

카테고리

Help CenterFile Exchange에서 Scopes and Data Logging에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by