Zweefanimatie

Modbus RTU to TCP

Gerelateerde video's

Neem contact met ons op

WhatsApp / Telefoon

ZHC1921, developed by IOTRouter, is a device that supports Modbus RTU to TCP protocol and supports mutual conversion.

The network type of this product is Ethernet. If customers need other network-type equipment to support this function, it can be customized!

Introductie productfunctie:

4 relaisuitgangen

6 DI-ingangen (droge/natte knoop)

2 kanalen voor PI-telling (puls)

4 analoge (stroom)ingangen

TCP_Client/ MQTT_Client/ TCP_Server

Modbus RTU/TCP

Host- en slavemodi, de hostmodus ondersteunt RS485-cascadering van meerdere apparaten

√Wolk doorsturen, cloud-netwerken

√Lokaal logica, logica tussen apparaten

√Netwerk registratiepakket, hartslagpakket

√Hardware waakhond

√Afstand configuratie, upgrade op afstand

√Gastheer computer, webpagina

√Gegevens triggering en regelmatige rapportage

DTU/Edge Gateway/IoT Platform/Gateway Module/Modbus RTU to TCP

Inleiding tot het MODBUS-communicatieprotocol

MODBUS communication protocol is the most widely used bus protocol in industrial fields. The MODBUS communication protocol adopts the master-slave communication mode (ie Master/Slave communication mode). The MODBUS communication protocol has multiple types and supports multiple versions of serial ports (mainly RS-485 bus) and Ethernet. The most commonly used one is MODBUS.

There are three types: RTU, MODBUS ASCII and MODBUS TCP. MODBUS RTU and MODBUS ASCII are both communication protocols that support the RS-485 bus. MODBUSRTU uses binary representation and compact data structure, which has high communication efficiency and is widely used. The MODBUS ASCII transmission efficiency is far lower than the MODBUS RTU protocol, and the MODBUS RTU protocol is generally used in industrial sites.

The MODBUS TCP protocol adds an MBAP header to the MODBUS RTU protocol. Since TCP is a service based on reliable connections, there is no CRC check code in the MODBUS TCP protocol. The MBAP header is seven bytes in length, except for the first Except for five or six bytes, the rest are basically unchanged.

MODBUS TCP enables the MODBUS_RTU protocol to run on Ethernet. MODBUS TCP communication messages are encapsulated in Ethernet TCP/IP data packets. Unlike the traditional serial port method, MODBUS TCP inserts a standard MODBUS message into the TCP message and no longer carries a data checksum address. When converting protocols between MODBUS TCP and MODBUS RTU, the gateway converts the address code in the RTU protocol. In the TCP protocol, the unit flag data corresponds to the address code in the RTU protocol, as shown in Table 1 and Table 2 below.

DTU/Edge Gateway/IoT-platform/Gateway-module

De betekenis van de instructie in Tabel 1: Begin met het lezen van (03) vier (00 04) registers vanaf het module 0x18E (01 8E) registeradres met de adrescode 01 (TCP protocol unit flag is 00).

De betekenis van de instructie in Tabel 2: Begin met het schrijven (10) van een (00 01) register vanaf het module 0x18E (01 8E) registeradres met de adrescode 01 (TCP protocol unit flag is 00). De specifieke datalengte is 2 bytes (02 ), de inhoud van de datatekst is 00 00 (00 00).

Implementatie van MODBUS RTU en TCP conversie

The ASCII and RTU protocols of MODBUS stipulate the structure of messages and data, commands and response methods. Data communication adopts the master-slave communication mode (Master/Slave communication mode). The MODBUS RTU communication protocol uses the MODBUS protocol that needs to verify data.

In addition to parity check, the serial protocol uses LRC check in ASCII mode, 16-bit CRC check in RTU mode, and MODBUSTCP communication mode. There is no master station, slave stations are divided into server (Server) and client (Client). The party that sends the data request is the client, and the party that makes the data response is the server.

The server (Server) and the client (Client) are similar to the functions of MODBUSRTU slave station and master station respectively, but there is no relationship between MODBUS RTU and MODBUSTCP. The server opens port 502 to listen, and the protocol is in the receiving state. The client is the IP port connected to the server. After connecting, it actively sends query messages.

Het ABB 800xA systeem dient als MODBUS RTU masterstation en verzendt gegevens naar het MS-CPU32 (MODBUS RTU naar TCP gateway) slavestation via de CI853 kaart. Afbeelding 2 Structuurdiagram ABB systeemzijde. Stel de RTU-communicatie baudrate, controlegetal, enz. in MS-CPU32 in en stel IP, gateway, DNS, server/client, enz. in MODBUS TCP in. Voor deze externe overdracht moet de MS-CPU worden ingesteld op MODBUS TCP en op server worden ingesteld.

Neem contact met ons op