This section describes the configuration types for the Modbus TCP protocol adapter and contains the extensions and specific configuration types.
- ModbusSourceConfiguration
- ModbusOptimization
- ModbusChannelConfiguration
- ModbusTcpAdapterConfiguration
- ModbusTcpDeviceConfiguration
The ModbusSourceConfiguration extends the common Source configuration with Modbus specific source device configuration data
Name | Description | Type | Comments |
Channels | The channels hold configuration data to read values from the Modbus source device.
The element is a map indexed by the channel identifier. Channels can be "commented" out by adding a "#" at the beginning of the identifier of that channel. |
Map[String,ModbusChannelConfiguration] | At least 1 channel must be configured. |
AdapterDevice | Identifier for the device to read from. This referenced device must be present in the Devices section of the adapter referred to by the ProtocolAdapter attribute of the source. | String | Must be an identifier of a device in the Devices section of the MODBUS-TCP adapter used by the source. Note this is not the modbus device is, this id is set in the DeviceId attribute of the referenced device. |
Optimization | Optimization for combining reading values from adjacent or near adjacent in a single read request. | ModbusOptimization | Default optimization is enabled with a RegisterMaxGapSize of 8 and a CoilMaxGapSize of 16. |
ReadTimeout | Timeout for reading from Modbus device in milliseconds. | Integer | Default is 10000. |
The ModbusOptimization contains the optimization parameters for combining reading values from adjacent or near adjacent addresses in a single read request.
Name | Description | Type | Comments |
Active | State of optimization. | Boolean | true |
RegisterMaxGapSize | The maximum gap between register addresses to combine read actions in a single request. | Integer | Default is 8 |
RegisterMaxGapSize | The maximum gap between the coil and distinct input addresses to combine read actions in a single request. | Integer | Default is 16 |
The ModbusChannelConfiguration extends the common Channel configuration with Modbus specific channel configuration data
Name | Description | Type | Comments |
Type | Modbus channel type to read from | String, any of “Coil”, “DiscreteInput”, “HoldingRegister” or “InputRegister” | |
Address | Modbus address of the channel. | Integer | |
Size | The number of values to read. | Integer | Default is 1. The maximum for reading coils and discrete inputs is 2000. The maximum for reading registers is 125. |
he ModbusTcpAdapterConfiguration extends the common adapter configuration with Modbus TCP specific adapter configuration settings. The AdapterType to use for this adapter is "MODBUS-TCP"
Name | Description | Type | Comments |
Devices | Modbus devices configured for this adapter. The modbus tcp source using the adapter must refer to one of these servers with the AdapterDevice attribute. | Map[String,ModbusTcpDeviceConfiguration] |
Configuration data for connecting to and reading from a Modbus TCP device.
Name | Description | Type | Comments |
Address | Address of the device | String | |
Port | Port on the device | Integer | Default is 502 |
DeviceId | Modbus device identifier | Integer | Default is 1 |
ConnectTimeout | The timeout period in milliseconds to connect to the device. | Integer | Default is 1000, the minimum value is 1000 |
WaitAfterConnectError | The period in milliseconds to wait after a connection failure. | Integer | Default is 10000, the minimum value is 1000 |
WaitAfterReadError | The period in milliseconds to wait after a read failure. | Integer | Default is 10000, the minimum value is 1000 |