RU198407U1 - DEVICE FOR DETERMINING MODBUS PARAMETERS OF RS-232/485 PROTOCOL LINKS - Google Patents

DEVICE FOR DETERMINING MODBUS PARAMETERS OF RS-232/485 PROTOCOL LINKS Download PDF

Info

Publication number
RU198407U1
RU198407U1 RU2019126097U RU2019126097U RU198407U1 RU 198407 U1 RU198407 U1 RU 198407U1 RU 2019126097 U RU2019126097 U RU 2019126097U RU 2019126097 U RU2019126097 U RU 2019126097U RU 198407 U1 RU198407 U1 RU 198407U1
Authority
RU
Russia
Prior art keywords
parameters
modbus
protocol
slave
determining
Prior art date
Application number
RU2019126097U
Other languages
Russian (ru)
Inventor
Александр Геннадьевич Копылов
Андрей Александрович Сазонов
Original Assignee
Общество с ограниченной ответственностью "Газпром трансгаз Ухта"
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Общество с ограниченной ответственностью "Газпром трансгаз Ухта" filed Critical Общество с ограниченной ответственностью "Газпром трансгаз Ухта"
Priority to RU2019126097U priority Critical patent/RU198407U1/en
Application granted granted Critical
Publication of RU198407U1 publication Critical patent/RU198407U1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • G06F13/4226Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus with asynchronous protocol
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4286Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using a handshaking protocol, e.g. RS232C link
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Communication Control (AREA)

Abstract

Полезная модель относится к области автоматизированных систем управления технологическими процессами и используется для диагностики сетей передачи данных. Технический результат заключается в возможности определять параметры сети Modbus при передаче данных по протоколам RS-232/485. Устройство для определения параметров MODBUS линий связи протоколов RS-232/485 выполнено с возможностью работы в режиме ведомый и в режиме ведущий, последовательного изменения параметров протокола своего приемника и передатчика, вычисления контрольных сумм принятых пакетов данных, представляет собой микроконтроллер с двумя драйверами связи UART/RS232, UART/RS485, содержит разъем для подключения к линии связи. 2 ил.The utility model relates to the field of automated control systems for technological processes and is used to diagnose data transmission networks. The technical result consists in the ability to determine the parameters of the Modbus network when transmitting data via RS-232/485 protocols. The device for determining the parameters of MODBUS communication lines of RS-232/485 protocols is designed to operate in the slave and master modes, sequentially change the protocol parameters of its receiver and transmitter, calculate the checksums of the received data packets, is a microcontroller with two UART / RS232, UART / RS485, contains a connector for connecting to a communication line. 2 ill.

Description

Полезная модель относится к области автоматизированных систем управления технологическими процессами (далее - АСУ ТП) и используется для диагностики сетей передачи данных.The utility model relates to the field of automated process control systems (hereinafter - ACS TP) and is used to diagnose data transmission networks.

Протокол Modbus был разработан c целью осуществления возможности контроллерам и полевым устройствам от разных производителей обмениваться данными. Этот протокол определяет структуру, общий формат разметки и содержимого полей сообщения, которые устройства будут распознавать и использовать независимо от типов сетей, по которым осуществляется связь.The Modbus protocol was developed with the goal of allowing controllers and field devices from different manufacturers to communicate. This protocol defines the structure, general layout format and content of message fields that devices will recognize and use regardless of the types of networks that communicate.

