Co2meter TX User manual

18 November 2019 Rev. H
TX Sensor Controller
Manual
Revision H
REVISION 2
REVISION 3

TX Rev. HCopyright © 2019 CO2Meter,Inc.
ii
The information in this document is protected under applicable federal law as
an unpublished work and is confidential and proprietary to CO2Meter.com.Its
use, disclosure, reproduction, orpublication, in whole or in part, without the
express prior written consent of CO2Meter.com.is prohibited.
© 2019 CO2Meter.com.All Rights Reserved.
Document History
Date
Revision
Description
30 November 2018
Draft A
Initial Draft
1 December 2018
Draft A
Revised Draft
2 December 2018
Draft A
Added Appendix
15 December 2018
Rev. A
Firmware 1 build 0, clarification and
detail; HR, IR and CMD
1 February 2019
Rev. B
Firmware 1.10 beta Hardware
version 3.0:
Addition of GSS CO2
capability. Dual use IR 2-5 and 16 -
20. Sensor restore type table.
Commands 34, 40, 4. Support GSS
CO2 sensors to 20Hz via Modbus
12 February 2019
Rev. C
Firmware 1.20 beta. Add limiter for
20 mA out, < = register 23 value. Test
value register 19 limited < = register
19 prevent overrange out on miss
configuration.
19 February 2019
Rev. C
Firmware 1.20 reference to
CO2Meter and GasBox
development tools. Confirm CO2/
O2 version hardware 1.0, 2.0 and
3.0 compatible with firmware 1.2.
6 March 2019
Rev. D
Added Appendix with Revision
History. Moved Version 1.1 Notes to
Revision History. Added Version 1.2
Revision
8 March 2019
Rev. E
Firmware 1.20. Grammatical
corrections, technical clarifications.
11 March 2012
Rev.F
Firmware 1.20 clarity execution of
Commands.

TX Rev. HCopyright © 2019 CO2Meter,Inc.
iii
10 June 2019
Rev. G
Hardware REV3 release. Firmware
1.20. additional detail for
compatibility w/ MX series.
Elaboration in register definitions.
Fix annotation of RS485 AB swapped.
18November 2019Rev.HTX Manual Changes for both O2/
CO2

TX Rev. HCopyright © 2019 CO2Meter,Inc.
iv
Table of Contents
INTRODUCTION........................................................................................................................................ 1
ABOUT THIS MANUAL..............................................................................................................................................1
SOFTWARE VERSION................................................................................................................................................1
CHAPTER 1 : OVERVIEW........................................................................................................................ 2
GENERAL....................................................................................................................................................................2
MEASUREMENTS ......................................................................................................................................................2
CHAPTER 2 : COMMUNICATIONS INTERFACE................................................................................3
GENERAL....................................................................................................................................................................3
PHYSICAL CONNECTIONS ........................................................................................................................................3
CONNECTOR ASSIGNMENTS....................................................................................................................................3
SENSOR CONNECTIONS............................................................................................................................................4
CHAPTER 3 : REGISTERS ....................................................................................................................... 5
INPUT REGISTERS.....................................................................................................................................................5
INPUT REGISTER DESCRIPTIONS ...........................................................................................................................6
IR30001 (Address 0) Busy/Error Status...................................................................................................... 6
IR30003 (Address 2) O2/ CO2 Concentration........................................................................................... 7
IR30004 (Address 3) Partial Pressure O2 ................................................................................................... 7
IR30005 (Address 4) Temperature ................................................................................................................ 7
IR30006 (Address 5) Pressure.......................................................................................................................... 7
IR30007 (Address 6) Error Status.................................................................................................................. 7
IR30008 (Address 7) Manufacturer Id ......................................................................................................... 7
IR30009 (Address 8) Model Number............................................................................................................. 7
IR30010 (Address 9) Firmware Version ...................................................................................................... 7
IR30011 (Address 10) Serial Number........................................................................................................... 7
IR30012 (Address 11) PDU Count .................................................................................................................. 7
HOLDING REGISTERS ...............................................................................................................................................7
HOLDING REGISTER DESCRIPTIONS......................................................................................................................9
HR40001 (Address 0) Checksum..................................................................................................................... 9
HR40007 (Address 6) Gas Type ....................................................................................................................... 9
Gas type preset table............................................................................................................................................. 9
HR40016 ADR 15 Modbus Address. ............................................................................................................... 9
HR40017 ADR 16 Comm configuration (stop and parity) ................................................................10
HR00020 ADR 19 Current loop test.............................................................................................................10
CHAPTER 4 DEVICE COMMANDS..................................................................................................... 11
GENERAL................................................................................................................................................................. 11
COMMAND AND PARAMETER REGISTERS ..........................................................................................................11
COMMAND BUSY.................................................................................................................................................... 11
COMMAND EXECUTION ........................................................................................................................................ 11
COMMAND DESCRIPTIONS ................................................................................................................................... 11
Device Command 1 (0x0001) Error Reset ................................................................................................11
Device Command 2 (0x0002) Factory Use................................................................................................12
Device Command 16 (0x0010) Save Holding Registers to Flash....................................................12
Device Command 17 (0x0011) Restore Factory Presets ....................................................................12
Device Command 32 (0x0020) Zero Calibration ...................................................................................12
Device Command 33 (0x0021) Calibrate to Span.................................................................................
12

