Measurement Specialties 9116 user manual Commands, General Command Format

Models: 9116

1 143
Download 143 pages 39.58 Kb
Page 28
Image 28

Pressure Systems, Inc.

Model 9116 User’s Manual

 

 

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 Model 9116 modules.

3.1.2Commands

The commands (and responses) used by Model 9116 modules consist of short strings of ASCII characters. The TCP/IP and 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 letters ‘a’ through ‘f’.’ These hex values may represent bit maps of individual options, or actual 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) binary values without any formatting change. Such binary transmissions use big-endian (default) byte ordering but may be commanded to use little-endian for some data.

3.1.2.1General 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-charactercommand letter (c).

!an optional position field (pppp), 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][ dddd][ dddd]...]”

From this schematic, it should be clear that the command letter (c) is required, the position field (pppp) immediately follows it, and may have 0, 1, 2, 3, or 4 characters, and there may be zero or more datum fields ( dddd), as required. For simplicity, the variable length nature of each “ dddd” string is not shown [with brackets] above, but the required leading space character is shown. The position field is similarly simplified (as “pppp”) below.

Page 19

www.PressureSystems.com

Page 28
Image 28
Measurement Specialties 9116 user manual Commands, General Command Format