1 preparing system, 2 running sample program, 1 tcptest in visual basic – Atop Technology SE5002 User manual User Manual
Page 35: Riting, Pplications
![background image](/manuals/554956/35/background.png)
User manual Version 1.3
ABLELink
®
Ethernet Serial Server SE5002
Copyright © 2006 Atop Technologies, Inc.
All rights reserved. Designed in Taiwan.
-
34
-
6 W
RITING
O
NES
O
WN
A
PPLICATIONS
Before writing ones own host applications or programs to interact with SE5002, make sure one have done
the following.
6.1 Preparing System
1. Connect SE5002 to power, Ethernet and serial cables
2. Configure SE5002: connection type, IP address, gateway IP address, and network mask (see chapter 3
Hardware Installation).
3. Configure SE5002 as TCP Server, using the default TCP port number 4660.
4. The host (PC) application program must be configured as a TCP client and connected to SE5002 with
designated TCP port number 4660 for COM1.
5. Check SE5002 running status through SerialManager configuration utility.
6.2 Running Sample Program
Sample programs written in VB and VC++ included in the package are provided for your reference; their
source codes are also included. Test program can be found on the product CD in the directory of
\sample\vb_ap\ and \sample\vc_ap respectively.
Two test programs, TCPTEST in Visual Basic and TCPTEST2 in Visual C++ are included.
6.2.1 TCPTEST in Visual Basic
This sample program(see below), written in Visual Basic 5.0 with Winsock Controls, shows how to exchange
data between host (PC) and SE5002 via Ethernet in two socket ports.
One may start the sample program tcptest.vbp to test different functions. For more information, press Help.
Note: Be sure Microsoft visual studio family or its equivalent software is installed.