Just read this prior answer regarding MODBUS function codes:
Re: VLINX MESR911 ModBus TCP to Modbus Serial Converter to Badger M-5000
« Reply #1 on: August 19, 2013, 05:40:00 PM »
Currently the Modbus driver doesn't support floating point. Modbus works by function code, so AdvancedHMI could be using a function code that is not supported by your device. Below is the code that parses the addresses and converts it to function code. It's based on the first digit of the address and only 0,1,3, and 4 are supported.
The easiest troubleshooting route may be to use wireshark to look at the packets and see what function codes are working.
Code: [Select]
Select Case CInt(AddressFirstDigit)
Case 0 : m_ReadFunctionCode = 1
WriteSingleFunctionCode = 5
WriteMultiFunctionCode = 15
m_BitsPerElement = 1
Case 1 : m_ReadFunctionCode = 2
WriteMultiFunctionCode = 0 '* Invalid
m_BitsPerElement = 1
Case 3 : m_ReadFunctionCode = 4
WriteMultiFunctionCode = 0
m_Element = CInt(Address.Substring(1)) - 1
m_BitsPerElement = 16
Case 4 : m_ReadFunctionCode = 3
WriteSingleFunctionCode = 6
WriteMultiFunctionCode = 16
m_Element = CInt(Address.Substring(1)) - 1
m_BitsPerElement = 16
Is it still working like this?
That would mean if address is 4xxxxx, Functioncode will be automatically: 3
Am I right?