Real time data transmission using simulink UDP receiver

7 次查看(过去 30 天)
Hi, all. I am trying to send realtime data sequences using using developed C++ UDP program (sendto) on local host (127.0.0.1). And receive it in simulink. If the sampling frequency in simulink is the same with the original data sampling frequency there is no problem. But if I increase the sampling frequency in simulink, it starts to receive zeros in between. I also tried TCP/IP, there is no such kind of problem when I increase the receiver frequency. But I really need low latency realtime transmission, so UDP is preferable. Any idea ? Thanks !
  2 个评论
Walter Roberson
Walter Roberson 2015-5-13
If you sample faster than the transmitter is sending, or if a UDP packet gets dropped, then you have no data available when you want it. What do you want the result to be?
Tianxiao
Tianxiao 2015-5-13
I want continuous data, means if there the receiver's frequency is higher than transmitter, I want to keep the previous value not dropped.Do I need to write an simulink block to do that ?

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2015-5-13
Use a Sample and Hold block on udp data. The trigger would be the status port of the UDP Receive block
This presumes that you want to do something even when there is no new data. If you want to wait for data, use the UDP Receive block in blocking mode.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Development Computer Setup 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by