Протокол Modbus основан на цикле запроса-ответа для обмена информацией между контроллерами и полевыми устройствами (датчики, приборы учета расхода, контроллеры удаленных установок). Каждому устройству назначен адрес (уникальное число в пределах сети точно идентифицирующее данное устройство), располагающийся между 1 и 255. Одно устройство - ведущее (master), инициирует транзакции, такие как запросы данных, изменения точек установки, диагностика и т.п., передавая сообщение, адресованное другому устройству - ведомому (slave). По протоколу Modbus сообщение, переданное ведущим, формируется так, чтобы включить в себя адрес ведомого устройства, код функции, определяющий запрошенное действие, любые данные, которые должны быть посланы ведомому устройству и информацию контроля ошибок. Ведомое устройство обнаруживает и принимает сообщение от ведущего, основанное на адресе в сообщении, и обрабатывает функцию, указанную кодом функции в сообщении. После выполнения запрошенной функции ведомый передает ответное сообщение, содержащее информацию, подтверждающую выполненное действие, любые данные, которые должны быть возвращены ведущему, и информацию контроля ошибок.The Modbus protocol is based on a request-response cycle for the exchange of information between controllers and field devices (sensors, flow meters, remote installation controllers). Each device is assigned an address (a unique number within the network that precisely identifies this device) located between 1 and 255. One device, the master, initiates transactions, such as data requests, changes to installation points, diagnostics, etc., sending A message addressed to another device, the slave. According to the Modbus protocol, the message transmitted by the master is generated in such a way as to include the address of the slave device, a function code that defines the requested action, any data that must be sent to the slave device and error control information. The slave device detects and receives a message from the master based on the address in the message, and processes the function indicated by the function code in the message. After performing the requested function, the slave transmits a response message containing information confirming the action taken, any data that must be returned to the master, and error control information.

Обмен данными между устройствами в сети Modbus происходит, используя номера регистров. Каждому параметру управления процессом, используемому в сети Modbus, назначен номер регистра внутри установленного диапазона доступных номеров регистров. Устройства в сети Modbus сконфигурированы для того, чтобы хранить и обменивать параметры управления процессом согласно их назначенным номерам регистров. Для того, чтобы получить значение параметра управления процессом от ведомого устройства, ведущее устройство форматирует и передает сообщение-запрос, включающее в себя адрес ведомого устройства и номер регистра для параметра управления процессом. После приема сообщения-запроса ведомое устройство читает текущее значение номера регистра и форматирует и передает ответное сообщение с номером регистра и сохраненным значением.Data exchange between devices on the Modbus network occurs using register numbers. Each process control parameter used on the Modbus network is assigned a register number within the set range of available register numbers. Devices on the Modbus network are configured to store and exchange process control parameters according to their assigned register numbers. In order to obtain the value of the process control parameter from the slave device, the master device formats and transmits a request message including the address of the slave device and the register number for the process control parameter. After receiving the request message, the slave device reads the current value of the register number and formats and transmits a response message with the register number and the stored value.

При неисправностях очень важно знать параметры сети (скорость, паритет, количество бит, адреса устройств и т.д.). В настоящее время при диагностике для подключения к сети эти параметры приходится перебирать вручную: выставлять параметры на подключаемом устройстве (ноутбуке) и пытаться присоединиться. В случае неудачи - менять параметры и присоединятся снова, при этом успешное подключения приходится определять визуально, просматривая пакеты в шестнадцатеричном формате (побайтово, где каждый байт представлен в виде числа от 00 до FF), и это, только в том случае, если ведущее устройство исправно и посылает корректные запросы, иначе приходится самому генерировать данные запросы в надежде получить ответ от кого-нибудь из ведомых устройств.In case of malfunctions, it is very important to know the network parameters (speed, parity, number of bits, device addresses, etc.). Currently, when diagnosing to connect to the network, you have to manually sort through these parameters: set parameters on the connected device (laptop) and try to join. In case of failure, change the parameters and join again, and you have to determine the successful connection visually by looking at the packets in hexadecimal format (byte-by-line, where each byte is represented as a number from 00 to FF), and this is only if the master device it is working properly and sends the correct requests, otherwise you have to generate these requests yourself in the hope of receiving a response from one of the slave devices.

Задачей полезной модели является проведение оперативной диагностики сетей передачи данных.The objective of the utility model is the on-line diagnostics of data transmission networks.

