필터 지우기
필터 지우기

How can I make DSP.UDPReceive block output only 1 instance of received packet instead of holding the value at its output until next packet arrives?

조회 수: 2 (최근 30일)
I am trying to set up simple UDP send and receive program with diffrent rates of transmission. In the same Simulink window, I am invoking UDPSEND once every 10 time-step (fixed discrete) but running UDPRECEIVE continuously (every time step). What UDPRECEIVE does is it holds the value for the subsequent 9 steps until it receives a new packet on the 11th (or n*11th) time-step. Can I make the RECEIVE block output a received packet only once?

답변 (1개)

Mark Schwab
Mark Schwab 2018년 1월 26일
If you have access to the Instrument Control Toolbox, you may want to consider using the UDP Send block from this toolbox as there is a blocking mode that seems to fit your workflow directly. Refer to the following documentation for more information:
If you are using the prerelease for R2018a, there is a new feature called "access latest data" which, as implied by the name, also seems to fit your workflow.
  댓글 수: 1
Surojit Sen
Surojit Sen 2018년 1월 29일
Hi Mark, thanks for your answer. I intend to use the Simulink model to run real-time in a dedicated RTT, hence need Code-Generation. ICT does not support code-generation (or does it?). 'Access Latest Data' feature, is it avaiable in the DSP blockset? Thanks!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Applications에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by