TX Rev. HCopyright © 2019 CO2Meter,Inc.
v
Device Command 34 (0x0022) calibrate to 400 ppm CO2................................................................12
Device Command 40 (0x0028) suspend streaming ..............................................................................12
Device Command 41 (0x0029) resume streaming................................................................................12
Device Command 9985 (0x2701) Factory Use........................................................................................12
CHAPTER 5 : TESTING ......................................................................................................................... 13
MODBUS TOOL....................................................................................................................................................... 13
SERIAL PORT.......................................................................................................................................................... 13
CABLE CONNECTIONS...........................................................................................................................................13
POWER CONNECTIONS ......................................................................................................................................... 14
CONFIGURING MODBUS TOOL............................................................................................................................. 14
USING THE MODBUS TOOL .................................................................................................................................. 14
COMMUNICATION LOG.......................................................................................................................................... 14
READING HOLDING REGISTERS .......................................................................................................................... 15
READING INPUT REGISTERS ................................................................................................................................ 15
WRITING HOLDING REGISTERS .......................................................................................................................... 15
CHAPTER 6 CO2Meter GRAPHICAL CONFIGURATION AND RAPID DEPLOYMENT TOOL 18
CHAPTER 7 FIRMWARE UPDATES.................................................................................................. 20
GENERAL................................................................................................................................................................. 20
PROGRAMMING CONFIGURATION....................................................................................................................... 20
Processor ..................................................................................................................................................................20
Programming Interface.....................................................................................................................................20
Programming Voltage........................................................................................................................................20
Device Power ..........................................................................................................................................................20
Connections.............................................................................................................................................................20
PROGRAMMING DEVICE ....................................................................................................................................... 20
PROGRAMMING SOFTWARE................................................................................................................................. 22
FIRMWARE FILES .................................................................................................................................................. 22
PROGRAMMING PROCEDURE............................................................................................................................... 22
CONNECT TO DEVICE ............................................................................................................................................23
DEVICE ERASE ....................................................................................................................................................... 24
PROGRAMMING FIRMWARE................................................................................................................................. 24
CHAPTER 8 : SUPPORT ....................................................................................................................... 26
WARRANTY ............................................................................................................................................................ 26
LIABILITY................................................................................................................................................................ 26
RETURNS.................................................................................................................................................................26
CONTACT US.......................................................................................................................................................... 27
CHAPTER 9 : APPENDIX 1: REVISION HISTORY ......................................................................... 28
VERSION 1.1 REVISIONS:..................................................................................................................................... 28
VERSION 1.2 REVISIONS:..................................................................................................................................... 29
Table of Figures
Figure 2-1 TX Sensor Controller.....................................................................................................3
Figure 2-2 Sensor controller sensor mount side ........................................................................4
Figure 5-1 Holding Registers........................................................................................................... 16
Figure 5-2 Input Registers................................................................................................................ 17

TX Rev. HCopyright © 2019 CO2Meter,Inc.
vi
Figure 7-1 Programming Connections ........................................................................................ 21
Figure 7-2 ST-LINK/V2 Connections............................................................................................ 21
Figure 7-3 Initial Screen.................................................................................................................... 23
Figure 7-4 Screen After Connection.............................................................................................. 24
Figure 7-5 Erase and Programming Screen............................................................................... 25

