-
Notifications
You must be signed in to change notification settings - Fork 26
function numbering wrong ? #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
0x,1x,3x,4x are just memory type identifiers notation and those identifiers do not correspond to Modbus function numbers:
This is an old notation used since the 1980s by Modicon (now Schneider Electric) in PLC software (e.g. Modsoft and Concept). And the elements use an address number (starts with 1, e.g. |
Hi,

I'm running my first tests after compiling the project myself.
I had unexpected results : I wanted to read holding registers, but I didn't receive the values I setup in the server.
On the server-app in the device window, tab 3x, I setup the value I wanted and in the same tab of the client-app I did the counterpart. Running this, I got the expected results. So far so good.
But then running my application I did not get those results.
After a lot of sniffing with wireshark, I found the server-app and the client-app have the numbering of the functions wrong.
I didn't pay attention to the logview but when I finally did I saw the same thing. Setting/getting things in the 3x fields resulted in function code '4' in stead of '3'. The reverse is similar : 4x gives code '3' in stead of code '4'.
See the enclosed image.
I hope I made myself clear. Is this a bug ? Or something from my own compilation-process ?
B.T.W. I compiled this on Kubuntu 22.04LTS.
Now I know this I can work around it, but it's annoying.
I'm also not sure about the numbering of the registers. I have to have an offset of 1 to the address of the registers, but that could be the way of modbus.
The text was updated successfully, but these errors were encountered: