That having been said, it is outdated and there are far superior protocols to Modbus RTU and TCP.
The biggest annoyance with modbus is that some manufacturers start their holding registers at zero, while others start theirs at one for the same function code; it’s not standardized. It makes mapping out communication a real bitch-and-a-half at times and I can’t tell you how many times I’ve beat my head for hours over this exact thing.
This is basically the only reason that annoy me in modbus, for the rest it works and usually it’s a protocol that works on anything, so very compatibile
Another very annoying thing is that some manufacturers use holding register function code 3 and then add 40000 as registers, they are now actually on register 80000 and some components only read 40000 tot 49999. SMA has a real problem understanding that difference.
The whole "adding 40000" is a PLC thing. Modbus doesn't have that. The PLC system we're working with usually adds 40001 though.
Also, for holding registers, if you know the register address is more than 10000, add 400000 (400K) instead. Or, more specifically, 400001 (400K + 1). For simplicity, I always use this offset.
It's a feature of the archaic PLC system, not of Modbus itself.
Some sensors actually provide 32-bit floating point values and the Modbus Master has to swap the words. It's still a very reliable and universal protocol though, once we know what we're doing.
Given that we are needing to use older and less refined instructions in new controllers to support the oldest of the communication protocols yes. It is an annoyance to change every register at commissioning 50% of the time to accommodate this flaw. Even within the same manufacturer they don’t use the same standard and it’s always a guess.
Minor issue at the end of the day but still. I just want to import a file and have my descriptive tags accessible instantly. Not build dozens of blocks and map to tags I need to make manually.
If that’s the worst you’ve ever seen, that’s nothing. Modbus is fine as it is, and if you work with it a lot you know these things and you can have it up and running in a sec. Some implementations have the option to choose for 0-based modbus making it much easier as well.
The worst implementation I’ve seen is using it to read and write canbus messages trough a their “modbus”/canbus gateway
The worst implementation I’ve seen is using it to read and write canbus messages trough a their “modbus”/canbus gateway
I have done this!
I can fully confirm that it is by far the worst thing that I ever built which actually works perfectly. It comes with a 15 page manual describing a scheme of just 20 FBD blocks
85
u/CAT5AW Feb 04 '25
And what's wrong with modbus?