Технический результат - определение параметров сети Modbus при передаче данных по протоколам RS-232/485.The technical result is the determination of the parameters of the Modbus network when transmitting data via RS-232/485 protocols.

Поставленная задача решается, а технический результат достигается путем разработки и применения устройства, позволяющего определить параметры линии связи, такие как: скорость передачи, бит паритета, количество бит данных, количество стоповых бит, адрес master-устройства, адреса slave-устройств, количество устройств в сети.The problem is solved, and the technical result is achieved by developing and using a device that allows you to determine the parameters of the communication line, such as: transmission speed, parity bit, number of data bits, number of stop bits, master address, slave device addresses, number of devices in network.

Устройство может работать в двух режимах: в режиме ведущего и в режиме ведомого.The device can operate in two modes: in master mode and in slave mode.

В режиме ведомого при подключении устройства к сети передачи данных (RS-232/485), оно, последовательно меняя параметры протокола своего приемника (скорость передачи, бит паритета, количество бит данных, количество стоповых бит) во всем диапазоне возможных комбинаций настроек, определенное время ожидает получения данных по протоколу Modbus. После получения устройство считает контрольную сумму каждого принятого пакета в соответствии со стандартом. Если контрольная сумма сошлась, то считается, что параметры подобраны корректно, после чего устройство, в соответствии со стандартом, выделяет из полученного пакета адрес master-устройства сети. Затем устройство сканирует сеть с подобранными параметрами настройки порта и определяет, к каким устройствам обращается master, таким образом, составляя список клиентов сети и их адреса. Все собранные параметры выводятся на дисплей. Если за время ожидания пакетов принято не было, то, считается, что в сканируемой сети устройств с подобными настройками протокола не обнаружено.In slave mode, when a device is connected to a data transmission network (RS-232/485), it sequentially changes the parameters of its receiver protocol (transmission speed, parity bit, number of data bits, number of stop bits) over the entire range of possible settings combinations, a certain time awaiting receipt of data via the Modbus protocol. Upon receipt, the device considers the checksum of each received packet in accordance with the standard. If the checksum converges, then it is considered that the parameters are selected correctly, after which the device, in accordance with the standard, extracts the address of the network master device from the received packet. Then the device scans the network with the selected port settings and determines which devices the master accesses, thus making a list of network clients and their addresses. All collected parameters are displayed. If no packets were received during the waiting time, then it is considered that no devices with similar protocol settings were found in the scanned network.

В режиме ведущего при подключении устройства к сети передачи данных (RS-232/485), оно, последовательно меняя параметры протокола своего передатчика (скорость передачи, бит паритета, количество бит данных, количество стоповых бит) во всем диапазоне возможных комбинаций настроек, формирует пакеты данных протокола Modbus согласно стандарту и отправляет их последовательно на все адреса сети. После отправки каждого пакета устройство ожидает ответ определенное время. При получении корректного ответа (ответ соответствует стандарту Modbus и контрольная сумма сходится) из него выделяется адрес ведомого устройства который помещается в список клиентов. Все собранные параметры и адреса выводятся на дисплей.In the master mode when connecting the device to the data transmission network (RS-232/485), it, sequentially changing the parameters of the protocol of its transmitter (bit rate, parity bit, number of data bits, number of stop bits) in the entire range of possible settings combinations, generates packets Modbus protocol data according to the standard and sends them sequentially to all network addresses. After sending each packet, the device expects a response for a certain time. Upon receipt of the correct answer (the answer complies with the Modbus standard and the checksum converges), the address of the slave device is allocated from it and placed in the client list. All collected parameters and addresses are displayed.

Выбор режима ведущий/ведомый выполняется с помощью переключателя.The master / slave mode is selected using the switch.

Перед подсоединением устройства к сети, пользователь, так же положением переключателя, должен определить ее тип: RS-232 или RS-485.Before connecting the device to the network, the user, by the position of the switch, must determine its type: RS-232 or RS-485.

