meta data for this page
Differences
This shows you the differences between two versions of the page.
| com:basic_modbus [2023/07/04 17:30] – created - external edit 127.0.0.1 | com:basic_modbus [2025/11/19 21:42] (current) – vamsan | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| **Not to be confused with M-Bus!** | **Not to be confused with M-Bus!** | ||
| - | Modbus is a data communications protocol | + | Modbus is a data communications protocol |
| - | Modbus is popular | + | Modbus is widely used in industrial |
| - | The Modbus protocol uses character | + | The Modbus protocol uses serial |
| - | Modbus is often used to connect a plant/system supervisory computer with a remote terminal unit (RTU) in supervisory control and data acquisition (SCADA) systems. Many of the data types are named from industrial control of factory devices, such as ladder logic because of its use in driving | + | Modbus is commonly |
| - | The development and update | + | The development and updates |
| ===== Modbus TCP ===== | ===== Modbus TCP ===== | ||
| + | {{anchor: | ||
| Modbus TCP/IP or Modbus TCP – a Modbus variant used for communications over TCP/IP networks, connecting over port 502. It does not require a checksum calculation, | Modbus TCP/IP or Modbus TCP – a Modbus variant used for communications over TCP/IP networks, connecting over port 502. It does not require a checksum calculation, | ||
| \\ | \\ | ||
| Line 20: | Line 21: | ||
| ===== Modbus RTU ===== | ===== Modbus RTU ===== | ||
| - | Modbus RTU (//Remote Terminal Unit//) – used in serial (typically **RS485 2W-cabling** or **RS-232**) communication, | + | {{anchor: |
| + | Modbus RTU (//Remote Terminal Unit//) – used in serial (typically **RS485 2W-cabling** or **RS-232**) communication, | ||
| \\ | \\ | ||
| - | The RTU format | + | The RTU format |
| ===== Limitations ===== | ===== Limitations ===== | ||
| - | * Since Modbus was designed | + | * Since Modbus was created |
| - | * No standard way exists | + | * There is no standard way for a node to obtain |
| - | * Since Modbus is a client/ | + | * Since Modbus is a client/ |
| - | * Modbus is restricted | + | * Modbus is limited |
| * Modbus protocol itself provides no security against unauthorized commands or interception of data | * Modbus protocol itself provides no security against unauthorized commands or interception of data | ||
| - | * **[Addressing]** | + | * **[Addressing]** |
| - | * When using the extended register referencing, | + | * When using extended register referencing, |
| - | * **[Data Endianness]** Multiregister data, like single-precision floating point value, can be easily transferred in Modbus by splitting the data across two registers. Because this is not defined | + | * **[Data Endianness]** Multiregister data, like a single-precision floating-point value, can be easily transferred in Modbus by splitting the data across two registers. Because this is not specified |
| - | * **[Strings]** Strings can be easily stored in Modbus registers. For simplicity, some implementations require | + | * **[Strings]** Strings can be easily stored in Modbus registers. For simplicity, some implementations require string lengths |
| - | * **[Monomaster]** The original Modbus assumes a monomaster network or point-to-point connection. In both cases, a master and at least one slave are required | + | * **[Monomaster]** The original Modbus assumes |
| {{ : | {{ : | ||
| - | * **[Multimaster]** Several masters can be present on the Modbus network | + | * **[Multimaster]** Several masters can be present on the Modbus network |
| {{ : | {{ : | ||
| - | ===== Modbus | + | ===== Modbus |
| ^Object type^Access^Size^Original address space^Extended addressing*| | ^Object type^Access^Size^Original address space^Extended addressing*| | ||
| Line 51: | Line 53: | ||
| ^Holding register|Read-write|word (16 bits)|40001 – 49999|400001-465535| | ^Holding register|Read-write|word (16 bits)|40001 – 49999|400001-465535| | ||
| \\ | \\ | ||
| - | *: for example with Simatic | + | *: for example, with Simatic |
| \\ | \\ | ||
| ===== Modbus Function Codes ===== | ===== Modbus Function Codes ===== | ||
| - | Modbus protocol defines several function codes for accessing | + | The Modbus protocol defines several function codes for accessing registers. |
| - | Most manufacturers only implement the " | + | Most manufacturers only implement the " |
| ^Function Code^Register Type^frequency| | ^Function Code^Register Type^frequency| | ||
| Line 85: | Line 87: | ||
| ^ **Exception Code** | ^ **Exception Code** | ||
| - | ^ 01\\ (01 hex) | + | ^ 01\\ (01 hex) |
| - | ^ 02\\ (02 hex) | + | ^ 02\\ (02 hex) |
| - | ^ 03\\ (03 hex) | Illegal Data Value | A value contained | + | ^ 03\\ (03 hex) | Illegal Data Value | A value found in the query data field is not an acceptable |
| ^ 04\\ (04 hex) | ^ 04\\ (04 hex) | ||
| - | ^ 05\\ (05 hex) | Acknowledge | + | ^ 05\\ (05 hex) | Acknowledge |
| - | ^ 06\\ (06 hex) | Slave Device Busy | Specialized use in conjunction | + | The slave has accepted the request and is processing it, but it will take a long time to complete. This response |
| - | ^ 07\\ (07 hex) | Negative Acknowledge | + | ^ 06\\ (06 hex) | Slave Device Busy | Specialized use with programming commands.\\ The slave is processing a long-duration program command. The master should retransmit the message later when the slave is free. | |
| - | ^ 08\\ (08 hex) | Memory Parity Error | Specialized use in conjunction | + | ^ 07\\ (07 hex) | Negative Acknowledge |
| - | ^ 10\\ (0A hex) | Gateway Path Unavailable | + | ^ 08\\ (08 hex) | Memory Parity Error | Specialized use with function codes 20 and 21 and reference type 6 to indicate that the extended file area failed a consistency check.\\ The slave attempted to read extended memory or record file but detected a parity error in memory. The master can retry the request, but service |
| - | ^ 11\\ (0B hex) | Gateway Target Device Failed to Respond | + | ^ 10\\ (0A hex) | Gateway Path Unavailable |
| + | ^ 11\\ (0B hex) | Gateway Target Device Failed to Respond | ||
| ===== Sources ===== | ===== Sources ===== | ||