Skip to content

Latest commit

 

History

History
261 lines (210 loc) · 6.7 KB

modbus.md

File metadata and controls

261 lines (210 loc) · 6.7 KB

Modbus TCP Protocol Configuration

This section describes the configuration types for the Modbus TCP protocol adapter and contains the extensions and specific configuration types.

Protocol Adapters

ModbusSourceConfiguration

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.

^top

ModbusOptimization

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

^top

ModbusChannelConfiguration

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.

^top

ModbusTcpAdapterConfiguration

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]

^top

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

^top