How to change block sample time using a trigger
2 次查看(过去 30 天)
显示 更早的评论
Could someone point me in the direction of which block I need to to use?
I have my Simulink model running at a fixed TimeStep of 0.001s. I have successfully created a TCP link using the TCP Client and TCP Send blocks. I do not want to pass the data to the TCP Send block every 0.001s, I only want to the pass the data to the TCP Send block when there is a trigger signal. The attached image shows what I would like to do:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1468176/image.png)
I have tried the enabled/triggered subsystems but the output sample rate is the same as the input sample rate, i.e. 0.001s. For information, I am using Real-Time Simulation.
Is there any Simulink block that will change the output sample rate based on a trigger?
0 个评论
采纳的回答
Dimitri MANKOV
2023-8-30
Hi Thomas,
I would simply move the TCP Send block inside of the triggered / enabled subsystem, this should do the trick :)
Best,
Dimitri
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Target Computer Setup 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!