top01.jpg (17169 bytes)
mleft.jpg (4986 bytes) m01a.jpg (6169 bytes)     m02a.jpg (6905 bytes)     m03a.jpg (7743 bytes)    m04a.jpg (7456 bytes)     m05a.jpg (7878 bytes)     m06a.jpg (6862 bytes)     m07a.jpg (6076 bytes) mright01.jpg (5078 bytes)

Trouble Shooting the ADR Sockets Example

 

I did all this coding and now it doesn't work!.

Here are some items that may help.

First, the sample project (that you received by email ) contains a ReadMe file that may help you.

Second, both the client and the server programs in the sample project provide command line help. In a command prompt window type:

ADRSockSrv -h

for help on using the server program or

ADRSockClient -h

for help on using the client program.

Third, the error code for socket calls is expanded in Microsoft's Winsock.h header file. All socket error codes are numbered relative to WSABASEERR (= 10000). For example if the error code is 10061 then look for WSABASEERR+61 in Winsock.h and find:

#define WSAECONNREFUSED         (WSABASEERR+61)

Then look up the documentation for the failing API call to find out what WSAECONNREFUSED means in the context of the call. I know this sounds obvious, but it wasn't obvious to me when I first used Windows sockets (I was looking for the wrong string in the wrong header file..... in Unix errno.h was all we needed). By the way, WSAECONNREFUSED, generally means that the connection was refused because ADRSockSrv is not running on the computer that we tried to connect with. Either start ADRSockSrv or fix the Hosts file to point at the correct IP address.

Fourth, check the other documentation on this web site to ensure that your serial port is configured OK and that the ADR card is connected and powered properly.

Note that Ontrak will not provide support for this tutorial as it is provided only as a guideline for experienced programmers who wish to implement TCP/IP control systems.

 

NEWS         PRODUCTS         PROGRAMMING          APPLICATIONS          CUSTOM DESIGN          ORDERING          HOME


TestPoint is a trademark of Capital Equipment Corp.   
LabVIEW is a trademark of National Instruments.
Visual BASIC is a trademark of Microsoft Corporation


Copyright © 1999 ONTRAK CONTROL SYSTEMS 764 Notre Dame Ave, Unit #1 , Sudbury, Ontario, CANADA P3A 2T2  
"Quality serial Data Acquisition Interfaces"           PH. (705) 671-2652 FAX (705) 671-6127