Modbus RTU
logiccloud Control Runtimes on your Edge devices can be connected to your I/Os or other devices via Modbus RTU over a serial line (RS-232 / RS-485). To do this, a new Modbus RTU connection must be created and parameterized in the connection settings of the respective runtime. The mapping model is identical to Modbus TCP — the difference is the transport: instead of an IP address and port, an RTU connection is configured with serial-line parameters.
Select Add Modbus RTU connection and enter all the necessary information such as the name, the serial device address and the serial-line parameters. You can also adjust the poll period and make further settings.
Connection settings:
Name: Name of the connectionDescription: Description, optionalAddress: address (slave/unit ID) of the Modbus RTU device on the serial busPoll period: interval (ms) at which the runtime polls the device for dataBaud rate: serial link speed in bps (e.g.9600,19200,38400,57600,115200; the full range from50up to921600is supported)Data bits: number of bits per serial character —7or8Parity: serial parity mode —None,EvenorOddStop bits: number of serial stop bits —1or2Connect timeout: timeout (ms) when establishing the connectionRequest timeout: timeout (ms) for an individual requestWait between calls: minimum wait time (ms) inserted between consecutive requests on the bus
Read/write batching
Section titled “Read/write batching”To reduce the number of transactions on the bus, consecutive registers can be read or written in a single multi-register request:
Use read multiple: read several registers per request instead of one at a timeRead chunk size: maximum number of registers read in one multi-read requestUse write multiple: write several registers per request instead of one at a timeWrite chunk size: maximum number of registers written in one multi-write request
Serial flow control (RS-485)
Section titled “Serial flow control (RS-485)”Enable flow control: enable RS-485 RTS line control (default off). When enabled, the driver toggles the RTS line around each transmission so the RS-485 transceiver switches between transmit and receive. Leave it off for RS-232 or for adapters that handle direction switching automatically.
A unit can be created after the Modbus RTU connection. To do this, right-click on the connection and select Add Modbus unit. Here you can specify the name, the address and the byte order.
Mapping Modbus payloads and variables
Section titled “Mapping Modbus payloads and variables”You can map the process variables with Modbus registers. To do this, select the relevant register type, for example Input Registers, and create a new register mapping using the green + icon. You can then define the address, the process variable and the data type.
Variable name: variable from your programData type: data type of the variable —Boolean,Int16,Int32,Int64,UInt16,UInt32,UInt64,FloatorDoubleAddress: register addressRegister type:DiscreteInput(read-only boolean),Coil(read/write boolean),InputRegister(read-only numeric) orHoldingRegister(read/write numeric)Byte order: byte order of the unit —BigEndianorLittleEndian; the unit also offers word-swap, byte-swap and reverse-registers options for matching the device’s representation of multi-register values