UDP Receive block-plotting data

2 views (last 30 days)
Gennaro
Gennaro on 20 Oct 2014
I have a problem with Simulink/UDP Receive block. I want to build a model which receives data from a client, and immediatly plots. I have used an event listener, which activates an appropriate function when UDP receive block posts outputs. The problem is that it plots also zero value (related to no received data) What i tried to do is using non-blocking mode and exploiting the second output of the block, that is the state (0=no data received, 1=data received). I wrote
if block.OutputPort(2).Data ~= 0 "Instructions to update plot" end
but it keeps on plotting zero value after each real received value! Thanks for any suggestion, I hope being clear enough :)

Answers (0)

Community Treasure Hunt

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

Start Hunting!