In this tutorial, we will be demonstrating connectivity to a HART device using an RS-232 HART Modem.
The configuration used in this example polls PV values from any HART device with an address of 0-15 on a HART network. We will use a RediGate 110e to demonstrate this connectivity, but this tutorial can be applied to any RediGate device with an available serial RS-232 port.
This tutorial also goes on to explain how to set up the RediGate to convert HART values to Modbus TCP registers, which would require that your RediGate has an open Ethernet or Cellular connection that can be polled by a Modbus TCP master device.
- A RediGate 100 or 400 series device with an available serial port
- Completion of the Getting Started Guide for your respective RediGate device (RediGate 100 or RediGate 400)
- An RS-232 HART modem (such as ProComSol or Viator)
- A HART device (addressed 0-15) connected to the HART modem
Example 1: Polling HART PV Values with the RediGate
- Confirm that the HART modem is properly connected to the RediGate and your HART network – the leads on the modem should be placed across the 250 ohm resistor of the HART circuit:
- (TANDY TO ADD NETWORK DRAWING HERE)
- Using ACE, open the default config you used in the "Getting Started Guide."
- Download the Elecsys-HART-Demo.xml from the http://redigate.elecsyscorp.com site and open the downloaded .xml file within the same ACE window as your "Getting Started Guide" configuration.
You will need to extract the .xml file from the .zip file you downloaded from the website. By default, ACE stores configuration files in the Documents\Elecsys\ACE\CFG folder, but you can store the configuration in any file location accessible by the ACE program.
You cannot copy/paste nodes unless both configurations are open within the same instance of ACE. You can use the "Tile" buttons to have the windows automatically size themselves within the ACE program:
- Modbus Slave Channel 0
- OpenModbus Slave Channel 2
Connect to the RediGate's MMI and check Diagnostics option 9 to determine which HART device(s) are polling successfully:
In the above screenshot, the HART device with short address 3 is the only device being polled successfully because it is the only device on the network
- PV values for each device are stored in RTDB registers 42002-42006, so to view those values, perform an RTDB data dump on the address of the HART device
- Options 3 → 18 → 0 → (address of HART device, in this example it is 3, but that well vary) → 42001 → 6 → F
The values displayed in the RTDB dump should correspond to the PV values in the HART transmitter. For more advanced configuration options, please see the Protocol_HART-Master documentation. To connect your HART data to an IoT platform via MQTT, visit the IIoT Platform Quick Starts page. To setup the RediGate as a Modbus slave device, proceed to "Example 2" below.
Example 2: Polling HART PV's as Modbus Values
The “HART device scanner” configuration includes a network Modbus channel (IP port 3040 for encapsulated Modbus, or port 502 for Open Modbus/TCP). This allows a Modbus host system to read HART data from the RediGate. All Modbus slaves are set to report 32-bit data as pairs of 16-bit registers, but they can be configured to respond with 32-bit registers.
The table below outlines how the RediGate maps the HART values to Modbus slave addresses:
16-bit Slave register
Command register (see below)
Response register (see below)
CMD 00 - Expanded device type
CMD 00 - Min number of preambles, request message
CMD 00 - HART protocol revision
CMD 00 - Device revision level
CMD 00 - Software revision level
CMD 00 - (MSB 5 bits) Hardware revision level
(LSB 3 bits) Physical signalling code
CMD 00 - Flags
CMD 00 - Min number of preambles, response message
CMD 00 - Max number of Device Variables
CMD 00 - Configuration Change Counter
CMD 00 - Extended field device status
CMD 00 - Manufacturer ID code
CMD 00 - Private label distributor code
CMD 00 - Device Profile
CMD 00 - Device ID
CMD 13 - Tag (3 bytes/4 characters per register)
CMD 13 - Tag
CMD 13 - Descriptor (3 bytes/4 characters per register)
CMD 13 - Descriptor
CMD 13 - Descriptor
CMD 13 - Descriptor
CMD 03 - milliamp
CMD 03 - PV1 (also CMD 01)
CMD 03 - PV2
CMD 03 - PV3
CMD 03 - PV4
CMD 38 - Reset configuration change flag
CMD 42 - Master reset (reboot device)
There are two Modbus slave devices defined in the configuration:
HART device information from one device. Channel 0, device 1 is specified by default. To see device data for a different HART device, modify the configuration for “Modbus NetSlave unit 1”, and/or “OpenModbus Slave unit 1”. Or, add a similar Slave Attach object pointing to a different Channel/RTU and using a different Modbus slave address. See the table under Modbus Map for a list of Modbus registers to use for device values. Note that the data for commands other than CMD00 will only appear in these registers upon request through the Custom Report #3 (see Diagnostics via MMI) or by writing the poll index value to the Command Register.
Communication status values for all HART devices (0=failed, 7=good comms)
30001-30016 Status for COM1, HART devices 0-15
For more information on configuring the RediGate as a Modbus slave, see Modbus TCP Slave Configuration and RediGate Configuration Manual#NetworkSlaveChannel(SlaveNetwork,SlaveModbusTCP)