Network configuration

Some configuration tasks are shared by all the Modbus network types. Modicon introduced a variant of the Modbus protocol, Modbus TCP. This open protocol is becoming increasingly popular because it supports TCP/IP/Ethernet connectivity.
 NOTE: Modicon also developed a related protocol, Modbus Plus®, which is proprietary. Compared to Modbus and Modbus TCP, the Modbus Plus protocol is not widely-used. This driver does not support Modbus Plus. 

ModbusAsyncNetwork

If the host has multiple RS-485 or RS-232 ports to be used for client (master) access to Modbus networks, add one ModbusAsyncNetwork for each physical port.

Communications rates are typically at 9600 baud, and the network transmission mode (protocol) may be either Modbus RTU (Remote Terminal Unit) or Modbus ASCII (either one is supported). If Modbus RTU over RS-485, up to 31 slave devices may be attached—or more, if repeaters are used. The address range for Modbus devices on a serial network is from 1 to 247, however, networks are typically smaller. Depending on the number of available COM ports, a host may support multiple Modbus Async networks.

The station acts as the Modbus master to all other Modbus devices on the attached COM port. Each child device is represented by a ModbusAsyncDevice, and has a unique Modbus address (1 to 247), as well as other Modbus config data and starting addresses for Modbus data items (coils, inputs, input registers, holding registers). There are typically many child ModbusAsyncDevices.

ModbusTcpNetwork

Only one ModbusTcpNetwork is needed, even if the host has two Ethernet ports connected to two different (non-routed) TCP/IP LANs. The destination IP addresses of child ModbusTcpDevices automatically determine the Ethernet port.

ModbusTcpGateway

The driver supports one or more ModbusTcpGateways. Often, Modbus TCP/serial gateways are on the same LAN as other Modbus TCP devices.