Modbus Timeout after adding 3rd device?


Recommended Posts

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.