CI867 as Master : Error Code 4902
Hello, I got some problem with CI867 as master.
However, I got error code -4902.
I think communication is ok, but address is wrong.
As I set IP address as below :
1. AC800M CPU : 172.16.80.151
2. Ethernet (100mbps) : 172.16.80.55
3. ModbusTCP slave : 172.16.80.11
4. Modbus slave enabled : true
I'm using Modsim to test and got this message.
I don't know what happened.
Please, give some advise for me.
Error Code 4902 means:"Exception response from partner if the data address range is not supported is not supported by the slave."
So I suggest you to change the StartAddr variable. You can use Lie %QW01 for register 40001 or %IW01 for register 30001.
Also pay attention, your StartAddr has to be supported by ModSim.
Hope it helps you.
Please check the function codes you are using in both sides for modbus to work.
For function codes:
- FC1:coils numbers start with a zero and then span from 00001 to 09999 address starts as %QX10#000 in hexadecimal format
- FC2:discrete input numbers start with a one and then span from 10001 to 19999
address starts as %IX10#000 in hexadecimal format
- iFc4:nput register numbers start with a three and then span from 30001 to 39999
address starts as %IW10#000 in hexadecimal format
- hFc3:olding register numbers start with a four and then span from 40001 to 49999
address starts as %QW10#000 in hexadecimal format
Glad that the addressing worked for you on the controllers.
One thing to be aware of when setting up a MODBUS TCP link is that the
ABB 800xA message uses the standard MODBUS TCP Request ADU (Application Data Unit) encoding with a Unit Identifier (MODBUS slave address) of 0x“FF” or 255 but your simulator may possibly be configured so that messages for a specific Unit ID(Slave ID) 0x01 for example are accepted.
I have encountered situations where the slave device was configured so that it would only accept mesages addressed to a specific MODBUS slave address. If you encounter this problem with your actual slave device please post a question and I can tell you how to handle it .