JatCosta Posted February 18, 2020 Share Posted February 18, 2020 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? Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted February 18, 2020 Share Posted February 18, 2020 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.