Simulink UDP Send/Receive with Java Code

I'd like to implement a UDP echo client/server using Simulink (client) and Java (server). I'm able to send an integer value from Simulink client (using "UDP Send" block)** and receive it in the server. However, I wasn't able to receive the echoed value in Simulink client. The "UDP Receiver" times out each time no matter how high the timeout value is set to (I tried from 5 up to 50). (I double checked the port number and IP addresses in my Java code; it looks fine and there are no other exceptions on the server end).

I set the simulation configuration parameters to start at 0.0 and stop at 1.0 with a fixed-step (auto) solver. The priority values for send and receive blocks are set to 1 & 2 respectively so that the receive block is executed after send. Attached a snapshot of the receive block parameters.

Simulink UDP Send/Receive with Java Code

** I had some issues in receiving the integer value in the Java code from "UDP Send" due to my lack of experience in Matlab/Simulink. The problem was resolved following a response I received from another user. Here is the link: How to receive a Simulink constant value in Java code?.

Replay

Category: java Time: 2016-07-29 Views: 4

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.226 (s). 12 q(s)