Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Did you mean: 

HART or Modbus protocol

I need to be able to modify the various calibration data held within an Emerson (micro-motion) RTF9739 Transmitter that is currently being used in a test rig. Because Labview is used to control the overall functioning of the test rig I was wondering if its possible to use Labview to communicate with the transmitter using either Modbus or HART.
As I understand it, from other threads on the forum it appears that Modbus would probably be the best way to go as it is supported by Labview, am I correct in this assumption?
Does anyone know of any links etc that might give guidance on creating the VI's for such a task,
Labview Version 8.5
Labview Version 8.6
Labview Version 2014
0 Kudos
Message 1 of 26

Hi John,

Indeed there is a LV ModBus library. You can find it here

I use a modbus protocol for our modules. I don't use the library, for me it is easier to compose the commands myself and read all the data from the modules.

It all depends on what you want to do and what you want to see

Message 2 of 26


The Micro Motion RFT9739 transmitter can talk both HART and MODBUS protocols. If you are planning on using the labview interface for configuration of the transmitter, you should use MODBUS protocol.

Here is a link to the Micro Motion MODBUS Mapping Assignments manual. MODBUS Mapping Assignments Manual



Message 3 of 26
KC & Bobad

Thanks both for your advice which is greatly appreciated. I thought I had found an instant solution at one point from a company called Cardiac who had developed a program called 'HL-Link Pro' using labview VI's but unfortunatly they no longer sell or support it.

I have downloaded the Modbus library from NI as suggested and should get some time over the next few days to try and get my head around it. After doing a bit of reading up it appears that the HART configuration uses the BELL 202 FSK for communication which apart from the software issue would mean building or buying a modem. With the Modbus option it uses RS485 which is fine as I have RS232 - RS485 converters used in some of my other designs, so that's one step closer!

When searching the forum a few days ago I came across this discussion that was for a similar application with an example of the code being worked on. KC, would I be right in saying that in this instance the software was not written using the NI Modbus library (perhaps it was not available at that time) and the code was created as required, similar to your approach, or have  I missed the plot?

Bobad, thanks for link to the Emerson Modbus documentation, I had only managed to find the one on the HART communication method and that was directed towards using the Emerson 275 handheld programmer.

I will let you know how I get on ,

Thanks John

Labview Version 8.5
Labview Version 8.6
Labview Version 2014
0 Kudos
Message 4 of 26

Hi John,

I don't know when the ModBus library came available.

One of the reason for my solution was that I use this for testing the modbus modules. I want to see all data comming back from a module to be able to see all different kind of errors. Beside the standard commands we also use a lot of non standard modbus commands.

Sometimes I have to analyze modbus data to retrieve a error cause. It is handy to know the commands down to the byte level. Makes it easier to wire LV programs to help analyzing the data.

The Hart protocol is modulated on top of the 4-20mA current loop. You always have to use a special Hart terminal/programmer for communication.

0 Kudos
Message 5 of 26

I rewrote a driver for a brooks flowmeter with a hart protocol.
the software can be found in this forum

greetings from a wet country
greetings from the Netherlands
Message 6 of 26

Hi Albert

Sorry for delay in reply but got waylaid with other problems on project and only just managed to get back to this issue.

Initially to check things out I have been using a Hart modem from Microflex and the free version of the European Consortium Hart software 'PACTware 3.0. This allowed me to talk to the Micro motion RTF 9739 and get basic information such as ID, flow rate etc, so the hardware coms was confirmed. Unfortunatly Emerson do not support DTM files so that was as far as I could go.

I then tried your Hart vi's but keep getting communications error. I know the hardware is ok but cannot see where the problem could be.

As suggested l also tried using Modbus from the NI librarys talking over the RS485 half-Duplex link (used ni PCI RS486 8 channel card) but no luck there either. Oscilloscope sees the RS485 data stream so I know it is present at the flowmeters RS485 connection but no response from the unit.

Totally stumped and out of ideas!



Labview Version 8.5
Labview Version 8.6
Labview Version 2014
0 Kudos
Message 7 of 26


With the MMI RFT9739 transmitter, trying to communicate MODBUS over RS485. Please confirm dipswitch number 5 is in the OFF position (STD COMM). Standard communication on the 9739 is 9600 baud, 1 stop bit, ODD parity. The default address is address 1. 

If the RFT9739 has a local display, you can configure the communications through the display. All of this information is available in the RFT9739 user manual on page 10.

For HART communications, as you stated, you could get a response from other software. The 9739 will respond to any HART universal command. I haven't checked the linked software.

If you are having trouble with the 9739 communications, give the 1-800 number a call. Ask for me. I can probably talk you through any questions you have in about 10 minutes.



Bob Adams

0 Kudos
Message 8 of 26

Hi Bob

Thanks for info. Already tried the settings you suggested, but no luck. Tried the std comms on 5 and also tried the user defined, but with same spec as std (just in case??, live in hope!), but still no joy. Unsure if the 1-800 number will get me through from France?



Labview Version 8.5
Labview Version 8.6
Labview Version 2014
0 Kudos
Message 9 of 26


The User Definded setting defaults to (oddly enough) HART protocol at 1200 baud, one stop bit, ODD parity. Default address is 0. Yes, this is on the RS485 circuit, not the mA connection.

However, if you are not connecting with MODBUS, I doubt the user defined setting will work either.

Two choices. First, any chance of getting a bus trace to see the actual commands being sent to the transmitter (and maybe the response).

Second, I don't want to use if the transmitter is working properly with mA or frequency output. A master reset can be done on the transmitter. This will wipe out all configuration information. All calibration information will have to be re-entered. Dip switch 4,5,6, and 10 in the ON position, followed by a power cycle. Then reset all dip switches to the OFF position, then power cycle again. Then try connecting to the STD COM setting of MODBUS rtu, 9600 baud, 1 stop, ODD parity, MODBUS address 1 on connections 26 and 27. (By the way RFT9739 RS485 polarity is reveresed from normal, B is positive, and A is negative)

Also, we do have customer support in the Netherlands, they have a good English speaking trouble shooter named Albert, if he is available. Look at the back of any manual for the correct phone number.

Bob A.

Message 10 of 26