TX Rev. HCopyright © 2019 CO2Meter,Inc.
1
Introduction
About this Manual
This document is a technical reference for the CO2Meter.com TX Sensor Controller.
It provides the information necessary to use the sensor controller as well as
information about configuring the controller for various applications. The sensor
current supports the SST Luminox O2sensors and the GSS CO2 MINIR sensors.
Software Version
This manual applies to Software Version 1.2 beta 2/12/2019

TX Rev. HCopyright © 2019 CO2Meter,Inc.
2
Chapter 1 : Overview
General
The TX Sensor Controller is a high-performance controller supporting various types ofgas
sensor modules. Thecontroller supplies an RS485 Modbus RTU interface to the host
system and a separate UART interface to the gas sensor module. The controller accepts a
wide range (6 to 24Volt) power supply and provides a 4-20mA 3-wire current output. The
controller is 24 volt and provides RS485 and 4-20 mA connection, used in a variety of
industrial applications. The O2 Transmitter is UV and has zero cross to any of the
mentioned gases.
Measurements
The TX receives continuous measurements streamed from the sensor, typically twice per
second. The controller performs various computations at each measurement, including
adjusting the raw controller reading to the field calibrated values. The measurements are
made available to a host system through the Modbus interface. The primary gas sensor
reading is made available as a 4-20ma current output, 24 volt and RS485 for industrial
applications and many other industries.

TX Rev. HCopyright © 2019 CO2Meter,Inc.
3
Chapter 2 : Communications Interface
General
The TX communicates with a host system through an RS485 Modbus RTU interface. This
interface allows many slave devices to be connected to a host controller over a single
twisted cable. A common ground reference is normally required. For long lines, the
twisted-pair should be terminated with a 120-ohm resistor at each end.
Physical Connections
The TX uses a 6 pin (2x3) header with 0.1-inch (2.54 mm) centers. In some cases, the
header is not populated, and appropriate wire terminals are soldered directly to the
header pads.
Connector Assignments
Pin
Function
Pin
Function
1
4-20 mA current output
2
Reserved
3
GND
4
RS485 A (Data -)
5
DC Power (+6 – 24V)
6
RS485 B (Data +)
Figure 2-1 TX Sensor Controller
The DC Power and GND connections are protected against reverse polarity. The RS485
Data lines are protected against high voltage transients. The 4-20 mA output pin is also
protected against transient voltages. There is no protection on reserved Pin 2 which
connects directly to the microcontroller.
WARNING: Use care when connecting DC power. While the DC power and
Ground connections are protected against reverse polarity, all other pins on
the connector will be damaged if DC voltages > 5 V are continuously applied.
Pin 1
Pin 5
REVISION 2
REVISION 3
Pin 1
Pin 5

TX Rev. HCopyright © 2019 CO2Meter,Inc.
4
Sensor Connections
The Luminox sensor is installed centered on the solder side of the TX PCB. The sensor is
normally soldered to the board. 5Vpower is supplied to the sensor from a switching power
supply.
Figure 2-2 Sensor controller sensor mount side
REVISION 2
REVISION 3

