Pressure Systems 9816 Scanner User Manual


 
Pressure Systems, Inc. 98RK-1 & 9816 User’s Manual©
Page 31 www.PressureSystems.com
transmissions by sending commands to the modules, which are normally servers. However, a
module can initiate its own transmissions in some operating modes (e.g., the hardware-
triggered or free-run autonomous host streams generated by the Configure/Control
Autonomous Host Streams ('c') command). A maximum of 255 modules are easily
addressed by varying only the low-order byte of a typical IP Address. Many more modules may
be addressed by also changing the “network” portion (high-order 3 bytes) of the IP address.
A “peer” may be directly addressed by its IP address (in xxx.xxx.xxx.xxx format) or by use of a
predefined logical name that allows its IP Address to be looked-up in the sender’s database or
in a central network server’s database. Windows
®
-based operating systems provide a simple
text file database called “Hosts.” Review the file “Hosts.sam” in the “C:\windows” directory.
Modify and rename it “Hosts.” (no file extension) to activate it.
Before the host computer and any module can communicate with the higher level TCP/IP
protocols, the host (client) must request a connection be established with the module (server).
Each module expects all such requests for connection to be requested by its IP Address, and
directed to “well-known” port 9000 (default). After the connection is made, a socket is
established as a logical handle to this connection. The host and module may then
communicate, via this socket, until it is closed (or is lost at either module or host end, due to
power failure or reboot). The host and module may also communicate in a limited fashion
without a connection, using the middle-level UDP/IP protocols. In that case, the host simply
broadcasts commands via port 7000, and each module (that chooses to respond) returns the
response on port 7001. Only a few commands use UDP/IP in NetScanner
System modules.
3.1.3 Commands
The commands (and responses) used by all Model 9816 modules consist of short strings of
ASCII characters. The TCP/UDP/IP protocols allow for the transfer of either printable ASCII
characters or binary data. When using certain formats, internal binary data values are often
converted to ASCII-hex digit strings externally. Such values may include the ASCII number
characters ‘0’ through ‘9’, the uppercase ASCII characters ‘A’ through ‘F’, and the lowercase
ASCII characters ‘a’ through ‘f.’ These hex values may represent bit maps of individual options,
or actual internal integer or floating point (IEEE) binary data values. In other cases (see
optional format 7 below), binary data may be transmitted directly as 4-byte (32-bit) big-endian
binary values without any formatting change.
3.1.3.1 General Command Format
A typical TCP/IP command (contained in the data field following a TCP packet header) is a
variable-length character string with the following general fields:
a 1-character command letter (c),
an optional position field (ppppp), a variable length string of hexadecimal digits,
a variable number of optional datum fields (dddd): each a variable length string,
normally formatted as a decimal number (with a leading space character, and with or
without sign and/or decimal point, as needed).
Using brackets ([ ] ) to show optional elements, and ellipsis (...) to show indefinite repetition, a
typical TCP/IP command may be viewed schematically as follows:
c[[[[[p]p]p]p]p][ dddd[ dddd]...]”