Tcp_Connecttoserver - Newport XPS Programmer's Manual

Xps unified series universal high-performance motion controller/driver
Hide thumbs Also See for XPS:
Table of Contents

Advertisement

XPS Unified
7.2.1.326

TCP_ConnectToServer

Name
TCP_ConnectToServer – Sets TCP/IP communication and opens a socket.
Input tests
-
Refer to section 7.1: "Input Tests Common to all XPS Functions".
-
Checks number of used sockets (Max = 100): if no free socket then the SocketID is
set to -1.
Description
Configures the TCP/IP communication and opens a socket to connect TCP server.
This function returns a socket identifier to use for each function call. The socket
identifier is defined between 0 to 99. If the TCP/IP connection failed then the
"SocketID" value is –1.
OpenConnection function is used when users are in local mode, it only needs the
timeout and socket number to open the connection with the XPS controller.
TCP_ConnectToServer function needs more information like the port number and
the IP address. This function is called with the DLL.
Prototype
int TCP_ConnectToServer(
char * IP_Address,
int IP_Port,
double TimeOut
)
Input parameters
IP_Address
IP_Port
TimeOut
function execution.
Output parameters
None.
Return (In addition to the results of "Input Tests Common to all XPS
Functions")
SocketID
NOTE
char *
TCP IP address: 195.168.33.xxx or another.
int
TCP IP port: 5001 for XPS controller.
double
Timeout in seconds used for each.
int
Socket identifier used in each function.
475
Programmer's Manual
EDH0373En1023 — 01/18

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Xps-rlXps-qXps-d

Table of Contents