TX Rev. HCopyright © 2019 CO2Meter,Inc.
5
Chapter 3 : Registers
The TX device provides a total of32Input Registers and 32Holding Register that may be
accessed through the Modbus RTUprotocol. General information on the protocol as used
on CO2Meter Inc. devices can be found in the RS485 Modbus RTU Interface manual. The
following descriptions are specific to the register assignments and commands supported
bythe TX.
Note that the register numbers are as defined in the Modbus Specifications. Some PLC
controllers will reference these numbers. In the Modbus Specifications the Input Registers
are numbered from 30001 to 30999. These correspond tothe addresses 0 to 998 used with
the “Read Input Register” (4) function. Similarly, the holding registers are numbered from
40001 to 40999. These correspond tothe addresses of0 to 998 used with the “Read
Holding Register” (6) and “Write Multiple holdRegisters” (16) commands.TheTX
currently uses addresses in the range 0 to 31. Addresses outside this range result in a
Modbus error (Illegal Data Address).
Note also that only the Holding Registers can be written (06) from the host. Input
Registers are read/only (4).
Input Registers
The TX supports 32 16-bit input registers. These registers are maintained bythe
controller during operation and can be read at any timeusing. The “int” type is a 16-bit
signed quantity. The “uint” type is a16-bit unsigned. The float type is a 32-bit IEEE764
formatted number. For floating point values, the lower numbered register contains the 16-
bit wordwith the exponent and upper bits ofthe significant. The higher numbered register
contains the remaining bits ofthe significant.
The status bits are described separately in a following section.
Table 3-1 Input Registers (Read Only)
Register
Address
Type
Description
IR30001
0
int
Busy/Error Status (see below)
IR30002
1
int
Reserved
IR30003
2
int
O2 Concentration in 10’s of ppm/ CO2 filtered
concentration.
IR30004
3
int
O2 Partial Pressure in tenths of millibars/ CO2
Raw unfiltered unscaled
IR30005
4
int
Sensor Internal Temperature; O2 in 10ths of a
degree C/ CO2 in 10ths of a degree C
IR30006
5
int
O2 Sensor Pressure in millibars, CO2 sensor
Unsigned RH in percentage.
IR30007
6
uint
Error Status received from Sensor
IR30008
7
uint
Manufacturer IDCode CO2Meter=35642

TX Rev. HCopyright © 2019 CO2Meter,Inc.
6
Register
Address
Type
Description
IR30009
8
uint
Model Number 1=TXZ 2=MX2 3=MX3 4=EC
IR30010
9
uint
Firmware Version high byte version low byte
build i.e., 257 = 1.1
IR30011
10
uint
Controller Serial Number
IR30012
11
uint
Received PDU Count
IR30013
12
uint
Received PDU Errors
IR30014
13
uint
Transmit PDU Count
IR30015
14
uint
Count of Received Measurements from Sensor
IR30016
15
int
Raw %O2 as received from Sensor. NA CO2.
IR30017
16
float
Floating Point % O2/ filtered CO2 %
IR30018
17
IR30019
18
float
Floating Point Partial Pressure O2/ unfiltered CO2
%
IR30020
19
IR30021
20
float
O2 Floating Point Temperature/CO2 Temperature
IR30022
21
IR30023
22
float
O2 Floating Point Pressure/ CO2 Relative
Humidity %
IR30024
23
IR30025
24
uint
BME1 TEMP Reserved
IR30026
25
uint
BME1 RH Reserved
IR30027
26
uint
BME1 Baro Reserved
IR30028
27
unit
BME2 TEMP Reserved
IR30029
28
unit
BME2 RH Reserved
IR30030
29
unit
BME2 Baro Reserved
IR30031
30
-
Reserved
IR30032
31
-
Current DAC value to current loop (0 – 4095) as
calculated from IR30003
Input Register Descriptions
IR30001 (Address 0) Busy/Error Status
This register provides the current Busy/Error status of the device. The bit assignments are
as follows:
Bit 15 (MSB) Busy.
Bits 4-14 Reserved.
Bit 3 Command Failure.
Bit 2 Flash Error.
Bit 1 Invalid Command.
Bit 0 (LSB) Power Fail. (Set at Power Up)
All bits can be cleared by executing the “Error Reset” device command.

TX Rev. HCopyright © 2019 CO2Meter,Inc.
7
IR30003 (Address 2) O2/CO2 Concentration
This register provides the current concentration of O2in 10’s of ppm/Filter Co2
concentration un scaled %
IR30004 (Address 3)Partial Pressure O2
This register provides the current partial pressure of O2in tenths ofa millibar. /un filtered
CO2 un scaled %
IR30005 (Address 4) Temperature
This register provides the current temperature in tenths ofa Degree C Oxygen and CO2
sensors.
IR30006 (Address 5) Pressure
Barometric pressure from O2 sensor Barometer/ CO2 sensor if equipped % Relative
humidity.
IR30007 (Address 6) Error Status
This register indicates an error status received from the sensor.
IR30008 (Address 7) Manufacturer Id
This register provides a manufacturer ID. All cCO2Meter Inc. devices will have 35642
IR30009 (Address 8) Model Number
This register provides a model number. TX devices have a value of 1.
IR30010 (Address 9)Firmware Version
This register indicates the firmware level ofthedevice high byte (MSB) = version and low
byte (LSB) = revision. 257 = version 1 revision 1 (Rev 1.1)
IR30011 (Address 10)Serial Number
This register provides the serial number ofthe controller. A value of 65535 indicates that a
serial number has not yet been assigned.
IR30012 (Address 11)PDU Count
This register contains the total number ofpackets received bythe device since power up.
Holding Registers
There are 32 Holding Registers. The Holding Registers are read hold register (03),write
hold register (06)andwrite multiple Hold registers (16).They are initially loaded from
non-volatile memory at power up. They may then be altered bythe host. Note that holding
registers are not automatically saved to non-volatile memory. Registers are saved to non-
volatile memory only as a result of a specific write command.

