This document has only the specific information about the device connection settings and its address syntax.
Refer to the User Guide for more information on the Device Module.
The terminology Master and Slaves refers to outdated terms. The Modbus Organization announced the replacement of "master-slave" terminology with "client-server" in its communications protocol. The new nomenclature reflects the specific roles of the devices within the Modbus network. Here's a clearer explanation:
On this page:
Modbus Master (Client): In the context of the Modbus protocol, the "master" is the device that initiates communications. It’s called a Client because it requests data from other devices. The master actively controls when and how data is requested and collected in the network.
Modbus Slave (Server): Slave devices are referred to as Servers because they serve data to the master upon request. They passively wait for requests and respond by sending the requested data or performing actions based on the commands received. They do not initiate communication; they only respond to the master’s requests.
Modbus driver implements communication with PLC and IO devices compatible with Modbus Open Standard protocol. It operates as a Client on TCP/IP or serial networks. The communication blocks are dynamically created according to the pooling cycle defined on the AccessType for each Device Point.
Communication Driver Information | |
---|---|
Driver name | Modbus |
Assembly Name | T.ProtocolDriver.Modbus |
Assembly Version | 1.11.0.7 |
Available for Linux | True |
Devices supported | Any PLC compatible with Modbus |
Manufacturer | N/A (Not Applicable) |
Protocol | MODBUS RTU, ASCII and TCP |
Interface | TCP/IP and Serial |
Protocol Options | Message Format (ASCII, RTU or RTU TCP), use block write command (0x0F or 0x10) or single write command (0x05 or 0x06) for single writings |
Multi-threading | User configurable. Default is 5 threads to each network node |
Max number of nodes | User defined |
PC Requirements | Ethernet port |
Operand | Read | Write | Data Type | Address size |
0 – Coils | Yes | Yes | Bit | 1 bit |
1 – Input Status | Yes | - | Bit | 1 bit |
3 – Input Registers | Yes | - | Word | 2 bytes |
4 – Holding Registers | Yes | Yes | Word | 2 bytes |
%Q – Coils | Yes | Yes | Bit | 1 bit |
%M– Coils | Yes | Yes | Bit | 1 bit |
%I – Input Status | Yes | - | Bit | 1 bit |
%IW– Input Registers | Yes | - | Word | 2 bytes |
%MW – Holding Registers | Yes | Yes | Word | 2 bytes |
%QW – Holding Registers | Yes | Yes | Word | 2 bytes |
If the communication points are configured in sequence and the BlockSize equals to 250, the driver can create the internal groups with 125 Registers or 2000 Coils.
Serial and MultiSerial channels:
Set the other fields according to your Serial or MultiSerial port configuration.
TCP/IP channels:
Serial channels:
E.g.: 1
MultiSerial channels:
Where:
<Com Port>: the serial port number
TCP/IP channels:
Where :
E.g.: 192.168.1.101 ; 502 ; 1
The syntax for the Modbus communication points is: <Operand><Address>
Where:
Valid values for <Operand> |
---|
0 – Coils |
1 – Input Status |
3 – Input Registers |
4 – Holding Registers |
%Q – Coils |
%M– Coils |
%I – Input Status |
%IW– Input Registers |
%MW – Holding Registers |
%QW – Holding Registers |
For more information about the valid operands, see Supported Operands aforementioned.
E.g.: 400001 (Operand = Holding Register, Address = 1)
Configure ASCII Communication:
Modbus protocol error codes | ||
---|---|---|
Error | Name | Description |
1 | ILLEGAL FUNCTION | The function code received in the query is not allowable. |
2 | ILLEGAL DATA ADDRESS | The data address received in the query is not allowable. |
3 | ILLEGAL DATA VALUE | A value contained in the query data field is not allowable. |
4 | SLAVE DEVICE FAILURE | Error while attempting to perform the requested action. |
5 | ACKNOWLEDGE | Request accepted, but a long duration of time will be required. |
6 | SLAVE DEVICE BUSY | The slave is engaged in a long–duration program command. |
7 | NEGATIVE ACKNOWLEDGE | Cannot perform the program function received in the query. |
8 | MEMORY PARITY ERROR | Parity error in the extended memory. |
Modbus Revision History | |
---|---|
Version | Notes |
1.11.0.1 | Initial release on new documentation standards. |