Принципиальная схема устройства представлена на фигуре 1. Устройство представляет собой микроконтроллер (1) с обвязкой (кварцевый генератор с конденсаторами, подтягивающие резисторы, стабилизатор напряжения) к которому по протоколу UART (Universal Asynchronous Receiver-Transmitter) присоединены два драйвера связи UART/RS232 (2) и UART/RS485 (3) и дисплей (LCD матричный) (4) по протоколу SPI (Serial Peripheral Interface). Устройство имеет переключатель (5) для выбора протокола линии связи (RS-232 или RS-485), переключатель (6) для выбора режима работы ведущий/ведомый, разъем семейства D-Sub - DB9 (7) (стандарт DIN41652 - стандарт от German institute for standartisation) с распиновкой по стандартам EIA232/EIA485 (стандарты альянса отраслей электронной промышленности - Electronic Industries Alliance) (см фиг 2) и клеммник (8) для возможности подключения к линиям связи не оборудованными разъемами DB9. Устройство питается от батареи (9) через DC/DC преобразователь (10) на 5 вольт. Включение/выключение устройства осуществляется переключателем PS (11).A schematic diagram of the device is shown in Figure 1. The device is a microcontroller (1) with a strapping (a crystal oscillator with capacitors, pull-up resistors, a voltage regulator) to which two UART / RS232 communication drivers are connected using the Universal Asynchronous Receiver-Transmitter protocol (2) ) and UART / RS485 (3) and a display (LCD matrix) (4) using the SPI protocol (Serial Peripheral Interface). The device has a switch (5) to select the communication protocol (RS-232 or RS-485), a switch (6) to select the master / slave operating mode, the D-Sub family connector - DB9 (7) (DIN41652 standard - German standard institute for standartisation) with pinout according to EIA232 / EIA485 standards (Electronic Industries Alliance standards) (see Fig. 2) and terminal block (8) for the possibility of connecting to communication lines with no DB9 connectors. The device is powered by a battery (9) through a DC / DC converter (10) to 5 volts. The device is turned on / off by the PS switch (11).

При работе устройства сигналы с выходов PIN1 и PIN2 управляют чтением/записью драйвера RS485 реализованного на преобразователе MAX485. Переключатель SW1 подает напряжение на драйвер RS232 реализованный на преобразователе MAX232, при этом напряжение так же подается на вход PIN3 контроллера, при этом контроллер отключает драйвер RS485 и работа ведется с внешней линией по протоколу RS232.When the device is operating, the signals from the PIN1 and PIN2 outputs control the reading / writing of the RS485 driver implemented on the MAX485 converter. The switch SW1 supplies voltage to the RS232 driver implemented on the MAX232 converter, while the voltage is also supplied to the controller PIN3 input, while the controller disconnects the RS485 driver and the work is done with an external line via RS232 protocol.

Claims (1)

Устройство для определения параметров MODBUS линий связи протоколов RS-232/485, характеризующееся тем, что выполнено с возможностью работы в режиме ведомый и в режиме ведущий, последовательного изменения параметров протокола своего приемника и передатчика, вычисления контрольных сумм принятых пакетов данных, представляет собой микроконтроллер с двумя драйверами связи UART/RS232, UART/RS485, содержит разъем для подключения к линии связи.A device for determining the MODBUS parameters of the RS-232/485 protocol communication lines, characterized in that it is capable of operating in the slave and master modes, sequentially changing the protocol parameters of its receiver and transmitter, calculating the checksums of the received data packets, is a microcontroller with two communication drivers UART / RS232, UART / RS485, contains a connector for connecting to a communication line.
RU2019126097U 2019-08-19 2019-08-19 DEVICE FOR DETERMINING MODBUS PARAMETERS OF RS-232/485 PROTOCOL LINKS RU198407U1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
RU2019126097U RU198407U1 (en) 2019-08-19 2019-08-19 DEVICE FOR DETERMINING MODBUS PARAMETERS OF RS-232/485 PROTOCOL LINKS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
RU2019126097U RU198407U1 (en) 2019-08-19 2019-08-19 DEVICE FOR DETERMINING MODBUS PARAMETERS OF RS-232/485 PROTOCOL LINKS

