Lynn's Industrial Automation Protocol Tips |
Home > Modbus > | ||||||||||||||
|
The information on this web page is either Lynn's opinion or something Lynn agrees with. He has complete control over its contents. Nothing contained within this pages is approved by or represents the opinion of Digi International, The Modbus Organization, the Modbus-IDA Group, ODVA, or any other organization Lynn is associated with. Modbus Protocol
Question? What are the minimum Modbus functions to implement? Answer: bare min is 3 & 16, but read below.
Pass-thru Ethernet Bridge Note: Most MB/TCP to MB/RTU bridges are blissfully unaware of Enron-MB. They forward a poll to read ten 4x registers and happily return a response of 10 or 20 or 40 bytes. They do NOT enforce any byte size expectation and leave that to the MB/TCP Master/Client to handle. Question? When are logical verse actual number used? Answer: No standard - depends on vendor There is no hard rules - some vendors do it one way, others do it the other way, and still others let you pick/configure which you want. Notation like 40001 or 4x0001 or 400001 are just for human use. The protocol (whether RTU, ASCII, or TCP) requires the offset 0 be used, not 1. I always recommend vendors and users document things in a three column format: 400001 0 Blah Blah Description 400002 1 Blah Blah Description and so on It's incredible how much redo this simple trick can save. You never know which form your users will need (calling it 40001, 1 or 0). Without this aid not only does the occasional intern do an entire project off-by-one, but even seasoned engineers can goof & configure a few data points off-by-one. When faced with a vendor asking for the actual number (0 not 1) it's just hard to keep mentally decrementing hundreds of numbers without a few slips. Question? What is exception 10 (hex 0x0A) used for? Answer: Exception Response 10 means "Gateway Path Unavailable". The Bridge (or proxy) could not route the request due to the destination being unconfigured. This is a HARD ERROR - your bridge should return it if retry is pointless. The only solution for a client seeing exception 10 is to notify a user to check the configuration. Question? What is exception 11 (hex 0x0B) used for? Answer: Exception Response 11 means "Target Device Failed to Respond". The Bridge (or proxy) failed to obtain a response from the target device on your behalf. This is a SOFT ERROR – your bridge should return it if a retry may help. We don't know if the target is off-line or just didn't answer due to a CRC error. Question? Can a Modbus Master access 9999 or 65536 registers? Answer: In theory 65535, but few devices have so many. Some software applications limit you to selecting 0-9999 by using the older 4XXXX notation, which just support 4 digits. But this is an application limitation - not a Modbus protocol limitation. Others will site limits of 9999 in Modbus/ASCII or from older Modbus protocol documents. All of these MAY HAVE BEEN true at one time, but now the Modbus specification formally allows all addresses 0x0000 to 0xFFFF or 65535 to be used. General question... can a master on the modbus access 65536 16 bit registers, (via function codes 3,4) on any slave device?Question? What happened to data type '2x'? Answer: I have been told ... I have been told in the early PLC where data tables where quite literally the PLC's core memory, there was a hardware-based drum sequencer card that was accessed as 2x. However, as PLC developed it quickly became apparent that this some function could be handled more effectively by placing the drum sequencer data in 4x holding register memory. |
|||||||||||||
Feedback - Contact | Lynn's Industrial Automation Protocol Tips | Copyright 2004-2007 |