TX Rev. HCopyright © 2019 CO2Meter,Inc.
8
Table 3-2 Holding Registers (Read/Write)
Reg
Address
Default
Description
HR40001
0
N/A
Checksum Value for FLASH Storage
HR40002
1
0
Reserved MX/EC output mask
HR40003
2
0
Reserved MX/EC logging Mask
HR40004
3
0
Reserved EC configuration
HR40005
4
5
Reserved configuration options MX/EC. !- RS485
base address 0-31, PWM.
HR40006
5
0
Reserved stream interval
HR40007
6
2
T & MX Gas Type see table, 1=CO2 2=O2
HR40008
7
0
O2 Zero Value, reported in zero calibration to N2
HR40009
8
0
O2 K Value slope of calibration K/32768 applied
after subtracting 0 value.
HR40010
9
0
Calibration Concentration, value used in most
recent calibration.
HR40011
10
25000
Span- not used in this application place holder for
software compatibility.
HR40012
11
25000
Full Scale value for 4-20 mA current output.
O2 20mA=25%.
CO2 10000 unscaled input = 100% CO2
HR40013
12
10
Multiplier to get to PPM
HR40014
13
0
Reserved EC feature
HR40015
14
5865
Reserved PWM time base 1-16384. 0=342
mS0.1125 graduations. 5865=1 Sec.
HR40016
15
21
Modbus Address 1-247. 254 for set-up and
discovery. Default 21 0x15
HR40017
16
0
Comm Configuration (Stop bits and Parity)
HR40018
17
8
Baud Rate (Multiple of 1200) 8 = 9600
HR40019
18
0
Reserved
HR40020
19
0
4-20 mA current output test (when non-zero)
range 0-4096.
HR40021
20
0
Reserved
HR40022
21
550
Current output 4 mA Level, ADC Value
corresponding to 4 mA current output.
HR40023
22
2740
Current output 20 mA Level, ADC Value
corresponding to 20 mA current output.
HR40024
23
0
Reserved
HR40025
24
0
Reserved
HR40026
25
0
Reserved
HR40027
26
0
Reserved
HR40028
27
0
Reserved
HR40029
28
0
Reserved
HR40030
29
0
Reserved
HR40031
30
0
Command Parameter

TX Rev. HCopyright © 2019 CO2Meter,Inc.
9
Reg
Address
Default
Description
HR40032
31
0
Command
Holding Register Descriptions
HR40001 (Address 0) Checksum
This register contains the checksum of the initial holding register values as read from non-
volatile memory. This register may be freely written from the host. When holding register
content is saved to non-volatile storage, a new checksum value will be computed and
written to non-volatile memory.
HR40007 (Address 6) Gas Type
This register contains a Value that indicates the type of Gas sensed by the sensor. Setting
the method for communication and computations. 1=CO2 2=O2.
Gas type preset table
Sensor:
Label
1=CO2,
2=O2
Zero
K
factor
Cal
Val
Range
4-20
scaler
Type 0:
Luminox
25%
2
0
32768
20900
25000
25000
10
Type 1:
Luminox
50%
2
0
32768
20900
50000
50000
10
Type 2:
GSS 1-2%
1
0
32768
10000
10000
1000
1
Type 3:
GSS 5%
1
0
32768
5000
5000
5000
10
Type 4:
GSS 20%
1
0
32768
10000
20000
20000
10
Type 5:
GSS 60%
1
0
32768
10000
60000
60000
10
Type 6:
GSS 100%
1
0
32768
10000
10000
10000
100
HR40016 ADR 15 Modbus Address.
The Default address for TX transmitter boards is 21. Sensors will respond to the
configured address ortothe address 0xFE (254) allow for the connection to a sensor ofa
unknown sensor. Note that the address returned in the message is the address that is used
by the host. This is necessary to comply with the protocol rules.Note also address 0xFE is
outside the range of legal addresses.
Modbus broadcast address 0 is not supported at this time. Using address 0 will generate an
error: invalid command.

