FS-8700-103 – ATMI TGM Serial Driver

FieldServer Driver


ATMI TGM Serial Driver



This driver connects to an ATMI TGM device using a serial connection.  The protocol is node-less (messages contain no information about the node), thus only one TGM device may be connected per FieldServer port.


The driver reports Gas and sensor readings and Gas alarm/warning status.  The driver reports TGM module malfunctions.


When reporting port and sensor data the driver reports the gas name by setting a gas name index value.  The index value is obtained from a list of gas names/index values hard coded into the driver.  The list may be extended and/or modified using the configuration by using appropriate entries in the configuration file.  The driver reports a second gas name index value based on reading the TGM calibration report.  When the report is read each gas is allocated an identifier value based on the gas’s position in the configuration report.


The driver does not provide emulation of a TGM device and thus may not be used as a Server.  It is not possible to use this driver to write to the TGM device.


FieldServer Mode Nodes Comments
Client 1 Only 1 client node allowed on per port.
Server 1 Server capability not provided.


Formal Driver Type


Client Only


Connection Information

Connection type: RS-232
Baud Rates: 300; 600; 1200; 2400; 4800; 9600; 19200 (TGM Device limitation)
Data Bits: 8 (TGM Device limitation)
Stop Bits: 1 (TGM Device limitation)
Parity: None (TGM Device limitation)
Multidrop Capability No


Connection configurations



Connection Notes

The following notes are provided from a TGM manual:


The TGM code constantly checks the status of the  DSR input of it’s serial ports connected to the DTR output of the remote serial ports.  If the TGM DSR is NOT ASSERTED (FALSE),  then the TGM software will suspend serial data output out of TGM Tx, and start a timeout timer (the default timeout time = 30 seconds as set in CONFIG.DAT).  During this timeout, if the DSR is ASSERTED (TRUE), then the TGM software will begin transmitting data.  If the DSR hold exceeds the (configurable) 30 second timeout, the TGM will report a malfunction:

MALFUN           PRINTER OFF LINE                                          hh:mm dd mmm yy

MALFUN           REMOTE OFF LINE                                           hh:mm dd mmm yy

depending upon which port has timed out.  Restoration of the DSR status as ASSERTED or TRUE will clear the above malfunction(s).  The above malfunctions will occur if the active TGM serial ports (printer or remote) are not connected upon bootup with the proper null modem cables to active serial ports with DTR (connected to theTGM DSR) ASSERTED/TRUE. The TGM can have the hardware control defeated by jumpering CTS to DTR to DSR on the TGM side of the connector.


The driver does not provide the hardware handshaking required and assumes the hardware control has been defeated with jumpers.


Communications functions – Supported functions at a glance:

The driver can poll for the following three reports.

Calibration Report (CALR) – Use to build a table of gas name vs. index values. The gas name/index list is written to a Data Array to facilitate interpretation.

Latest Area Report (QLA) – Used to update a table of gas value & status on a per port / sensor basis. Position in the table indicates port/ sensor. Table values indicate gas type (values obtained from CALR report), gas concentration value, status (normal / warning / alarm) and the gas concentration engineering units.

Incident Report (QIR) – Use to report malfunctions. Other data is ignored. Malfunctions are reported by setting a value in a table. Position in the table indicates the malfunction type. Malfunctions are cleared by line items that indicate the malfunction is cleared. All malfunction indications are cleared when malfunction messages 19 or 37 are received. The QIR report is always parsed from bottom to top. Parsing stops immediately when messages 19 or 37 are found. The malfunction and malfunction clearing events are compared against a list of text strings hard coded into the driver to determine the malfunction being reported.  The list can be modified or extended by use of entries in the configuration CSV file. In addition a TGM configuration file (config.dat) can be used to update the list in the driver.


Data Types Supported

The driver is data type independent.

Read Operations supported

FieldServer as a Client FieldServer as a Server
QLA None


Write (control) Operations supported

FieldServer as a Client FieldServer as a Server
None None


Unsupported Functions and Data Types



Programming messages

FieldServer is a data transfer device, and as such, programming messages are not required

The driver cannot send Ack / reset messages to the TGM device.


Unsupported Devices or Protocol Options

Device / Function Details
“PROGR” The Program Report is not supported by the driver.
“LOG” Demand Log report is not supported by the driver.
Non-“Malfunction” events reported in the Incident report are ignored.



The driver stores gas data from the QLA report in such a way that the maximum port number is 20.

If you liked this post;
  • Please consider subscribing to our RSS feed