Publications (1)

Publication Number Publication Date
RU198407U1 true RU198407U1 (en) 2020-07-06

Family

ID=71510822

Family Applications (1)

Application Number Title Priority Date Filing Date
RU2019126097U RU198407U1 (en) 2019-08-19 2019-08-19 DEVICE FOR DETERMINING MODBUS PARAMETERS OF RS-232/485 PROTOCOL LINKS

Country Status (1)

Country Link
RU (1) RU198407U1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030174070A1 (en) * 2002-03-13 2003-09-18 Garrod J. Kelly Wireless supervisory control and data acquisition
RU2345409C2 (en) * 2003-01-30 2009-01-27 Роузмаунт, Инк. Interface module for use with network of devices modbus and network of devices fieldbus
CN103792928A (en) * 2014-02-24 2014-05-14 东南大学 Industrial field data collecting and analyzing system based on Modbus
CN107204906A (en) * 2017-06-13 2017-09-26 许纶煌 A kind of local area data collection network communication device and its implementation
WO2017214676A1 (en) * 2016-06-15 2017-12-21 Aeris Environmental Ltd A single module optimizing controller capable of operating one of a plurality of different types of hvacr systems

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030174070A1 (en) * 2002-03-13 2003-09-18 Garrod J. Kelly Wireless supervisory control and data acquisition
RU2345409C2 (en) * 2003-01-30 2009-01-27 Роузмаунт, Инк. Interface module for use with network of devices modbus and network of devices fieldbus
CN103792928A (en) * 2014-02-24 2014-05-14 东南大学 Industrial field data collecting and analyzing system based on Modbus
WO2017214676A1 (en) * 2016-06-15 2017-12-21 Aeris Environmental Ltd A single module optimizing controller capable of operating one of a plurality of different types of hvacr systems
CN107204906A (en) * 2017-06-13 2017-09-26 许纶煌 A kind of local area data collection network communication device and its implementation

Similar Documents

Publication Publication Date Title
US4988990A (en) Dual master implied token communication system
US6867749B1 (en) Control system, display device, control-use host computer, and data transmission method
USRE43677E1 (en) Apparatus for restoring network information for home network system and method thereof
EP0156557A2 (en) Transceiver for multi-drop local area networks
KR20040103360A (en) Home network system
CN106878131B (en) PROFIBUS coupler and data transmission method of PROFIBUS
JP3757669B2 (en) How to set up a distributed system
EP3065013A1 (en) Device control method, server, system and computer storage medium
CN101945088B (en) Communication processing method of wide area data collection
CN114422288B (en) Communication system based on Modbus protocol
RU198407U1 (en) DEVICE FOR DETERMINING MODBUS PARAMETERS OF RS-232/485 PROTOCOL LINKS
US7414516B2 (en) System and method for remote controlling and monitoring electric home appliances
US9325567B2 (en) Communication system, method for operating such a communication system, and communication module
CN112165422B (en) Automatic address matching method for one-master multi-slave temperature control system
CN114285877A (en) Universal industrial equipment communication system and method
KR20020028470A (en) system and method for remote control and monitoring of electric home appliances
US10524219B2 (en) Communication apparatus, communication system and communication method
JPH1041964A (en) Network system for programmable controller
JPH03501913A (en) Data transmission method between transmitter and receiver
CN113556210B (en) Upper computer and method for establishing communication connection
CN112767722B (en) Control method and device of traffic signal machine, computer equipment and storage medium
Xu et al. Profibus automation technology and its application in DP slave development
EP1037126B1 (en) A signal handling device
US6421628B1 (en) Signal handling device
CN101645195B (en) Recognizing telegram boundaries