TX Rev. HCopyright © 2019 CO2Meter,Inc.
10
HR40017 ADR 16 Comm configuration (stop and parity)
The low order three bits define the Comm Configuration.
Bit 0 (LSB) is 0 for 1 stop bit (default) and 1 for two stop bits.
Bit 10= no parity, 1 = parity.
Bit 20= even parity, 1 = odd parity.
NOTE: These are not implemented in Ver 1 Build 0.
HR00020 ADR 19 Current loop test.
When >0<4096 will cause 4-20 mA output to operate at that level for trim test. Used to
establish level for 4 and 20 mA current output levels: HR 22-23

TX Rev. HCopyright © 2019 CO2Meter,Inc.
11
Chapter 4 Device Commands
General
Device commands initiate operations in response to messages from the host. Note that
Device commands are not defined in the Modbus Specifications but are specific to the
device (TX).
Commands are used for operations such as calibration, error handling, and saving holding
register content to non-volatile storage. Commands are also used for certain factory
functions associated with the manufacturing and testing ofthe TX boards.
Command and parameter registers
Commands are written to Holding Register 40032 (Address 0x1F) parameters for
commands are written to Hold Register 40031 (Address 0x1E). A parameter if used and the
command are written in the same Modbus message.
Modbus function code16(0x10), Write Multiple Holding Registers, allows the parameter
and command to be sent in a single PDU.
Command Busy
Acommand can only besent to the device when it is not Busy. The Busy indication is
provided as the most significant bit in the Status Register (Input Register 30001 at address
0).
Command Execution
Commands are executed as soon as they are received. Ifa command is not valid for the
device then, one of the Command Error bits will be set in the status register. Error bits are
only valid when the status indicates not busy.
Holding Register 40032 (Address 0x1F)is automatically cleared when the command is
complete. Holding Register 40031 (Address 0x1E)is also cleared if the command was
successful. If anerror occurred, Holding Register 40031 (address 0x1E) may contain an
additional error code.
Note that some commands execute immediately, never posting a busy state. The error
status is always valid for the last command executed, Input Register 30001 address 0x00,
and if read, the Hold register 40032 (address 0x31) will be cleared indicating the command
executed.
Command Descriptions
Device Command 1 (0x0001) Error Reset
This command resets allerror bits. Note that certain hardware errors may cause bits to be
set again.

TX Rev. HCopyright © 2019 CO2Meter,Inc.
12
Device Command 2 (0x0002) Factory Use
This command is reserved for factory use.
Device Command 16 (0x0010) Save Holding Registers to Flash
This command saves the holding registers to Flash.
Device Command 17 (0x0011) Restore Factory Presets
This command will restore the factory presets to the holding registers. There are 7 groups
of presets numbered 0 to 6.The command parameter indicates which group should be
restored. Note that the retrieved values are not automatically saved to flash. Tosave the
registers to flash, a separate Device Command 16is required.
Device Command 32 (0x0020) Zero Calibration
This command sets the zero value for the sensor. The sensor should be shown 100%
nitrogen for approximately 1 minute prior to issuing this command. Holding registers are
automatically saved upon execution of this command.
Device Command 33 (0x0021) Calibrate to Span
This command calibrates the sensor based on the known concentration provided in the
command parameter. The concentration is expressed in 10’s ofppm. For example, for
20.9% the value should be 20900. All holding registers are automatically saved upon
execution of this command.
Device Command 34 (0x0022) calibrate to400 ppm CO2
Calibrate CO2 sensor to 400 PPM ambient, use the GSS “H”command.
Device Command 40(0x0028)suspend streaming
Suspend streaming, prior to sending the calibrate command to CO2 sensor.
Device Command 41 (0x0029)resume streaming.
To resume streaming, send after sending the calibration command.
Device Command 9985 (0x2701) Factory Use
This command is reserved for factory use.

