Verify TCP/IP connect while model is running

9 vues (au cours des 30 derniers jours)
Joe Bailey
Joe Bailey le 16 Août 2016
Commenté : Adam Setters le 16 Août 2016
Hello all, I'm running a model that sends and receives data to a remote address using the TCP/IP Receive and TCP/IP Send blocks. The model will run in real time, and there is no guarantee that the connection won't be cut out at some point. I know those blocks have timeout features, but I would much rather have the model register a failure to connect and carry on than wait for reconnection. Is there any block or function that can tell that an address and port can't be reached without crashing the model? Many thanks.
  1 commentaire
Adam Setters
Adam Setters le 16 Août 2016
Have you considered using stateflow? I can conceptualize a model where you have a "reconnect" state which you start at and then try to connect, and if the connection times out for either of the TCP blocks you transition to the "reconnect" state and try again.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by