Running Processes In Parallel - Newport XPS-Q8 Users Manual, Software Tools And Tutorial

Universal high-performance motion controller/driver
Hide thumbs Also See for XPS-Q8:
Table of Contents

Advertisement

XPS-Q8 Controller
Motion Tutorial
This example opens a TCP connection, gets the firmware version of the XPS controller
and closes the connection. The execution is displayed in message boxes:
To learn more about the DLL prototypes, refer to the Programmer's Manual, accessible
from the web site interface of the XPS controller.
The Software drivers manual, also accessible from the XPS web site interface, provides
further information about the use of the DLL and additional C++ programming
examples.
18.4

Running Processes in Parallel

TCP provides a reliable, point-to-point communication channel that client-server
applications on the Internet use to communicate with each other. To communicate over
TCP, a client program and a server program establish a connection to one another. Each
program binds a socket to its end of the connection. To communicate, the client and the
server both read from and write to the socket that binds the connection.
Sockets are interfaces that can "plug into" each other over a network. Once "plugged
in", the connected programs can communicate.
Figure 62: Running Processes in Parallel.
XPS uses blocking sockets. In other words, the programs/commands are "blocked" until
the request for data has been satisfied. When the remote system writes data on the
socket, the read operation will complete it and write the data in the received message
window of the Terminal menu ('0' if command has been executed without error, or the
error number in case of an error). That way, commands are executed sequentially since
each command always waits for a response before finishing and then allowing
execution of the next function. The main benefit of using this type of socket is that an
execution acknowledgement is sent to the host computer with each function. In case of
any error, it allows an exact diagnostic, which function has caused the error. It also
allows a precise sequential process execution. On the other hand, more functions could
be sent in parallel using non-blocking sockets. However, the drawback is that it is
almost impossible to diagnose which function caused an error.
To execute several processes in parallel, for instance to request the current position
during a motion and other data simultaneously, it is possible to communicate to the XPS
controller via different sockets. The XPS controller supports a maximum number of 84
parallel opened sockets. The total number of open communication channels to the XPS
controller, be it via the website, TCL scripts, a LabVIEW program, or any other
program can not be larger than 84.
Users who prefer not to use blocking sockets, or whose programming languages don't
support multiple sockets, such as Visual Basic versions prior to version .Net, can
disable the blocking feature by setting a low TCPTimeOut value, 20 ms for instance. In
201
XPSDocumentation V1.4.x (EDH0301En1060 — 10/17)

Advertisement

Table of Contents
loading

Table of Contents