TX Rev. HCopyright © 2019 CO2Meter,Inc.
13
Chapter 5 : Testing
WARNING: These instructions are intended for engineering personnel
familiar with the RS485 Modbus protocol.
Modbus Tool
The RS485 Modbus RTU protocol is a packet-oriented protocol. All the characters ofthe
packet must be sent in a single burst with no gaps and a valid two-byte CRC. The absence of
a character for 2.5-character times indicates the end ofa packet.
The slave device will not react to a packet unless the CRC is correct, and the address field is
that of the device. Due to these characteristics, it is not practical to test device operation
from a terminal emulator program.
Fortunately, there are several tools available for testing Modbus RTU devices. The
following sections describe the use ofone of these tools, Modbus Tool.
Modbus Tool is a free and open source Modbus Protocol testing program available as a free
download. The tool can bedownloaded from:
https://github.com/graham22/ModbusTool/blob/master/Setup/ModbusTool.msi
This windows installer package includes two programs. One program, “Modbus Master” is
used to simulate a host and a second program “Modbus Slave” is used to simulate a device.
The following instructions will use only the Modbus Master program.
Reference RS485 Modbus RTU Interface Manual for further information.
Serial Port
Modbus tool, aswell asmost other PC based tools for Modbus RTU devices, requires a
serial RS485 port that appears as a com port on the local system. FTDI manufactures a
smart cable well suited for this purpose. The manufacturers part number is USB-RS485-
WE-1800-BT.This cable is available from Digi-key, Mouser, and other electronic
distributers. A version with a longer cable is also available.
Drivers for FTDI cables are pre-installed on most Windows systems. The latest drivers are
also available from FTDI at the following link:
https://www.ftdichip.com/FTDrivers.htm
Cable Connections
The FTDI cables are color coded. The labeling on the TX uses “BData +” and “AData -
“conforming to the definitions ofA and B in the RS485 standard. The definitions on the
FTDI cable are correct for the Data Polarity but opposite for A and B.
The yellow FTDI wire should be connected to Pin 6 ofthe TX.The orange wire should be
connected to Pin 4. Note that, in general, the Data+ and Data- labeling ofdevices is

TX Rev. HCopyright © 2019 CO2Meter,Inc.
14
consistent across most RS485 devices. The labeling for A and B is often opposite of that of
the standard (Due to a different labeling convention used bymanufacturers ofthe
semiconductor interface devices).
Power Connections
The TX must be powered for proper operation. The DC power supply input is specified
from 6V to 24V. Many devices will operate with a power supply set aslow as 5V. If the 4-20
mA current output is not used, the TX device may be powered from the 5V USBavailable
on the FTDI connector. Note, however, that this is not recommended.
WARNING: Use care when connecting DC power. While the DC power and
Ground connections are protected against reverse polarity, all other pins on
the connector will be damaged if DC power is applied.
Configuring Modbus Tool
Start the Modbus Master tool. A graphical interface will appear like Figure 5-1 Holding
Registers.
The communication mode should be set to RTU. Select the COM port ofyour FTDI RS485
cable (or other RS485 device). The other communication settings should match the figure.
Before connecting, set the slave ID to 21. This isthe default Modbus address of
CO2Meter.com devices. Alternatively, you can set the ID to 254. All CO2Meter.com devices
will respond to address 254, regardless oftheir configuration. Useful for operating/
interrogating unknown address boards, donote that only one board may be connected at
time.
Using the Modbus Tool
Press the connect button. This will connect the program to the FTDI smart cable. Ifthe TX
device is powered and the RS485 connections are correctly made, the Modbus Master tool
will be able to issue commands to the device. The red and green led lights on the FTDI
cable indicate transmit and receive of data.
The Modbus Master tool allows you to specify a starting address and a number ofregisters.
As the TX has 32registers in both the Holding Register and Input Register ranges, set the
Start Address to 0 and the size to 32. You must hit the “Apply” button after changing any
ofthese values.
The TX supports the commands; Reading Holding Registers, Read Input Registers, Write
Single Register and Write Multiple Registers. The other functions are not supported.
Communication Log
Modbus Master provides a log ofthe TX and RXcommunication activity in the lower
portion of the screen. This provides the hexadecimal values ofthe byte sent and received.
Table of contents
Other Co2meter Controllers manuals