From: Benea Catalin on
I want to transmit over a network some data using the TCP/IP block,
When I use it locally it works but when I try to send to another computer it doesn't receive anything.
I've configured the TCP/IP blocks on the host and target machine, I've made the echotcpip command so that it will work on both machines on the port that I've assigned, when I test the connection from the block it say's that it is working , but when I send the target machine doesn't receive anything.

Another question : can I broadcast the data that I want to send on a local network , and what I need to configure, or it works only between 2 hosts ?

Please Help,
From: Walter Roberson on
Benea Catalin wrote:
> I want to transmit over a network some data using the TCP/IP block, When
> I use it locally it works but when I try to send to another computer it
> doesn't receive anything.

Is the remote side also running a Matlab program? Matlab is not able to act as
a server for TCP/IP. It is, though, able to act as a server for UDP if you
bind the UDP to particular source ports.
From: Benea Catalin on
Walter Roberson <roberson(a)hushmail.com> wrote in message <htk81o$165$1(a)canopus.cc.umanitoba.ca>...

>
> Is the remote side also running a Matlab program? Matlab is not able to act as
> a server for TCP/IP. It is, though, able to act as a server for UDP if you
> bind the UDP to particular source ports.

The remote machine is also a pc and is running matlab , when I start the simulation on both pc's the target machine does not receive anything!
And if I want to broadcast my data on a local network that ar running all matlab simulink cand I do this with tcp/ip blocks or with any other blocks from simulink ?
The ideea is that I want to send from a pc that collects some data from a dc motor and I want this data to be visible on a local network all running matlab simulink, is this possible ?
and what configurations should be made to make this possible , or what other blocks can I use for achieving this goal ?
Thank you for responding! And hope that you could help me!
From: Walter Roberson on
Benea Catalin wrote:
> Walter Roberson <roberson(a)hushmail.com> wrote in message
> <htk81o$165$1(a)canopus.cc.umanitoba.ca>...

>> Is the remote side also running a Matlab program? Matlab is not able
>> to act as a server for TCP/IP. It is, though, able to act as a server
>> for UDP if you bind the UDP to particular source ports.

> The remote machine is also a pc and is running matlab , when I start the
> simulation on both pc's the target machine does not receive anything!
> And if I want to broadcast my data on a local network that ar running
> all matlab simulink cand I do this with tcp/ip blocks or with any other
> blocks from simulink ?

You should never broadcast TCP/IP. TCP is "connection-oriented", so
getting access to the packets requires that each receiving system
complete a connection with the transmitting system. Having multiple
systems responding to a single outgoing TCP/IP packet is Not Good.

> The ideea is that I want to send from a pc that
> collects some data from a dc motor and I want this data to be visible on
> a local network all running matlab simulink, is this possible ? and what
> configurations should be made to make this possible , or what other
> blocks can I use for achieving this goal ?

Use UDP instead of TCP/IP. UDP is fine for broadcasting. On the other
hand, I do not know if Simulink's UDP allows you to bind UDP to the
broadcast address (which would be the highest possible address in same
network -- e.g., if you are using 192.168.5.* as the network then the
broadcast address would be 192.168.5.255 -- that or 255.255.255.255).

You would have to broadcast to a specific port, and you would have to
have each receiving system bind() the socket to that port as the
receiving port.

Note: I have never used Simulink, but I do have TCP and UDP experience.
From: Benea Catalin on
Another problem UDP receive block from simulink instrumentr control toolbox doesn't receive anything, I've configured the send UDP block to send at adress 172.20.2.44 and the receive UDB block to 172.20.2.45 , I've made a peer to peer connection to see if it works . There is an example on the site with TCP/IP blocks send/receive , at address it specifies localhost and so it works but when I put my addresses it doesn't receive anything. The TCP/IP blocks should work between 2 computers . I just want one computer to send the data and the other one to receive must I configure matlab to know wich is the server and wich is remote. Do i need to configure a socket for this simulation ?