Sign in to follow this  

Modbus Timeout after adding 3rd device?

Recommended Posts

Hey AzeoTech Folks,

I am running into a Modbus illegal address and timeout warning after I add more than two devices:



When I have only 2 devices it is fine...  Any Ideas?




Share this post

Link to post
Share on other sites

Illegal data address comes from the device and is a Modbus error code, not DAQFactory.  This can happen in one of several ways:

1) you are requesting an address that doesn't exist
2) you are using the wrong function (i.e. reading a holding register when in fact it is an Input register)
3) you are off by 1 register on a 32 bit value (U32, S32, float).  Remember, 32 bit values require 2 modbus registers, so you'll see in your docs that the addresses jump by 2's.  If it says 2, 4, 6, etc. and you try and read 1 or 3, then often the device will send an illegal address error because in order to read address 1, you really have to read 0 as well and combine them.
4) on that same note, you try and read a 32 bit value, but only request one register (because the I/O type is set to a 16 version).
5) you are using 0 based tag #'s for one device and 40,001 based tag numbers for another.  You have to choose which and stick with it.  I personally always use 0 based to avoid any confusion and because that is what is in the low level Modbus request anyway.  40,001 just gets converted to 0 before going down the wire to the device.  The whole 40,000 and +1 part is just fluff added many years ago when they thought it would be confusing for people to count from 0.

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
Sign in to follow this