Veeder-Root makes no warranty of any kind with regard to this publication, including but not
limited to, the implied warranties of merchantability and fitness for a particular purpose.
Veeder-Root shall not be liable for errors contained herein or for incidental or consequential
damages in connection with the furnishing, performance, or use of this publication.
The information contained in this publication may be subject to change without notice.
This publication contains proprietary information which is protected by copyright. All rights
reserved. No part of this publication may be photocopied, reproduced, or translated to
another language without the prior written consent of Veeder-Root.
8.0 FUNCTION CODE SUMMARY ..................................................................................................... 156
Part No. 577013-767, Revision H iii
Serial Interface Manual
• TLS2 Monitoring Systems
1.0 INTRODUCTION
The serial RS-232 interface is used to connect the system to a controlling computer, a display terminal (CRT),
or a printing terminal. A modem can be connected directly to the system to provide telephone line access.
NOTE: The software versions for these systems vary depending on when they were purchased and if software
upgrades have been installed. The version in which each function code first appeared is indicated in a box next
to its description in Section 7.
2.0 HARDWARE CONNECTIONS
The RS-232 interface for Port 1 is accessed via a 9-pin D-connector located on the bottom of the console. The
RS-232 interface for Port 2 is accessed via the 5-pin J-9 connector inside the console.
2.1 RS-232
Port 1 is a panel mount, 9-pin female type D-connector, wired in the DCE configuration. A modem (DCE) may
be connected to the interface using a null cable which reverses the wires for the transmit/receive signals. A
computer or serial printer (DTE) may be connected with a straight-through cable. Port 1 does not require or
activate any hardware handshaking signals unless this option has been selected in the setup menu. RS-232
signals for Port 1 are wired to the 9-pin female D-connector as follows:
Port 1 PIN
1 (DCD) Data Carrier Detect
2 (RXD) Data Received by the console
3 (TXD) Data Transmitted from the console
4 (DTR) Data Terminal Ready
5 (GND) Signal Ground
6 (DSR) Data Set Ready
7 (RTS) Request To Send
8 (CTS) Clear To Send
9 (N/C) Not connected
RS-232 signals for Port 2, which does not include any hardware handshaking signals, are wired to the 5-pin
internal J-9 connector as follows:
Port 2 PIN
1 (TXD) Data Transmitted from the console
2 (RXD) Data Received by the console
5 (GND) Signal Ground (common return) and Chassis
Part No. 577013-767, Revision H 1
Serial Interface Manual
• TLS2 Monitoring Systems
2.2 EIA RS-232 INTERFACE
The EIA RS-232 interface is designed to connect to modems for transmission of data over telephone
lines. It can be used for direct local attachment of terminals if the cable run is no more than 50 feet. In
practice, cable runs longer than 50 feet have performed satisfactorily; however, since the RS-232
specification is designed for operation up to 50 feet, direct connect cable runs greater than 50 feet are not
warranted for proper operation.
3.0 CHARACTER FORMAT AND BAUD RATE
The system receives and sends characters via the RS-232 interface in an ASCII format that is configured
via the system front panel keypads. Selections consist of: 1 start bit; 7 or 8 data bits; odd, even or no
parity; and 1 or 2 stop bits. Communications rate is selectable: 300, 1200, 2400, 4800, or 9600 baud.
The system operates in a full duplex mode. Characters are not echoed when received, and transmitted
characters must not be echoed back to the system. Transmit and receive can occur simultaneously, and
commands can be stacked in the system buffer (up to 128 characters).
4.0 SECURITY CODE SETTINGS
A security code can be enabled for each port from the front panel setup menus, or by using the
appropriate serial commands. Each port has its own security code which is enabled and set
independently. When a security code is enabled for a given port, it must be used in any commands
transmitted to that port, in accordance with the format shown below, or else the console will not respond
to the command.
Part No. 577013-767, Revision H 2
Serial Interface Manual
SOH
Security Code
Function Code
Data Field
•TLS2 Monitoring Systems
5.0 COMMAND MESSAGE FORMAT
All command and response messages are configured in a format which includes a surrounding envelope
of control characters and a function code and data field message. The control characters are described in
this section, while the function codes and data field messages are described in subsequent sections.
The system responds to a command message that has the following configuration:
SOH is a fixed Control-A character (ASCII 01), and it indicates the beginning of the message.
The RS-232 security code is an optional six-digit code used to limit external serial access to the system
for security purposes. It can be set to any unique set of six characters, using either the front panel setup
menus or the external communication interface setup commands. The system will not respond to a
command without the proper security code.
The function code is a six character command code which the system interprets to determine the type of
action to take and response to return. System function codes and response messages are defined in
subsequent sections.
The data field is optional and contains information necessary to perform the selected function (such as
setup information).
If the system receives a command message string containing a function code that it does not recognize, it
will respond with a <SOH>9999FF1B<ETX>. The "9999" indicates that the system has not understood
the command, while the "FF1B" is the appropriate checksum for the preceding <SOH>9999 string.
There is one command which does not follow the above format. The escape command is performed by
sending an ESC (escape character, ASCII 27), to the system. It can be used to halt a response message at
any time before its completion.
Part No. 577013-767, Revision H 3
Serial Interface Manual
SOH
Function Code
Data Field
&&
Checksum
ETX
SOH
Function Code
Data Field
ETX
•TLS2 Monitoring Systems
6.0 RESPONSE MESSAGE FORMAT
There are two types of response message formats: computer (or packed data format) and display format.
Each format uses a different surrounding envelope of control characters.
6.1 COMPUTER FORMAT
The computer format is a stream of data without any formatting characters; i.e., carriage return, line feed,
spaces, labels, etc. The message format is as follows:
SOH is a fixed Control-A character (ASCII 01), and it indicates the beginning of the message.
The function code is identical to the received command message function code.
The data field contains the response message which is described in subsequent sections.
The "&&" is a fixed tag character which indicates that the checksum immediately follows.
The Checksum is a series of four ASCII-hexadecimal characters which provide a check on the integrity
of all the characters preceding it, including the control characters. The four characters represent a 16-bit
binary count which is the 2's complemented sum of the 8-bit binary representation of the message
characters after the parity bit (if enabled) has been cleared. Overflows are ignored. The data integrity
check can be done by converting the four checksum characters to the 16-bit binary number and adding
the 8-bit binary representation of the message characters to it. The binary result should be zero.
ETX is a fixed Control-C character (ASCII 03), and it indicates the end of the message.
6.2 DISPLAY FORMAT
The display format is intended for display on a CRT or printer. It includes all the necessary formatting
characters such as carriage returns, line feeds, nulls, spaces, labels, etc. The message format is as
follows:
See subsequent sections for a description of the data field response messages.
Part No. 577013-767, Revision H 4
Serial Interface Manual
Byte 1
2 3 4
S EEE
EEEE
E MMM
MMMM
MMMM
MMMM
MMMM
MMMM
Nibble 1 2 3 4 5 6 7 8
•TLS2 Monitoring Systems
6.3 ASCII FLOATING POINT FORMAT
6.3.1 NOTES
6.3.1.1 HHHHHHHH (H = 0-9 or A-F) indicates the 8 "nibble" ASCII-Hexadecimal representation of
a 4-Byte Floating Point number. Many data parameters are transmitted in this format.
6.3.1.2The 32-bits are arranged as follows:
S is the sign bit (0 if positive, 1 if negative).
EEE EEEE E represents the 2's exponent. It is a 2's complement value biased by 127 (7F
Hex). The exponent can be determined by subtracting 127 from the value of the E field and
raising 2 to the resulting power.
MMM MMMM MMMM MMMM MMMM MMMM represents the 23-bit mantissa. Since
the mantissa describes a value which is greater than or equal to 1.0 and less than 2.0, the 24th
bit is always assumed to be equal to 1 and is not transmitted or stored. The value of the
mantissa can be determined by dividing the value of the M field by 8,388,608 (223) and adding
1.0.
6.3.1.3The complete value of the floating point number can then be determined by multiplying the
exponent by the mantissa and attaching the appropriate positive or negative sign.
6.3.1.4 By convention, 00 00 00 00 represents the value 0.0 even though it actually converts to 5.8775
6.3.1.5 The eight "nibbles" are transmitted in sequence from 1 through 8 as shown in section 6.3.1.2.
S = 0 = + (positive)
E = 100 0110 0 bin = 8C hex = 140 dec
M = 001 1100 0100 0000 0000 0000 bin = 1C 40 00 hex = 1,851,392 dec
Exponent = 2
Mantissa = 1.0 + (1,851,392/8,388,608) = 1.22070
Decimal Value = +8,192 x 1.22070 = 10,000
(127-127)
(113-127)
(133-127)
(140-127)
= 1.0
= 0.0000610352
= 64
= 8,192
Part No. 577013-767, Revision H 6
Serial Interface Manual
• TLS2 Monitoring Systems
7.0 FUNCTION CODES AND RESPONSE MESSAGES
The function codes and data fields of the message formats are described in this section.
Most response messages can be requested for either a single device (tank, etc.) or all devices. A "TT" in
the function code signifies single device number 01 through 16. When "TT" is 00, it signifies all
devices.
Typically, response messages include information on the active devices only. That is, those devices that
are connected and working. However, the system can be forced to send data on inactive devices by
using an inactive device number. In this case, if no valid data is available on a device, the message is
filled out with question marks (?) in the place of numbers.
Computer format response messages do not include any formatting characters such as carriage returns,
line feeds, spaces, nulls, labels, etc. Only those characters shown are actually included in the response
message. For convenience, the messages are shown in segments and do not actually include any line
feeds, carriage returns, etc. Also, the notes to the right and between the message lines are not included
in the messages. All number values contained in the response messages retain leading zeroes.
Display format response messages include the formatting characters shown. All message lines end with
a carriage return, line feed, and six nulls. All response messages start and end with at least one blank
line.
The system function codes and response messages are described in detail in the following sections. A
summary list of all function codes is given at the end of this document.
1. This command will report all active OR unacknowledged alarms
Typical Response Message, Display Format:
<SOH>
I10100
22-05-01 14:55
STATION HEADER 1....
STATION HEADER 2....
STATION HEADER 3....
STATION HEADER 4....
SYSTEM STATUS REPORT
ALL FUNCTIONS NORMAL
<ETX>
101 Version 1
and warnings up to the limit of 25 alarms in display format,
and 150 alarms in computer format
Part No. 577013-767, Revision H 15
Serial Interface Manual
• TLS2 Monitoring Systems
Function Code 101 Notes: (Continued)
Typical Response Message, Computer Format:
<SOH>i10100YYMMDDHHmmAANNTT...
AANNTT&&CCCC<ETX>
Notes:
1. YYMMDDHHmm - Current Date and Time
2. AA - Alarm/Warning Category:
00 - All Functions Normal
02 - Tank Alarm
14 - Auto-Dial Fax Alarm
3. NN - Alarm Type Number:
- If AA is 02 and NN is:
03 = Tank High Water Alarm
04 = Tank Overfill Alarm
05 = Tank Low Product Alarm
08 = Tank Invalid Fuel Level Alarm
09 = Tank Probe Out Alarm
11 = Tank Delivery Needed Warning
12 = Tank Maximum Product Alarm
13 = Tank Gross Leak Test Fail Alarm
14 = Tank Periodic Leak Test Fail Alarm
15 = Tank Annual Leak Test Fail Alarm
27 = Tank Cold Temperature Warning
- If AA is 14 and NN is:
02 = Autodial Failed Alarm
4. TT - Tank/Sensor Number
5. && - Data Termination Flag
6. CCCC - Message Checksum
Part No. 577013-767, Revision H 16
Serial Interface Manual
• TLS2 Monitoring Systems
Function Code:103Version 4
Function Type: System Identification Report
PRIORITY ALARM HISTORY REPORT
ID DESCRIPTION ALARM TYPE STATUS DATE TIME
T 1 REGULAR UNLEADED PROBE OUT CLEAR 19-03-01 23:43
T 2 PRODUCT #2 PROBE OUT CLEAR 19-03-01 23:43
T 3 PRODUCT #3 PROBE OUT CLEAR 19-03-01 23:43
T 4 PRODUCT #4 PROBE OUT CLEAR 19-03-01 23:43
T 5 PRODUCT #5 PROBE OUT CLEAR 19-03-01 23:43
T 6 PRODUCT #6 PROBE OUT CLEAR 19-03-01 23:43
T 1 REGULAR UNLEADED PROBE OUT ALARM 19-03-01 23:36
T 2 PRODUCT #2 PROBE OUT ALARM 19-03-01 23:36
T 3 PRODUCT #3 PROBE OUT ALARM 19-03-01 23:36
T 4 PRODUCT #4 PROBE OUT ALARM 19-03-01 23:36
T 5 PRODUCT #5 PROBE OUT ALARM 19-03-01 23:36
T 6 PRODUCT #6 PROBE OUT ALARM 19-03-01 23:36
<ETX>
Part No. 577013-767, Revision H 18
Serial Interface Manual
• TLS2 Monitoring Systems
Function Code 111 Notes: (Continued)
Typical Response Message, Computer Format:
2. AA - Alarm/Warning Category:
00 - All Functions Normal
02 - Tank Alarm
14 - Auto-Dial Alarm
3. cc - Sensor Category
00 - Unused
4. NN - Alarm Type Number:
- If AA is 02 and NN is:
03 = Tank High Water Alarm
04 = Tank Overfill Alarm
05 = Tank Low Product Alarm
08 = Tank Invalid Fuel Level Alarm
09 = Tank Probe Out Alarm
11 = Tank Delivery Needed Warning
12 = Tank Maximum Product Alarm
13 = Tank Gross Leak Test Fail Alarm
14 = Tank Periodic Leak Test Fail Alarm
15 = Tank Annual Leak Test Fail Alarm
27 = Tank Cold Temperature Warning
- If AA is 14 and NN is:
02 = Autodial Failed Alarm
5. TT - Tank/Sensor Number
6. SS - Alarm State
01 = Alarm cleared
02 = Alarm occurred
7. YYMMDDHHmm - Date/Time Alarm state occurred
8. && - Data Termination Flag
9. CCCC - Message Checksum
Part No. 577013-767, Revision H 19
Serial Interface Manual
• TLS2 Monitoring Systems
Function Code:112Version 1
Function Type: Non-Priority Alarm History Report
6. AA - Alarm/Warning Category:
See explanation for "AA" in Function i11100
7. cc - Sensor Category
See explanation for "cc" in Function i11100
8. NN - Alarm Type Number:
See explanation for "NN" in Function i11100
9. TT - Tank/Sensor Number
10. YYMMDDHHmm - Alarm Date and Time
11. && - Data Termination Flag
12. CCCC - Message Checksum
regardless of their acknowledgement state. If there are
more than can be contained in the non-priority and priority
history storage areas, they will be reported here without
time and date stamps
Part No. 577013-767, Revision H 21
Serial Interface Manual
• TLS2 Monitoring Systems
Function Code:114Version 1
Function Type: Cleared Alarm Report
3. p - Product Code (single ASCII character, from 20 Hex - 7E Hex)
4. ssss - Tank Status Bits:
Bit 1 - (LSB) Delivery in Progress
Bit 2 - Leak Test in Progress
Bit 3 - Invalid Fuel Height Alarm (MAG Probes Only)
Bit 4-16 - Unused
5. NN - Number of eight character Data Fields to follow (Hex)
6. FFFFFFFF - ASCII Hex IEEE float:
1. Volume
2. TC Volume
3. Ullage
4. Height
5. Water
6. Temperature
7. Water Volume
7. && - Data Termination Flag
8. CCCC - Message Checksum
201 Version 1
Part No. 577013-767, Revision H 25
Serial Interface Manual
• TLS2 Monitoring Systems
Function Code:202Version 1
Function Type: In-Tank Delivery Report
TEST STATUS: OFF 0.20 GAL/HR TEST PASS
TEST STARTING TIME: 19-05-01 10:30 PM TEST LENGTH: 3.0 HOURS
START TEMP: 58.7 DEG F START VOLUME: 2123.2 GAL
END TEMP: 58.1 DEG F LEAK RATE: -0.01 GAL/HR