Modbus
The widely used communication protocol allows read and write access to registers and coils. It communicates via RS485, TCP/IP, or wireless.
Connection Parameters
Modbus-TCP | |
Hostname | Hostname or IP address |
Port | TCP port (default: 502) |
Modbus-RTU | |
Port | Select the serial interface |
Stop bits | Number of stop bits (refer to device configuration or documentation) |
Parity | Parity bit (refer to device configuration or documentation) |
Baud rate | Speed (refer to device configuration or documentation) |
General | |
Byte order | Byte order of Modbus registers. Most devices use big-endian. |
Optimized access | Optimized access reads up to 125 registers or 2000 coils in a single block to reduce the number of requests. For devices that do not support reading multiple registers, this feature may slow down communication. |
Configure Symbols
Each symbol to be read or written must be configured. To create a new symbol, click New Row.
Name | Enter the name for display in AnyViz |
Unit ID |
Enter the device address For Modbus RTU, different devices in one connection can be addressed using the Slave ID |
Function Code |
Select the appropriate function code for reading The appropriate FC for writing is determined automatically |
Data type | Select the appropriate data type |
Address |
Enter the Modbus register address in decimal notation or the bit address Note: The address of the first register is 0 (zero-based numbering) |
Length | For string data types only: Length of the string in bytes |
Note:
If the documented registers start with the number 30,001 or 40,001, this might indicate the so-called Modicon notation.
The first digit indicates the type of register:
- 0x = Coil = 00001-09999: Corresponds to FC1
- 1x = Discrete Input = 10001-19999: Corresponds to FC2 starting at 0
- 3x = Input Register = 30001-39999: Corresponds to FC4 starting at 0
- 4x = Holding Register = 40001-49999: Corresponds to FC3 starting at 0