Sample time of Host Scopes in Simulink Real-time
1 view (last 30 days)
Show older comments
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/251059/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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/251058/image.png)
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
0 Comments
Answers (1)
Diego Kuratli
on 5 Dec 2019
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.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!