From: somesh bandari on
echotcpip('on', 4000);
t = tcpip('127.0.0.1', 4000);
fopen(t);

in the above code i m trying to send a signal which has to come to the Ethernet port. from the matlab document i could know that it is possible to get data to the Ethernet port. as i m new to this i was unable to do so. can anyone please tell me wat is the exact procedure.

i m actually trying to get a trigger signal driven by matlab. the trigger signal has to repeat for every 40 seconds or so. i m very new to this.
thank u in advance
From: Walter Roberson on
On 10-04-02 3:31 AM, somesh bandari wrote:
> echotcpip('on', 4000);
> t = tcpip('127.0.0.1', 4000);
> fopen(t);
> in the above code i m trying to send a signal which has to come to the
> Ethernet port. from the matlab document i could know that it is possible
> to get data to the Ethernet port. as i m new to this i was unable to do
> so. can anyone please tell me wat is the exact procedure.
> i m actually trying to get a trigger signal driven by matlab. the
> trigger signal has to repeat for every 40 seconds or so. i m very new to
> this.

Ethernet doesn't have ports. TCP has ports, UDP has ports, TCP port 4000
is not the same destination as UDP port 4000. You need to be clear as to
whether you are using UDP or TCP. Matlab is not designed to act as a
server for TCP connections; it can act as a server of UDP connections
but only if you bind the local port, which would take additional
commands or additional parameters.

In general, though, if you need a trigger signal that has to be at
intervals more precise than three or four infinities, you should not be
using TCP or UDP -- or any IP based protocol, as TCPIP is designed
around the idea that the underlying media (e.g., ethernet) will lose
data or will have corrupted signals from time to time. Until you get to
gigabit ethernet, you do not even get a common clock driving both sides
of an ethernet connection.

Even RS232 or RS422 (serial) is more suitable for signaling than TCPIP is.