dmeherg

Modbus Assistance

10 posts in this topic

I am having to work on my first project reading Modbus from a Lantronix X-Press DR module via Ethernet to a 1769- L33ER processor. I have the Modbus mapping that I am needing to read. Can someone assist me in how to set this device up and start puling information from it?

Share this post


Link to post
Share on other sites

Is your Lantronix device the ordinary XPress DR, or an XPress DR IAP with the "Industrial Automation Protocol" features ?    

What sort of Modbus serial device is it connected to ?

My understanding is that these devices are delivered with only the standard serial tunneling firmware installed, and that you have to download and configure the "IAP" protocols.

I am not sure that the IAP models support EtherNet/IP on the Ethernet side, or only Modbus/TCP.   What is your reading of the manuals ?

Share this post


Link to post
Share on other sites

Second question:  are you tied to the XPress DR-IAP, or do you have the option to buy a different device ?

My reading of the firmware release notes is that this is purely a Modbus TCP to Modbus RTU Serial gateway, and you would have to use the Rockwell example code to implement a Modbus/TCP Client on the CompactLogix.     This is not a job for a novice:  it takes up a large amount of memory and is tricky to troubleshoot.

Share this post


Link to post
Share on other sites

I am using the Lantronix XPress DR. This was installed by the OEM when this panel was installed.  I am new to the company and given this task to setup.  The Module is communicating to a heat trace cabinet. I have attached the documentation that I have for the Lantronix device and the heat trace cabinet Modbus mapping.

 

I have also looked on Lantronix site and they offer no add-on, or examples to communicate with their device. I also looked at the code in the example portion of 5000 and it's a lot of code to tackle to get these data values.

EN-NGCUIT2ModbusProtocol-IM-H57880.pdf

Modbus_Protocol_UG_Rev_J.pdf

XPress-DR_QS_Rev_C.pdf

Share this post


Link to post
Share on other sites

Ugh.   I don't know your OEM's intent, but I'd say they delivered an almost-unusable device for your application.

I think that LanTronix has hardware/firmware keying that prevents you from loading the "IAP" firmware onto an ordinary XPress-DR, so you're stuck with a device that provides reliable serial tunneling over IP, but is not appropriate for converting from EtherNet/IP to Modbus RTU.

Do you have any other tools at your disposal in this system, like a PC-based HMI that could read this data ?

The PentAir manual even says "this interface is meant for our HMI and software and is tricky to use with a DCS or PLC".     

The first thing I would do is narrow down the Modbus data you want to read, and use a Modbus polling utility set up on a PC with the XPress-DR acting as a "virtual serial port".    Once you get that going you will have established that the serial port on the PentAir device works, and that the data is accessible.

Then determine what you're going to replace the XPress-DR with.    There are a bunch of options, all in the $400 - $1000 range, with a wide range of ease-of-use. 

It is (probably) technically possible to use the XPress-DR with the CompactLogix by modifying the Rockwell sample code for Modbus/TCP.     I'm an expert with industrial automation protocols and I wouldn't invest my time to do it when a hardware solution is available.

Share this post


Link to post
Share on other sites

The most crucial data to read is the circuit status of the heat trace zones. After seeing that there is a ton of programming to be done in the back ground, they may consider something different hardware wise if that was an option. Is there a much better/easier hardware solution (if possible), that you would recommend to read this certain amount of data?

Share this post


Link to post
Share on other sites

What exact block of data is the circuit status for the heat trace zones ?   I don't know that device so I get confused by the difference between status and alarms.

There are a bunch of different devices you can use to bridge between EtherNet/IP and Modbus RTU, with a wide range of prices and ease-of-use.

My recommendations, from easiest to hardest:

Real-Time Automation 460ETCMM (polls Modbus RTU slaves, writes their data to ControlLogix)

MicroLogix 1100 with 1763-NC01 communication cable

HMS Fieldbus Communicator Modbus RTU

Red Lion DataStation Plus (DSPLE model)

Digi One IAP

GridConnect Net485 EtherNet/IP to Modbus RTU RS-485

 

And a tool you should have any time you are using Modbus:

https://store.chipkin.com/products/tools/cas-modbus-scanner

 

If this were my project, I would grab either the HMS Fieldbus Communicator or a Red Lion DSPLE.     I know both products well and I generally want more flexibility and power and don't care as much about hardware cost because my time cost is high.

If you're a complete novice and want the easiest-to-use thing, get the Real-Time Automation bridge device.    Their browser-based setup and device-initiated tag reads/writes are probably the easiest way to set up a Modbus RTU to ControlLogix/CompactLogix interface.      Call to be sure you're getting the right one for your application; I initially cited the wrong model number above.

A colleague of mine put it succinctly:  "I use RTA because I'm hungry and want to be done before lunch."

Edited by Ken Roach

Share this post


Link to post
Share on other sites

Thank you as always Ken. I am a novice when it comes to Modbus communications. I have been in programming a long time,  and this is the first time a project that I had to set-up has been dropped in my lap.  I will look at these options more in depth.

By looking at the options in the manual, I am thinking we would only want to know the circuit status alarms which begins with address 8001. This way we could get some type of feed back or warning in case of a failure in the loops.

Share this post


Link to post
Share on other sites

OK, the Circuit Status Flags start at offset 8001 and are five hundred 4-register blocks.

Those are described as Modbus "Input Registers".     Here's one of the ways that Modbus protocol can get confusing.

Back in the Modicon controller days, Input Registers were prefixed with a "3".     So your first Input register was often called "Modbus Address 30001".

These are different from the most common type of Modbus register, a Holding Register.   Holding Registers were prefixed with "4", so "40001" was your first Holding Register.

The twist ?   The Function Code 3 was used to read Holding Registers (40001) while the Function Code 4 was used to read Input registers (30001).

Determine how many blocks of that Circuit Status Flag data you want to read, and test polling it from the PentAir device by using a Modbus master emulator like that Chipkin program or the classic ModScan32.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now