
13. TCP / IP Communications
282 EPSON RC+ 5.0 (Ver.5.4) User's Guide Rev.4
13.4 TCP/IP Example
This example shows how to configure 2 PCs running EPSON RC+ 5.0 to communicate
using TCP/IP. Note that for the OpenNet command, one PC is the server, and the other is
a client.
Controller #1:
Port: #201
IP Address: 192.168.0.1
TCP/IP Port: 1000
Function tcpip1
String reply$
OpenNet #201 As Server
WaitNet #201
Do
Print "Sending data to host 2"
Print #201, "Data from host 1"
Input #201, reply$
Print "Received reply: ", reply$
Loop
Fend
Controller #2:
Port: #201
IP Address: 192.168.0.2
TCP/IP Port: 1000
Function tcpip2
String data$
OpenNet #201 As Client
WaitNet #201
Do
Input #201, data$
Print "Received '", data$, "' from host 1"
Print #201, "Received data"
Loop
Fend
Comentários a estes Manuais