EA035228B1 - Method for adaptive data transmission in an industrial controller - Google Patents
Method for adaptive data transmission in an industrial controller Download PDFInfo
- Publication number
- EA035228B1 EA035228B1 EA201700029A EA201700029A EA035228B1 EA 035228 B1 EA035228 B1 EA 035228B1 EA 201700029 A EA201700029 A EA 201700029A EA 201700029 A EA201700029 A EA 201700029A EA 035228 B1 EA035228 B1 EA 035228B1
- Authority
- EA
- Eurasian Patent Office
- Prior art keywords
- master
- slave
- words
- information
- data
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/40—Bus networks
- H04L12/403—Bus networks with centralised control, e.g. polling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Communication Control (AREA)
Abstract
Description
Изобретение относится к способу передачи информации по проводным линиям в промышленном контроллере с программируемой логикой (ПЛК), являющемся вычислительной и управляющей единицей в распределенных автоматизированных системах управления технологическими процессами (АСУ ТП).The invention relates to a method for transmitting information over wire lines in an industrial controller with programmable logic (PLC), which is a computing and control unit in distributed automated process control systems (ACS).
ПЛК предназначен для сбора и обработки информации, получаемой от контрольно-измерительных приборов в виде дискретных, аналоговых и цифровых сигналов, включая прием информации от других подсистем автоматического управления, и для формирования воздействий на исполнительные механизмы. Одной из проблем разработчиков ПЛК является обеспечение высоконадежной и высокоскоростной информационной связи между модулем центрального процессора и модулями ввода-вывода, предназначенными для ввода в контроллер сигналов с датчиков и для вывода сигналов управления исполнительным устройствам. Решению этой проблемы и посвящено предлагаемое изобретение.PLC is designed to collect and process information received from instrumentation in the form of discrete, analog and digital signals, including receiving information from other subsystems of automatic control, and to generate effects on actuators. One of the problems of PLC developers is the provision of highly reliable and high-speed information communication between the central processor module and input-output modules, intended for inputting signals from sensors to the controller and for outputting control signals to actuators. The solution of this problem is devoted to the present invention.
При описании заявляемого способа и аналогов используемые термины имеющее следующее значение.When describing the proposed method and analogues used terms having the following meaning.
Протокол передачи данных - набор правил и соглашений, определяющих содержимое, формат, параметры времени, последовательность и проверку ошибок в сообщениях, которыми обмениваются устройства системы.Data transfer protocol - a set of rules and conventions that define the content, format, time parameters, sequence and error checking in messages exchanged between system devices.
Ведущее устройство (Master) - главное устройство, которое посылает данные другим пользователям и/или запрашивает данные от других пользователей, т.е. является инициатором в обмене данными с ведомым устройством (Slave).Master device - a master device that sends data to other users and / or requests data from other users, i.e. is the initiator in the exchange of data with the slave device (Slave).
Ведомое устройство (Slave) - устройство, которое может обмениваться информацией только с ведущим устройством (Master) после того, как от ведущего устройства поступит соответствующий запрос.Slave device - a device that can exchange information only with the master device (Master) after the corresponding request is received from the master device.
Канал передачи данных - совокупность технических устройств (кабелей, ответвителей, соединителей, шин печатной платы и т.п.), обеспечивающих передачу сообщений любого типа от отправителя к получателю, осуществляемую с помощью электрических сигналов.Data transmission channel - a set of technical devices (cables, couplers, connectors, printed circuit boards, etc.) that ensure the transmission of messages of any type from the sender to the receiver using electrical signals.
Абонент - электронное устройство, подключенное к каналу передачи данных для выдачи или приема данных.Subscriber - an electronic device connected to a data transmission channel for issuing or receiving data.
Слово - строка битов, рассматриваемая как единое целое при их передаче, приеме, коммутации, обработке, отображении и хранении.A word is a string of bits, considered as a whole when they are transmitted, received, switched, processed, displayed and stored.
Пакет - блок данных, посланных по каналу передачи данных.A packet is a block of data sent over a data channel.
Управляющий пакет - блок данных, обрабатываемый сетевыми программами как единое целое. Пакет состоит из данных, выполняющих роль служебной информации, необходимых для реализации протокола.A control package is a data block processed by network programs as a whole. The package consists of data that plays the role of service information necessary for the implementation of the protocol.
Информационный пакет - блок данных, обрабатываемый сетевыми программами как единое целое. Пакет состоит из служебной информации и полезной информации, которая должна быть передана.An information package is a data block processed by network programs as a whole. The package consists of overhead information and useful information that must be transmitted.
Общая структура управляющего или информационного пакета определяется составом пакета и его форматом.The general structure of the control or information package is determined by the composition of the package and its format.
Состав - содержащиеся в пакете различные типы данных.Composition - the various data types contained in the package.
Формат - размерность и порядок размещения различных типов данных.Format - dimension and placement order of various data types.
Известен способ для адаптации надежности передачи данных в последовательной шинной системе (патент на изобретение РФ №2597501 С2), принятый в качестве аналога. Абоненты обмениваются по шине сообщениями, имеющими логическую структуру, соответствующую стандарту ISO 11898-1 на протокол CAN. Согласно указанному протоколу структура сообщения включает в себя бит начала кадра, поле арбитража, поле управления, поле данных, поле циклической контрольной суммы (CRC), поле подтверждения и последовательность конца кадра. При свободной шине любой абонент может передать данные в любой момент. В случае одновременной передачи данных двумя и более абонентами происходит арбитраж доступа к шине и передается сообщение с большим приоритетом. В связи с возрастающими требованиями к передаваемым объемам данных в известном способе модифицирован формат поля данных. Формат поля данных увеличен с максимально допустимого стандартом 8 байт до 16 байт или до 24 байт в расширенном формате. За счет обеспечения возможности увеличения поля данных в передаваемом сообщении достигается тот эффект, что, по сравнению с соответствующим стандарту CAN сообщением, одним сообщением можно передать по шине большее количество, или объем, данных. Это выгодно увеличивает отношение объема содержащейся в сообщении информации (полезной информации) к объему служебной информации и тем самым также увеличивает среднюю скорость передачи данных по шинной системе. В известном способе используется два типа сообщений, первый тип - по протоколу CAN, второй тип - с модифицированным форматом поля данных. Тип сообщения определяется коммуникационным контроллером благодаря зарезервированному биту или дополнительному биту или битовой комбинации, введенным в поле арбитража и/или в поле управления. Благодаря такому биту коммуникационный контроллер адаптирует свою работу для принятия соответствующего типа сообщения.A known method for adapting the reliability of data transmission in a serial bus system (RF patent No. 2597501 C2), adopted as an analogue. Subscribers exchange messages on the bus that have a logical structure that complies with ISO 11898-1 for the CAN protocol. According to this protocol, the message structure includes a frame start bit, an arbitration field, a control field, a data field, a cyclic checksum (CRC) field, a confirmation field, and a frame end sequence. With a free bus, any subscriber can transfer data at any time. In case of simultaneous data transmission by two or more subscribers, access to the bus is arbitrated and a message with a higher priority is transmitted. In connection with the increasing requirements for the transmitted data volumes in a known method, the format of the data field is modified. The format of the data field has been increased from the maximum standard 8 bytes to 16 bytes or up to 24 bytes in the extended format. Due to the possibility of increasing the data field in the transmitted message, the effect is achieved that, in comparison with the corresponding CAN standard message, a larger amount, or volume, of data can be transmitted via the bus. This advantageously increases the ratio of the volume of information (useful information) contained in the message to the volume of service information and thereby also increases the average data transfer rate over the bus system. In the known method, two types of messages are used, the first type using CAN protocol, the second type with a modified data field format. The type of message is determined by the communication controller due to the reserved bit or additional bit or bit combination entered in the arbitration field and / or in the control field. Thanks to this bit, the communication controller adapts its work to receive the appropriate type of message.
Поскольку заявляемый способ обмена данными (протокол) изначально разрабатывался для контроллера, для работы которого характерна цикличность, обязательный опрос в цикле всех модулей ввода-вывода и гарантированное время отклика (система реального времени), то в качестве основы был взят протокол, основанный на архитектуре ведущий-ведомый (master-slave), который, в отличие от протокола CAN, основанного на арбитраже шины, обеспечивает перечисленные требования.Since the claimed method of data exchange (protocol) was originally developed for a controller whose operation is characterized by cyclicity, mandatory polling in the cycle of all I / O modules and guaranteed response time (real-time system), a protocol based on the leading architecture was taken as the basis master (slave), which, unlike the CAN protocol based on the bus arbitration, provides the listed requirements.
- 1 035228- 1 035228
За основу для заявляемого способа обмена данными взят интерфейс, описанный в стандарте MILSTD-1553B, dated 21 September 1978, Department of defense interface standart for digital time division command/response multiplex data bus (обозначение военного стандарта США). В нашей стране он был утвержден как ГОСТ 26765.52-87 (заменен на ГОСТ Р 52070-2003, введенный в действие 5 июня 2003 г.) Интерфейс магистральный последовательный системы электронных модулей. Общие требования (прототип). Данный стандарт описывает магистральный последовательный интерфейс с централизованным управлением, применяемый в системе электронных модулей, и устанавливает требования к организации обмена информацией, функциям устройств интерфейса и контролю передачи информации, характеристикам информационной магистрали и характеристикам устройств интерфейса. Интерфейс функционирует асинхронно, в режиме команда-ответ. Инициирование обмена информацией и управление передачей осуществляет только контроллер шины. Стандартом определен состав слов (фиг. 1) - командное слово, слово данных и ответное слово. Размер каждого слова равен 20 разрядам. Слова начинаются с синхросигнала (три разряда), затем поле данных (16 бит) и заканчиваются разрядом контроля четности. Определены два вида синхросигнала, которые позволяют отличать командные слова от информационных слов. Вся информация на магистрали передается в коде Манчестер-2.The basis for the proposed method of data exchange is the interface described in the MILSTD-1553B standard, dated 21 September 1978, Department of defense interface standart for digital time division command / response multiplex data bus (designation of the US military standard). In our country, it was approved as GOST 26765.52-87 (replaced by GOST R 52070-2003, entered into force on June 5, 2003). Serial trunk interface of the electronic module system. General requirements (prototype). This standard describes a serial main interface with centralized control used in the electronic module system and establishes requirements for the organization of information exchange, the functions of interface devices and the control of information transfer, the characteristics of the information highway and the characteristics of interface devices. The interface operates asynchronously in command-response mode. Initiation of information exchange and transmission control is carried out only by the bus controller. The standard defines the composition of words (Fig. 1) - the command word, data word and response word. The size of each word is 20 digits. Words begin with a clock signal (three bits), then a data field (16 bits) and end with a parity bit. Two types of sync signals are defined, which make it possible to distinguish command words from information words. All information on the highway is transmitted in Manchester-2 code.
Интерфейс, описанный ГОСТ Р 52070-2003 имеет следующие недостатки. Так, определена низкая скорость передачи информации -1 Мбит/с. Максимальный размер сообщения, которое может быть передано или принято, не более 32 слов данных. При этом не обеспечен полный контроль достоверности передаваемой информации. Адресуемых абонентов не более 31. Все это ограничивает использование интерфейса по ГОСТ Р 52070-2003 в современных системах.The interface described by GOST R 52070-2003 has the following disadvantages. So, a low information transfer rate of -1 Mbit / s is defined. The maximum size of a message that can be transmitted or received is not more than 32 data words. At the same time, complete control of the reliability of the transmitted information is not provided. Addressed subscribers no more than 31. All this limits the use of the interface according to GOST R 52070-2003 in modern systems.
Задача изобретения - увеличение скорости передачи данных и, следовательно, скорости обмена данными между электронными устройствами, реализующими заявляемый протокол.The objective of the invention is to increase the speed of data transfer and, consequently, the speed of data exchange between electronic devices that implement the claimed protocol.
Технический результат достигается тем, что между по меньшей мере одним ведущим электронным устройством и по меньшей мере одним ведомым электронным устройством по каналу передачи данных осуществляют последовательный обмен данными для чтения ведущим устройством значения контролируемого параметра из ведомого устройства. Для этого вначале из ведущего устройства запрашивают значение контролируемого параметра у ведомого устройства, для чего осуществляют передачу из ведущего устройства в ведомое устройство управляющего пакета, который состоит из слов, выполняющих роль служебной информации. Затем из ведомого устройства передают значение контролируемого параметра в ведущее устройство, для чего осуществляют передачу из ведомого устройства в ведущее устройство информационного пакета, который состоит из слов служебной информации и слов полезной информации, предназначенной для записи текущего значения контролируемого параметра. При этом служебная информация управляющего и информационного пакетов содержит кодированное число количества слов полезной информации и бит, который предназначен для уведомления ведущего устройства об уменьшении количества слов полезной информации, полученных ведущим устройством в информационном пакете, по сравнению с количеством слов полезной информации, запрошенных ведущим устройством в управляющем пакете. При этом, когда осуществляют передачу из ведущего устройства в ведомое устройство управляющего пакета, в нем содержится кодированное число максимального количества слов полезной информации, заданного для записи значения контролируемого параметра, а когда осуществляют передачу из ведомого устройства в ведущее устройство информационного пакета, в нем содержится такое кодированное число количества слов полезной информации, которое передается в ведущее устройство и которое достаточно для записи текущего значения контролируемого параметра. В случае если произошло уменьшение количества слов полезной информации в информационном пакете по сравнению с запрашиваемым количеством слов полезной информации в управляющем пакете, бит, который предназначен для уведомления ведущего устройства об уменьшении количества слов полезной информации, полученных ведущим устройством в информационном пакете, по сравнению с количеством слов полезной информации, запрошенным ведущим устройством в управляющем пакете, будет иметь разное значение в управляющем и информационном пакетах.The technical result is achieved by the fact that between at least one master electronic device and at least one slave electronic device via a data channel, serial data exchange is carried out for the master to read the values of the controlled parameter from the slave device. To do this, first, the value of the monitored parameter is requested from the master device from the slave device, for which a control packet is transferred from the master device to the slave device, which consists of words acting as service information. Then, the value of the monitored parameter is transmitted from the slave device to the master device, for which a data packet is transmitted from the slave device to the master device, which consists of words of service information and words of useful information intended to record the current value of the parameter being monitored. In this case, the service information of the control and information packets contains an encoded number of words of useful information and a bit that is designed to notify the host device of a decrease in the number of words of useful information received by the master in the information packet compared with the number of words of useful information requested by the master in control package. At the same time, when a control packet is transmitted from the master to the slave, it contains the encoded number of the maximum number of words of useful information specified for recording the value of the monitored parameter, and when the information packet is transmitted from the slave to the master, it contains encoded number of words of useful information, which is transmitted to the host device and which is sufficient to record the current value of the monitored parameter. In the event that there is a decrease in the number of words of useful information in the information packet compared with the requested number of words of useful information in the control packet, a bit that is designed to notify the host device of a decrease in the number of words of useful information received by the master in the information packet compared to the number words of useful information requested by the master in the control packet will have different meanings in the control and information packets.
Признаки и преимущества способа обмена данными раскрыты в последующем описании осуществления изобретения, приведенном со ссылками на следующие чертежи, на которых показаны:Signs and advantages of a data exchange method are disclosed in the following description of an embodiment of the invention, given with reference to the following drawings, in which:
фиг. 1 - структура слов по ГОСТ Р 52070-2003 (прототип);FIG. 1 - structure of words according to GOST R 52070-2003 (prototype);
фиг. 2 - структурная схема соединения электронных устройств, реализующих заявляемый способ обмена данными;FIG. 2 is a structural diagram of the connection of electronic devices that implement the inventive method of exchanging data;
фиг. 3- передача логических нуля и единицы в коде Манчестер-2 (прототип и заявляемый способ); фиг. 4 - синхросигналы управляющего слова и слова данных (прототип и заявляемый способ);FIG. 3- transmission of logical zero and one in the code of Manchester-2 (prototype and the claimed method); FIG. 4 - clock signals of the control word and data word (prototype and the claimed method);
фиг. 5 - физический формат управляющего слова (прототип и заявляемый способ);FIG. 5 - the physical format of the control word (prototype and the claimed method);
фиг. 6 - физический формат слова данных (прототип и заявляемый способ);FIG. 6 - the physical format of the data word (prototype and the claimed method);
фиг. 7 - структура информационного пакета (CTL+DATA);FIG. 7 - structure of the information package (CTL + DATA);
фиг. 8 - структура управляющего пакета (CTL);FIG. 8 is a control packet structure (CTL);
фиг. 9 - структура пакета данных (DATA);FIG. 9 - data packet structure (DATA);
фиг. 10 - структура сообщения записи данных в Slave;FIG. 10 is a structure of a data recording message in a Slave;
фиг. 11 - структура сообщения чтение данных из Slave;FIG. 11 - message structure reading data from Slave;
- 2 035228 фиг. 12 - сообщение чтение данных из ведомого устройства (Slave), в котором при измерении текущего значения параметра из ведомого устройства (Slave) передается в ведущее устройство (Master) максимально возможное количество слов данных, необходимых для записи контролируемого параметра (режим полного чтения из Slave);- 2,035,228 of FIG. 12 - a message reading data from a slave device (Slave), in which, when measuring the current value of a parameter from a slave device (Slave), the maximum possible number of data words is required to write a controlled parameter (full read from Slave) to the master device (Master) ;
фиг. 13 - сообщение чтение данных из ведомого устройства (Slave), в котором из ведомого устройства (Slave) передается в ведущее устройство (Master) количество слов данных, достаточное для записи текущего значения контролируемого параметра (режим адаптивного чтения данных из Slave);FIG. 13 - a message reading data from a slave device (Slave), in which from the slave device (Slave) is transmitted to the master device (Master) the number of data words sufficient to write the current value of the monitored parameter (adaptive data reading mode from Slave);
фиг. 14 и 15 - блок-схема алгоритма работы ведущего устройства (Master) при чтении данных из ведомого устройства (Slave).FIG. 14 and 15 - a block diagram of the algorithm of the master (Master) when reading data from the slave (Slave).
Для осуществления способа обмена данными достаточно по меньшей мере одного ведущего устройства (Master) 1 и по меньшей мере одного ведомого устройства (Slave) 2, подключенных к последовательному каналу 3 передачи данных (фиг. 2). Например, в ПЛК модуль центрального процессора выступает в качестве ведущего устройства (Master) 1, а в качестве ведомого устройства (Slave) может выступать модуль ввода 2 и/или модуль вывода 4, а в качестве канала 3 передачи данных используется внутренняя шина контроллера. На фиг. 2 показаны также устройства полевого (нижнего) уровня АСУ ТП, а именно датчик 6 частоты вращения, подключенный к модулю ввода 2 и двигатель 7, подключенный к модулю вывода 4.To implement the data exchange method, at least one master device (Master) 1 and at least one slave device (Slave) 2 connected to the serial data transmission channel 3 are sufficient (Fig. 2). For example, in a PLC, the central processor module acts as a master device (Master) 1, and as a slave device (Slave) an input module 2 and / or an output module 4 can act, and the controller internal bus is used as a data transfer channel 3. In FIG. 2 also shows the devices of the field (lower) level of the industrial control system, namely, the rotational speed sensor 6 connected to the input module 2 and the motor 7 connected to the output module 4.
Развитие интегральной схемотехники привело к созданию принципиально новых измерительных преобразователей - интеллектуальных датчиков (далее ИД), содержащих в одном корпусе преобразователь и микропроцессор, что позволяет выполнять основные операции по преобразованию, усилению и обработке информации в самом датчике. ИД представляет собой совокупность аппаратных и программных средств, обеспечивающих отображение свойств объекта контроля в виде некоторой структуры данных, формируемых в результате обработки выходного сигнала измерительного преобразователя по определенному алгоритму. ИД могут не только контролировать измеряемые величины, но и осуществлять их оценку, коррекцию по определенным критериям, контролировать свои собственные характеристики, работать в режиме диалога с системой управления, принимать команды, передавать измеренные значения, как правило, в цифровой форме, а также аварийные сообщения. ИД может обеспечить адаптацию (приспособление) к диапазону изменения значений измеряемой величины, к скорости изменения измеряемой величины, к воздействию влияющих факторов, включая помехи, условия окружающей среды и т.д.The development of integrated circuitry has led to the creation of fundamentally new measuring transducers - intelligent sensors (hereinafter ID), containing a converter and a microprocessor in one housing, which allows you to perform basic operations to convert, amplify and process information in the sensor itself. ID is a combination of hardware and software that provides the display of the properties of the control object in the form of some data structure generated as a result of processing the output signal of the measuring transducer according to a certain algorithm. IDs can not only control the measured values, but also carry out their assessment, correction according to certain criteria, control their own characteristics, work in a dialogue mode with the control system, receive commands, transmit measured values, usually in digital form, as well as alarm messages . The ID can provide adaptation (adaptation) to the range of changes in the values of the measured quantity, to the rate of change of the measured quantity, to the influence of influencing factors, including interference, environmental conditions, etc.
В качестве ведомого устройства (Slave) 5 могут выступать интеллектуальный датчик и/или интеллектуальный электропривод. Так, на фиг. 2 в качестве ведомого устройства (Slave) 5 показан ИД, подключенный непосредственно к каналу 3 передачи данных.As a slave device (Slave) 5 can be an intelligent sensor and / or intelligent electric drive. So in FIG. 2, as a slave device 5, an ID connected directly to the data transmission channel 3 is shown.
Вся информация по каналу передается также, как и в интерфейсе по ГОСТ Р 52070-2003, а именно в коде Манчестер-2. Этот самосинхронизирующийся фазоманипулированный код имеет нулевую постоянную составляющую, что очень важно в применениях с высокой скоростью передачи. Кодирование 0 и 1 производится не уровнем, а фронтом сигнала в середине тактового интервала (фиг. 3), что позволяет обеспечить побитную синхронизацию передатчика и приемника по передаваемой информации в широком диапазоне отклонения несущей частоты.All information on the channel is transmitted as well as in the interface in accordance with GOST R 52070-2003, namely in the Manchester-2 code. This self-synchronizing phase-shifted code has a zero constant component, which is very important in high-speed applications. The coding of 0 and 1 is performed not by the level, but by the signal front in the middle of the clock interval (Fig. 3), which allows for bit-wise synchronization of the transmitter and receiver according to the transmitted information in a wide range of carrier frequency deviations.
Так же, как и в интерфейсе по ГОСТ Р 52070-2003, определены два вида синхросигнала (фиг. 4), которые позволяют аппаратно, следовательно, быстро отличать управляющее слово от слова данных и обеспечивают пословную синхронизацию передатчика и приемника, т.е. однозначно определять начало слов в потоке 0 и 1 в канале.Just as in the interface according to GOST R 52070-2003, two types of clock signal are defined (Fig. 4), which allow one to quickly and quickly distinguish the control word from the data word and provide word-by-word synchronization of the transmitter and receiver, i.e. unambiguously determine the beginning of words in stream 0 and 1 in the channel.
На фиг. 5 показан формат управляющего слова. Управляющее слово начинается синхросигналом (3 бита), полярность первой половины которого положительна, а вторая половина отрицательна. Далее следуют 16 информационных бит, и завершается управляющее слово битом контроля по четности (Р).In FIG. 5 shows a control word format. The control word begins with a clock signal (3 bits), the polarity of the first half of which is positive, and the second half is negative. This is followed by 16 information bits, and the control word ends with a parity bit (P).
На фиг. 6 показан формат слова данных. Слово данных начинается синхросигналом (3 бита), полярность первой половины которого отрицательная, а вторая половина - положительная. Затем следует 16битовое поле данных и завершается слово данных битом контроля по четности (Р).In FIG. 6 shows a data word format. The data word begins with a sync signal (3 bits), the polarity of the first half of which is negative, and the second half is positive. This is followed by a 16-bit data field and the data word ends with a parity bit (P).
Для передачи сигналов на небольшие расстояния предлагается использовать низковольтную дифференциальную линию передачи по согласованной проводной линии M-LVDS (TIA/EIA-899 (Electrical Characteristics of Multipoint-Low-Voltage Differential Signaling)). Приемопередатчики M-LVDS обеспечивают высокоскоростную и надежную передачу сигналов при малом энергопотреблении. При использовании данного способа передачи для обеспечения связи модуля центрального процессора с модулями ввода-вывода, расположенными внутри электротехнического шкафа с максимальным удалением между собой до 10 м, скорость передачи может достигать 50 Мбит/с.To transmit signals over short distances, it is proposed to use a low-voltage differential transmission line along the agreed M-LVDS wire line (TIA / EIA-899 (Electrical Characteristics of Multipoint-Low-Voltage Differential Signaling)). M-LVDS transceivers provide high-speed and reliable signal transmission with low power consumption. When using this transmission method to provide communication between the central processor module and the input-output modules located inside the electrical cabinet with a maximum distance of 10 m from each other, the transmission speed can reach 50 Mbps.
Для передачи сигналов на большие расстояния может быть использован интерфейс стандарта RS485 (EIA/TIA-485-A). Абонентами здесь могут быть удаленные интеллектуальные датчики или контроллеры расширения.To transmit signals over long distances, an RS485 standard interface (EIA / TIA-485-A) can be used. Subscribers here may be remote smart sensors or expansion controllers.
Пакет, включающий поле данных, называется информационным пакетом (CTL+DATA). На фиг. 7 показана общая структура информационного пакета. Информационный пакет состоит из управляющего поля, поля контрольной суммы управляющего поля, поля данных и поля контрольной суммы поля данных. Управляющее поле - это данные, необходимые абоненту для определения выполнения им задавае- 3 035228 мых функций и указания своего состояния. Управляющее поле содержит адресную информацию, выполняемое действие (передача или прием данных), количество слов данных и т.д.A packet that includes a data field is called an information packet (CTL + DATA). In FIG. 7 shows the overall structure of the information package. The information package consists of a control field, a checksum field of a control field, a data field and a checksum field of a data field. The control field is the data necessary for the subscriber to determine whether he has fulfilled 3,035,228 functions and indicate his status. The control field contains address information, the action to be performed (data transmission or reception), the number of data words, etc.
Пакет, не имеющий поля данных, называется управляющим пакетом (CTL). Управляющие пакеты могут выполнять функцию начала и конца сеанса связи, подтверждения приема информационного пакета, запроса информационного пакета и т.д. На фиг. 8 показана структура управляющего пакета (CTL) состоящего из управляющего поля и контрольной суммы CRC(1) управляющего поля. Предложена пословная передача данных. Управляющее поле состоит из первого слова cw[0] и второго слова cw[1]. Для обеспечения надежности передачи данных, а именно для проверки целостности данных управляющего поля, предназначена контрольная сумма CRC(1), имеющего вид третьего cw[2] слова.A packet that does not have a data field is called a control packet (CTL). The control packets can perform the function of the beginning and end of a communication session, acknowledging the receipt of an information packet, requesting an information packet, etc. In FIG. 8 shows a control packet structure (CTL) consisting of a control field and a control field CRC (1) checksum. A word-by-word data transfer is proposed. The control field consists of the first word cw [0] and the second word cw [1]. To ensure the reliability of data transmission, namely to verify the integrity of the control field data, the CRC (1) checksum is used, which has the form of a third word cw [2].
Пакет данных (DATA) состоит из поля данных и контрольной суммы CRC(2) поля данных (фиг. 9). Поле данных (полезная информация) - собственно данные, которыми обмениваются между собой абоненты и для передачи которых используется пакет данных. Последнее слово в пакете данных - это контрольная сумма CRC(2) поля данных, предназначенная для проверки целостности поля данных.A data packet (DATA) consists of a data field and a CRC (2) checksum of the data field (FIG. 9). Data field (useful information) - actually the data exchanged between subscribers and for the transfer of which a data packet is used. The last word in the data packet is the CRC (2) checksum of the data field, designed to verify the integrity of the data field.
В процессе сеанса обмена информацией по каналу между передающим и принимающим абонентами происходит обмен информационными и управляющими пакетами по установленным правилам, называемым протоколом обмена.In the process of the exchange of information on the channel between the transmitting and receiving subscribers, the information and control packets are exchanged according to the established rules, called the exchange protocol.
Состав и описание типов данных, используемых в предлагаемом способе обмена даннымиThe composition and description of the types of data used in the proposed method of data exchange
- 4 035228- 4 035228
Описанная выше структура управляющего пакета и пакета данных позволила увеличить количество абонентов на шине до 128, а количество внутренних адресных пространств - до 256.The structure of the control packet and data packet described above allowed increasing the number of subscribers on the bus to 128, and the number of internal address spaces to 256.
Содержание передаваемой информации может быть любым при условии совместимости с форматами слов и форматами сообщений.The content of the transmitted information can be any, subject to compatibility with word formats and message formats.
Передача данных между ведущим устройством (Master) и ведомыми устройствами (Slave) делится на три фазы: параметризация, конфигурирование и передача данных. В фазе параметризации и конфигурирования проверяется, соответствует ли конфигурация и параметры ведомого устройства запланированным в ведущем устройстве установкам. Проверяется тип устройства, формат и длина передаваемых сообщений, количество входов или выходов. В фазе передачи данных ведущее устройство (Master) должно реализовывать передачу данных в ведомое устройство (Slave) и прием данных из ведомого устройства (Slave).Data transfer between the master device (Master) and slave devices (Slave) is divided into three phases: parameterization, configuration and data transfer. In the parameterization and configuration phase, it is checked whether the configuration and parameters of the slave correspond to the settings planned in the master. It checks the type of device, the format and length of the transmitted messages, the number of inputs or outputs. In the data transfer phase, the master (Master) must implement the data transfer to the slave (Slave) and the reception of data from the slave (Slave).
Рассмотрим возможные типы сообщений, которыми обмениваются ведущее и ведомое устройства путем последовательной передачи друг другу управляющих и информационных пакетов.Consider the possible types of messages exchanged between the master and slave devices by sequentially transmitting control and information packets to each other.
Первый тип сообщения предназначен для передачи данных от ведущего устройства (Master) к ведомому устройству (Slave) - запись данных в Slave (фиг. 10).The first type of message is designed to transfer data from the master (Master) to the slave (Slave) - write data to the Slave (Fig. 10).
Ведущее устройство (Master) передает информационный пакет (с признаком запись (WR) в управляющем поле), а ведомое устройство (Slave) принимает информационный пакет, просчитывает контрольную сумму CRC(1) управляющего поля и контрольную сумму CRC(2) поля данных и сравниваThe master device (Master) transmits an information packet (with a sign record (WR) in the control field), and the slave device (Slave) receives the information packet, calculates the checksum CRC (1) of the control field and the checksum CRC (2) of the data field and compares
- 5 035228 ет их значения с полученными от ведущего устройства (Master). В зависимости от результата сравнения контрольных сумм ведомое устройство (Slave) либо игнорирует задание записи данных, либо принимает к исполнению. Если информационный пакет принят верно, ведомое устройство (Slave) посылает ведущему устройству (Master) ответ, имеющий вид управляющего пакета (CTL). Если контрольные суммы не совпадают, то считается, что целостность передаваемой информации нарушена и ведомое устройство (Slave) игнорирует задание и не отправляет ответ.- 5 035228 their values with those received from the master device (Master). Depending on the result of the checksum comparison, the slave device either ignores the data recording task or accepts it for execution. If the information packet is received correctly, the slave sends a response in the form of a control packet (CTL) to the master. If the checksums do not match, then it is considered that the integrity of the transmitted information is violated and the slave device (Slave) ignores the job and does not send a response.
Второй тип сообщения предназначен для передачи данных от ведомого устройства (Slave) к ведущему устройству (Master) - чтение данных из Slave (фиг. 11).The second type of message is designed to transfer data from the slave device (Slave) to the master device (Master) - reading data from the Slave (Fig. 11).
Ведущее устройство (Master) передает управляющий пакет (с признаком чтение (RD) в управляющем поле) и освобождает канал. Адресуемое ведомое устройство (Slave) принимает управляющий пакет, просчитывает контрольную сумму CRC(1) управляющего поля и сравнивает ее значение со значением контрольной суммы, полученной от ведущего устройства (Master). В зависимости от результата сравнения контрольной суммы ведомое устройство (Slave) либо игнорирует задание передачи данных, либо принимает к исполнению. При успешном сравнении ведомое устройство (Slave) захватывает шину и передает ведущему устройству (Master) ответ, имеющий вид информационного пакета. Ведущее устройство (Master) принимает ответ от ведомого устройства (Slave) в виде информационного пакета и просчитывает контрольную сумму CRC(1) управляющего поля и контрольную сумму CRC(2) поля данных. При успешном сравнении контрольных сумм управляющий пакет от ведомого устройства (Slave) считается принятым, чтение данных ведущим устройством (Master) из ведомого устройства (Slave) завершенным.The master device (Master) transmits a control packet (with a read sign (RD) in the control field) and releases the channel. The addressed slave device (Slave) receives the control packet, calculates the CRC (1) checksum of the control field and compares its value with the value of the checksum received from the master (Master). Depending on the result of the checksum comparison, the slave device either ignores the data transfer job or accepts it for execution. Upon successful comparison, the slave device (Slave) captures the bus and transmits to the master device (Master) a response in the form of an information packet. The master device (Master) receives a response from the slave device (Slave) in the form of an information packet and calculates the checksum CRC (1) of the control field and the checksum CRC (2) of the data field. Upon successful comparison of the checksums, the control packet from the slave (Slave) is considered accepted, the data reading by the master (Master) from the slave (Slave) is completed.
Известно, что для способа обмена данными, в котором один абонент (Master) всегда инициативно запрашивает данные у другого абонента (Slave), характерно то, что абонент (Slave) всегда направляет абоненту (Master) такое количество слов полезной информации, которое запросил у него абонент (Master) в текущем сообщении. В свою очередь, абонент (Master) всегда (из цикла в цикл) запрашивает максимально возможное количество слов полезной информации, т.е. запрашивает количество слов полезной информации, необходимое для записи такого значения контролируемого параметра, для которого требуется максимальное количество слов полезной информации.It is known that for a data exchange method in which one subscriber (Master) always proactively requests data from another subscriber (Slave), it is characteristic that the subscriber (Slave) always sends the subscriber (Master) as many words of useful information that he has requested from him subscriber (Master) in the current message. In turn, the subscriber (Master) always (from cycle to cycle) asks for the maximum possible number of words of useful information, i.e. requests the number of words of useful information necessary to record such a value of the controlled parameter for which the maximum number of words of useful information is required.
Значение контролируемого параметра, измеренного с заданной точностью, и является полезной информацией.The value of the controlled parameter, measured with a given accuracy, is useful information.
Основная идея предлагаемого изобретения - передавать по каналу только нужное количество слов полезной информации, в то время как традиционно в системах Master/Slave передается максимально возможное количество слов полезной информации.The main idea of the invention is to transmit on the channel only the necessary number of words of useful information, while traditionally in Master / Slave systems the maximum possible number of words of useful information is transmitted.
Предлагаемый способ обмена данными дает возможность при чтении данных из ведомого устройства (Slave) передавать по каналу только такое количество слов, предназначенных для записи полезной информации, которое достаточно для записи текущего значения контролируемого параметра, что увеличивает производительность канала (внутренней шины контроллера).The proposed method of data exchange makes it possible, when reading data from a slave device (Slave), to transmit over the channel only as many words intended for recording useful information that are sufficient to record the current value of the monitored parameter, which increases the performance of the channel (internal controller bus).
Например, при чтении данных из ведомого устройства (Slave) ведущее устройство (Master) запрашивает значение измеряемого (контролируемого) параметра, например значение температуры. Допустим, что для передачи предельного значения температуры, например Tmax=+70°, необходимо максимальное количество слов, а именно четыре слова (фиг. 12). Следовательно, для чтения вначале из ведущего устройства (Master) направляют в ведомое устройство (Slave) управляющий пакет (CTL), где в SIZE закодировано число пять. Т.е. у ведомого устройства (Slave) запрашивают информационный пакет, поле данных которого должно состоять из четырех слов (d[0], d[1], d[2], d[3])+одного слова контрольной суммы CRC(2) (режим полного чтения) (фиг. 12). Но диапазон номинальных значений измеряемого параметра температуры в 90% случаев не выходит за пределы значений °С +21...+40. Для записи номинальных значений температуры необходимо одно слово данных. Следовательно, каждый раз при передаче номинального значения температуры по каналу направляется три лишних слова, биты которых установлены в логический ноль. Для того чтобы не передавать лишние слова в микропроцессоре ведомого устройства (Slave) анализируется текущее значение измеренной температуры, например Т1=+25°, и выставляется в ответном информационном пакете в SIZE число два. Т.е. ведомое устройство (Slave) отправляет ведущему устройству (Master) информационный пакет, в котором поле данных состоит из одного слова данных (d[0])+ одного слова контрольной суммы CRC(2) (режим адаптивного чтения данных из Slave) (фиг. 13). В результате имеем сокращение времени &Тр обслуживания конкретного ведомого устройства (Slave) (модуля ввода-вывода, ИД) примерно на 28%.For example, when reading data from a slave device (Slave), the master device (Master) requests the value of the measured (controlled) parameter, for example, the temperature value. Assume that to transmit the temperature limit value, for example T max = + 70 °, the maximum number of words is required, namely four words (Fig. 12). Therefore, for reading, the control packet (CTL) is sent from the master (Master) to the slave (Slave), where the number five is encoded in SIZE. Those. an information packet is requested from the slave (Slave), the data field of which should consist of four words (d [0], d [1], d [2], d [3]) + one word of the CRC checksum (2) (mode full reading) (Fig. 12). But the range of nominal values of the measured temperature parameter in 90% of cases does not go beyond the values of ° С +21 ... + 40. To record the nominal temperature values, one data word is required. Therefore, each time the nominal temperature value is transmitted, three extra words are sent through the channel, the bits of which are set to logical zero. In order not to transmit unnecessary words in the microprocessor of the slave device (Slave), the current value of the measured temperature is analyzed, for example T 1 = + 25 °, and the number two is set in the response information packet in SIZE. Those. the slave sends a data packet to the master (Master), in which the data field consists of one data word (d [0]) + one CRC checksum word (2) (adaptive data reading from Slave) (Fig. 13 ) As a result, we have a reduction in the service time & Tr of a specific slave device (I / O module, ID) by about 28%.
Процентный временной выигрыш &Тр можно рассчитать по формуле:The percentage time gain & Tr can be calculated by the formula:
ΔΤρ = (1-^)*100[%] где х - максимальное количество слов данных, зарезервированное для данного контролируемого параметра;ΔΤρ = (1 - ^) * 100 [%] where x is the maximum number of data words reserved for this monitored parameter;
у - минимально необходимое количество слов для текущего значения контролируемого параметра.y is the minimum required number of words for the current value of the controlled parameter.
- 6 035228- 6 035228
Для того чтобы ведущее устройство (Master) не восприняло полученный информационный пакет с меньшим количеством слов полезной информации как ошибку, в состав управляющих полей управляющего и информационного пакетов включен бит ADP. Бит ADP предназначен для уведомления ведущего устройства (Master) об уменьшении количества слов полезной информации, полученных ведущим устройством (Master) в информационном пакете (CTL+DATA), по сравнению с количеством слов полезной информации, запрошенных ведущим устройством (Master) в управляющем пакете (CTL). В приведенном выше примере из ведущего устройства (Master) направляют в ведомое устройство (Slave) управляющий пакет (CTL) со значением 0 в бите ADP и заданным максимальным числом в Size запрашиваемого количества слов полезной информации. В свою очередь, когда осуществляют передачу из ведомого устройства (Slave) в ведущее устройство (Master) ответного информационного пакета (CTL+DATA) с количеством слов полезной информации (DATA) меньшим, чем запрашивалось в управляющем пакете, в ответном информационном пакете бит ADP имеет значение 1. Полученный информационный пакет, в управляющем поле которого бит ADP имеет значение 1, ведущее устройство (Master) воспринимает как команду к приему другого количества слов полезной информации (фиг. 14, 15). Если ведомое устройство (Slave) направляет в ведущее устройство (Master) такое количество слов полезной информации (DATA), какое запросило ведущее устройство (Master), то значение бита ADP в ответном информационном пакете не изменяется и сохраняет значение 0.In order for the master device (Master) not to perceive the received information packet with fewer words of useful information as an error, the ADP bit is included in the control fields of the control and information packets. The ADP bit is designed to notify the master device (Master) about a decrease in the number of words of useful information received by the master (Master) in the information packet (CTL + DATA), compared with the number of words of useful information requested by the master (Master) in the control packet ( CTL). In the above example, a control packet (CTL) is sent from the master (Master) to the slave (Slave) with a value of 0 in the ADP bit and a specified maximum number in Size of the requested number of words of useful information. In turn, when transmitting from the slave device (Slave) to the master device (Master) the response information packet (CTL + DATA) with the number of words of useful information (DATA) less than that requested in the control packet, the ADP bit in the response information packet has value 1. The received information packet, in the control field of which the ADP bit has the value 1, is considered by the master device as a command to receive another number of words of useful information (Figs. 14, 15). If the slave device sends to the master device (Master) as many words of useful information (DATA) as the master device requested, then the value of the ADP bit in the response information packet does not change and stores the value 0.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EA201700029A EA035228B1 (en) | 2016-12-28 | 2016-12-28 | Method for adaptive data transmission in an industrial controller |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EA201700029A EA035228B1 (en) | 2016-12-28 | 2016-12-28 | Method for adaptive data transmission in an industrial controller |
Publications (2)
Publication Number | Publication Date |
---|---|
EA201700029A1 EA201700029A1 (en) | 2018-02-28 |
EA035228B1 true EA035228B1 (en) | 2020-05-19 |
Family
ID=61244313
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
EA201700029A EA035228B1 (en) | 2016-12-28 | 2016-12-28 | Method for adaptive data transmission in an industrial controller |
Country Status (1)
Country | Link |
---|---|
EA (1) | EA035228B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2705421C1 (en) * | 2018-12-25 | 2019-11-07 | Общество с ограниченной ответственностью "ТЕКОН Микропроцессорные технологии" | Method of transmitting data over a bus, a communication system for realizing said method and an automatic protection device for preventing an emergency situation at a control object |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8990464B2 (en) * | 2011-10-05 | 2015-03-24 | Analog Devices, Inc. | Methods for discovery, configuration, and coordinating data communications between master and slave devices in a communication system |
RU2597501C2 (en) * | 2011-06-29 | 2016-09-10 | Роберт Бош Гмбх | Method and device for serial transmission of data with flexible size and variable bit length |
-
2016
- 2016-12-28 EA EA201700029A patent/EA035228B1/en not_active IP Right Cessation
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
RU2597501C2 (en) * | 2011-06-29 | 2016-09-10 | Роберт Бош Гмбх | Method and device for serial transmission of data with flexible size and variable bit length |
US8990464B2 (en) * | 2011-10-05 | 2015-03-24 | Analog Devices, Inc. | Methods for discovery, configuration, and coordinating data communications between master and slave devices in a communication system |
Non-Patent Citations (1)
Title |
---|
MIL-STD-1553. Tutorial. AIM Gmbh. Avionics Databus Solutions, November 2010 v2.3 [online]. Retrieved from the Internet: <URL: https://www.aim-online. com/pdf/OVW1553.pdf>, с 2-1, раздел "MIL-STD-1553 Overview, с 2-4, раздел "1553B Hardware Components", с. 3-9, раздел "4.3.3.5.1.2. Remote Terminal Address", с 3-10, раздел "4.3.3.5.1.5. Data Word Count/Mode Code", с 3-25, раздел "BC-RT", с. 3-27, раздел "4.3.3.6.5. Mode Command with Data Word (Transmit)" * |
Also Published As
Publication number | Publication date |
---|---|
EA201700029A1 (en) | 2018-02-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2596582C2 (en) | Method and device for memory size adapted serial data transfer | |
Frenzel | Handbook of serial communications interfaces: a comprehensive compendium of serial digital input/output (I/O) standards | |
RU2595962C2 (en) | Method and device for adaptation of reliability of data transmission in serial bus system | |
US7689687B2 (en) | Communication controller with automatic time stamping | |
US5696911A (en) | Arrangement for eliminating malfunction and/or permitting high-speed transmission in a serial bus connection, and transmitter and receiver units linked to the latter | |
US9432488B2 (en) | High speed embedded protocol for distributed control systems | |
US20100262736A1 (en) | Communication method and master-slave system for a field bus configured according to the as-interface standard | |
KR20210102408A (en) | Subscriber stations for serial bus systems and methods of communication in serial bus systems | |
US8307137B2 (en) | Remote communication method of a network | |
EA035228B1 (en) | Method for adaptive data transmission in an industrial controller | |
CN107302482A (en) | Data transmission system between a kind of board | |
Plotnikov et al. | Modeling of inter-modular interaction based on the CANopen protocol in vibration monitoring systems | |
Hafeez et al. | State of the art survey on comparison of can, flexray, lin protocol and simulation of lin protocol | |
CN106664231A (en) | Transmission unit with checking function | |
RU2682435C1 (en) | Data transmission interface | |
CN107102637A (en) | A kind of method that bus signals failure simulation device based on CAN produces fault-signal | |
CN110659242A (en) | MIL-STD-1553B bus protocol controller | |
CN105812216B (en) | PBUS transformerless EtherCAT communication circuit and application method | |
CN212905944U (en) | Process control loop bridge, process control transmitter and terminal module | |
US9208011B2 (en) | Synchronous serial interface circuit and motion control function module | |
US5907690A (en) | Modular interface devices for a distributed input/output system | |
CN116614159B (en) | Twisted pair isolation type communication transmission method for battery monitoring | |
CN111555946A (en) | Subscriber station of a bus system and method for transmitting data in a bus system | |
US20220247596A1 (en) | Sensor hub, sensor system, method for transmitting sensor signals and computer-readable storage medium | |
Buchanan et al. | WorldFIP |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
MM4A | Lapse of a eurasian patent due to non-payment of renewal fees within the time limit in the following designated state(s) |
Designated state(s): AM AZ BY KZ KG TJ TM |