LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Modbus Library


@LV_Pro wrote:

Sorry, the error I am getting is "Error 538182 "Modbus Error: Illegal Data Address"....My issue is trying to figure out what the new ones, Micro820, (apparently AB is/has phased out the MicroLogix 800 series) aren't happy with, what a valid address for it might be. 

The manufacturer should have provided a "Register Map" that lists the proper address(es) for the values you need to read/write and when reading registers how to scale the integer(s) to the proper numeric value. Without that you are kinda hooped.

 


========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 11 of 17
(115 Views)

Are there any protections in place to prevent reading some addresses on your new system? Can you read ANY addresses? I'd try writing a program to scan them individually, one at a time, and see when/if it throws an error. Or, like someone else mentioned, get a general Modbus tool to make sure the thing will actually talk to you.

 

Also, I second the advice to sniff the packets. Use NI IO Trace if you can, or try HHD Device Monitoring Studio (if it's serial).

0 Kudos
Message 12 of 17
(99 Views)

As I recall, some devices will let you read any number of registers at once, but some will complain if you try to read more than what is specified as one entry.

 

IE if there are two floats at registers 20,21,22,23, some devices would let you read all 4 registers at once. But some will throw an error if you try to read more than 2 registers from each location. 

0 Kudos
Message 13 of 17
(92 Views)

To me, this sounds like a missing configuration on the PLC side. Do you maybe need to map values to modbus registers?

0 Kudos
Message 14 of 17
(65 Views)

@StevenD wrote:

 

IE if there are two floats at registers 20,21,22,23, some devices would let you read all 4 registers at once. But some will throw an error if you try to read more than 2 registers from each location. 


I don't remember ever running into anything like that, but it is very common to get the illegal data address error when you try to read any address which isn't explicitly supported by the device (so if the documentation tells you there are values only at registers 22 and 23, then trying to include registers 21 or 24 in a read command will result in an error). With the off-by-one error, it becomes easier to run into this issue. That's why I suggested starting with a generic program and just looking at the actual values which can be read (and mainly getting the documentation).

 

The other thing which exists is that Modbus has a 125 registers per read "limit" (which like other things in Modbus, is somewhat fluid). That said, I doubt this is the issue in this case (and I don't know which error it would return).


___________________
Try to take over the world!
0 Kudos
Message 15 of 17
(57 Views)

@RTSLVU wrote:

@LV_Pro wrote:

Sorry, the error I am getting is "Error 538182 "Modbus Error: Illegal Data Address"....My issue is trying to figure out what the new ones, Micro820, (apparently AB is/has phased out the MicroLogix 800 series) aren't happy with, what a valid address for it might be. 

The manufacturer should have provided a "Register Map" that lists the proper address(es) for the values you need to read/write and when reading registers how to scale the integer(s) to the proper numeric value. Without that you are kinda hooped.



Should is the keyword here. Some manufacturers want their users to stay with their own tools and hide or obfuscate such information by various means. I would imagine that A-B, aka Rockwell Automation believe that their tools are so superior that anybody trying to use something else must be nuts. They may advertise Modbus capabilities in the marketing literature, but make it harder then necessary to use that since using their integrated programming environment and HMI software is SO MUCH better to use (also for their bottom line of course 😀).

Other manufacturers simply put such functionality behind a license key that you have to purchase separately if you choose to refuse to use their own tools!

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 16 of 17
(49 Views)

@LV_Pro wrote:

Sorry, the error I am getting is "Error 538182 "Modbus Error: Illegal Data Address". Understand, this program has worked, literally for years, on Allen-Bradley MicroLogix 800 series PLCs. My customer, the system constructor, switched to an Allen Bradley Micro820, which, despite the similarity in names, is not in the same hardware family. My issue is trying to figure out what the new ones, Micro820, (apparently AB is/has phased out the MicroLogix 800 series) aren't happy with, what a valid address for it might be. 


My guess is that they remapped the Modbus addresses more or less completely to a different range due to the fact that the native register map probably got completely redesigned, if it is really a very different device.

Seems the MicroLogix820 is in fact even designed by a third party, so it is even more likely that the internal native register map was completely redesigned from scratch, and the according Modbus wrapper probably does a very different mapping to Modbus register numbers (or even may require some license activation to be able to use it).

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 17 of 17
(30 Views)