How can I clear simulink UDP block buffer

8 次查看(过去 30 天)
I am receiving data using udp.
The udp data is superimposed, I want to remove it for each simulation link step and get new data.
but, it's hard to receive new data..... I can't find data buffer clear block and fucntion (MATLAB flush function is not working at simulink)

采纳的回答

Angelo Yeo
Angelo Yeo 2023-9-14
안녕하세요.
Simulink의 UDP Receive 블록에서 사용하는 데이터의 buffer를 flush 하는 기능은 제공되지 않는 것으로 보입니다.
1) 그런데, 이 상황이 문제가 되는 이유는 UDP Receive로 받는 데이터가 FIFO 형식으로 받아지기 때문일 것으로 생각됩니다만, UDP Receive 블록은 "output latest data" 옵션을 제공하고 있습니다. 이 옵션으로 문제 해결이 가능하지는 않을지요?
2) 또 다른 방법으로는 MATLAB의 flushing 기능을 활용하기 위해 MATLAB Function 블록을 이용해 MATLAB 스크립트로 udp 패킷을 받아오는 스크립트를 작성하면 buffer flushing 기능을 사용할 수 있을 것으로 보입니다. MATLAB 스크립트를 이용해 udp 데이터를 받아오는 방법에 관해선 아래의 문서를 확인하여 주십시오.

更多回答(1 个)

Andrei
Andrei 2023-9-14
Try setting the "Output latest data" to "on"

类别

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