modbus the open protocol

Sometimes I like to say the only thing standard about Modbus is the name ;-). (That's too harsh but gets the point across).

As other have mentioned, I still like and use it (because I understand most of it's quirks). However, I would not use it anywhere that security is required.
 
Modbus register maps are the armpit of all technical documentation. ...


...
Supported function codes need to be listed.

It is all good until they explicitly state they need function 3, but they actually need 4, or when they say use "read multiple registers" but support reading only one register at a time :) ..

Still, love modbus.. You can always get around the problems.. With other protocols, if they don't work from the first try, they just kind of don't work..
 
LOL.

Make sure they know that the numbering system of the data and addressing models are inconsistent, arbitrary, opaque, ridiculous, poorly-designed, etc. E.g. the prefix (4 in 40001) of the model address is only a loosely-held convention that has nothing whatsoever to do with the function code e.g. function code 3 reads holding registers 4xxxxx and function code 4 reads input registers 3xxxxx.

The main tricks to getting it to work are

  • deducing the data and wire addressing models for each party, client and server, and
  • never assuming there is any kind of a standard for anything except the bits on the wire.
In light if that second point, it might be worth the effort to put a USB-serial port (or a TCP server on port 502) on a laptop and write a simple Python script to accept a client request; once they see the bits and bytes, the light should come on and the rest is bookkeeping.

As much as mock Modbus, the website at modbus.org and the protocol specification documents are pretty good.
_

Where was this when I was trying to learn how to read and figure out modbus addressing for the first time.... I looked at prewritten code, then thought I found a good guide as to how it's addressed.... but the working code and the well written guide didn't match at all (different devices).

Eventually I came to this conclusion after some long hours of reading through 'stereo instructions'.
 

Similar Topics

Hi every one. I have strange problem with Modbus communication in Citect 2018. I am communicating to the site switches through Modbus TCP protocol...
Replies
0
Views
1,044
Anyone have any experience using a modbus to can bus converter, basically I have can master that I need to pull analog data from a modbus slave...
Replies
1
Views
1,628
Hello all, I have tried to communicate my PLC S7 315-2 DP as Client with Open Modbus to Delta V, I have followed the procedure to register the...
Replies
4
Views
6,596
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click On Error GoTo errorhandler...
Replies
4
Views
5,689
Hello, I need to access the bits from the fire system control panel through RS-485. So, I used Read Var block to read from the panel...
Replies
0
Views
44
Back
Top Bottom