CN116418624B - Industrial equipment communication system and communication method based on master-slave control - Google Patents

Industrial equipment communication system and communication method based on master-slave control Download PDF

Info

Publication number
CN116418624B
CN116418624B CN202310172630.6A CN202310172630A CN116418624B CN 116418624 B CN116418624 B CN 116418624B CN 202310172630 A CN202310172630 A CN 202310172630A CN 116418624 B CN116418624 B CN 116418624B
Authority
CN
China
Prior art keywords
communication
slave
data
master
controller
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202310172630.6A
Other languages
Chinese (zh)
Other versions
CN116418624A (en
Inventor
林海杰
张迪
吴敏涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ellide Guangdong Intelligent Technology Co ltd
Original Assignee
Ellide Guangdong Intelligent Technology Co ltd
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 Ellide Guangdong Intelligent Technology Co ltd filed Critical Ellide Guangdong Intelligent Technology Co ltd
Priority to CN202310172630.6A priority Critical patent/CN116418624B/en
Publication of CN116418624A publication Critical patent/CN116418624A/en
Application granted granted Critical
Publication of CN116418624B publication Critical patent/CN116418624B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • H04L12/40032Details regarding a bus interface enhancer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • H04L67/145Termination or inactivation of sessions, e.g. event-controlled end of session avoiding end of session, e.g. keep-alive, heartbeats, resumption message or wake-up for inactive or interrupted session
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Medical Informatics (AREA)
  • Cardiology (AREA)
  • Small-Scale Networks (AREA)

Abstract

The application discloses an industrial equipment communication system and a communication method based on master-slave control, wherein the system comprises a master controller and a plurality of slave controllers, one communication interface of the master controller is connected with a central control system through a first communication bus, the other communication interface is connected with the plurality of slave controllers through a second communication bus, and each slave controller is connected with industrial equipment through a respective equipment communication bus; according to the application, a communication template of the equipment is compiled according to the equipment communication address table; downloading the communication template into a template library of the slave controller; configuring the slave controller to communicate with the device using the communication template; the master controller configures a communication device label, confirms the slave controllers participating in communication, and transmits broadcast frame data; judging whether to send data or not according to the station number and the communication equipment table by the slave controller; entering a main controller waiting area; and judging whether the control information needs to be sent or not. The application can not only improve the overall communication efficiency of the system, but also improve the reuse rate of the communication program.

Description

Industrial equipment communication system and communication method based on master-slave control
Technical Field
The application belongs to the technical field of industrial control, and particularly relates to an industrial equipment communication system and a communication method based on master-slave control.
Background
Under the wave of automation and intellectualization, at present, many industrial equipment and instruments are all provided with communication interfaces to be in data butt joint with an automation control system, such as an air compressor, a cold dryer, a water chilling unit, a heat recovery machine, an ammeter, a flowmeter and the like, are basically provided with RS-485 interfaces or Ethernet interfaces for external communication, and the communication protocols mainly comprise MODBUS, profibus, profinet, canOpen and the like, and the same equipment is produced by different manufacturers, so that the design ideas are different. When the central control system carries out configuration programming on each device, the communication address table of each device is adapted, and the work is very complicated; in addition, most of equipment communication adopts an inquiry-response mode to carry out communication, and the central control system can carry out communication for a plurality of times when completing one complete data reading for one piece of equipment, once the quantity of the communication equipment mounted on a data bus is excessive, the updating frequency of equipment data is low, and the control delay is increased.
In fact, the same type of equipment, even designed and produced by different manufacturers, has substantially the same characteristics, generating similar data, such as the fact that the air compressor must have operating/fault/early warning conditions, as well as data of the exhaust pressure, exhaust temperature, etc. The homogeneity of various devices is extracted, and after the communication interfaces are unified, the communication efficiency of the whole system can be improved, and meanwhile, the control program of the central control system has wider applicability.
Disclosure of Invention
The application aims to overcome the defects and shortcomings of the prior art and provide the industrial equipment communication system and the industrial equipment communication method based on master-slave control, which not only can improve the overall communication efficiency of the communication system, but also can improve the reuse rate of communication programs.
In order to achieve the above purpose, the present application adopts the following technical scheme:
the application provides an industrial equipment communication system based on master-slave control, which comprises a master controller and a plurality of slave controllers, wherein one communication interface of the master controller is connected with a central control system through a first communication bus, the other communication interface is connected with the plurality of slave controllers through a second communication bus, each slave controller is connected with industrial equipment through independent equipment communication buses, each slave controller is provided with two communication interfaces, one communication interface is used for being connected with the master controller, and the other communication interface is connected with the industrial equipment.
The main controller comprises a first hardware driving layer, a first communication interface layer, a first standard template library, a first data buffer layer, a first business logic layer, a first real-time operating system, a first algorithm library and a first standard library;
the first hardware driving layer is used for storing a driving program of a hardware interface in the main controller;
the first communication interface layer is used for realizing a software interface of a standard communication protocol;
the first standard template library is used for carrying out homography on the same type of industrial equipment so as to enable the same type of industrial equipment to have the same data format, and the master controller uses templates of the template library to carry out standardized communication with the slave controller;
the first data buffer layer is a data buffer pool of the master controller and the slave controller which are connected at present and is used for data arrangement and cleaning;
the first business logic layer is used for carrying out logic interaction with the first real-time operating system, the first algorithm library and the first standard library;
the first real-time operation system is used for controlling the main controller in real time;
the first algorithm library is used for storing software algorithms in the main controller;
the first standard library is used for storing communication templates of a plurality of different types of industrial equipment;
the slave controller comprises a second hardware driving layer, a second communication interface layer, a second standard template library, a functional module layer, a second data buffer layer, a second business logic layer, a second real-time operating system, a second algorithm library and a second standard library;
the second hardware driving layer is used for storing a driving program of a hardware interface in the slave controller;
the second communication interface layer is used for realizing a software interface of a standard communication protocol;
the second standard template library is used for carrying out homography on the same type of industrial equipment so as to enable the same type of industrial equipment to have the same data format, and the slave controller uses the templates of the template library to carry out standardized communication with the master controller;
the function module layer is used for storing communication templates of various different brands and types of equipment and instruments, and can realize data docking only by selecting the corresponding communication template when communicating with equipment of a certain type, and uploading the data to the second data buffer layer;
the second data buffer layer is used for data buffer of the slave controller and the currently connected equipment or instrument and is used for data arrangement and cleaning;
the second business logic layer is used for carrying out logic interaction with a second real-time operating system, a second algorithm library and a second standard library;
the second real-time operation system is used for being controlled in real time by the slave controller;
the second algorithm library is used for storing software algorithms in the slave controller;
the second standard library is used for storing communication templates of a plurality of different types of industrial equipment;
as a preferable technical scheme, the master controller and the slave controller each comprise a central processing unit, a communication module and a storage module, wherein the communication module and the storage module are connected with the central processing unit, the central processing unit is used for processing data, the communication module provides an external communication interface, and the storage module provides a program downloading interface.
As an optimal technical scheme, the functional module layer comprises an air compressor template library, a cold dryer template library, a dryer template library, an ammeter template library, a flowmeter template library and a centrifuge template library.
As a preferable technical scheme, the hardware interface comprises an IO port and an I2C, UART, SPI.
In a second aspect, the present application provides a communication method of an industrial equipment communication system based on master-slave control, comprising the following steps:
s1, inquiring whether a communication module of the equipment exists in a template, if not, executing a step S2, and if so, executing a step S4;
s2, compiling a communication template of the equipment according to the equipment communication address table;
s3, downloading the communication template into a template library of the slave controller;
s4, the slave controller is configured to communicate with the equipment by using the communication template;
s5, the master controller configures a communication equipment table, confirms slave controllers participating in communication, and sends broadcast frame data;
s6, the slave controller judges whether to send data according to the station number and the communication equipment table;
s7, entering a main controller waiting area;
s8, the main controller judges whether control information needs to be sent, if so, the step S9 is executed, and if not, the step S5 is returned;
s9, the master controller sends a slave station control frame to the command slave controller, and the step S6 is returned.
As a preferable technical scheme, half-duplex or full-duplex communication networks are adopted between the master controller and the slave controllers, and each communication network comprises at most 1 master station and 32 slave stations; each data frame contains 11 bytes of information at least and 256 bytes of information at most; wherein,,
byte 1 of the data frame is the identification;
byte 2 of the data frame is "response slave station number" or "own station number";
the 3 rd to 6 th bytes of the data frame are 32bit data as an equipment list, each 1 bit represents that the slave station corresponding to the station number participates in communication when being 1, and the slave station representing the corresponding station number does not participate in communication when being 0;
the 7 th byte of the data frame is delay, the unit is 0.1 second, if the information of the slave station participating in the communication on the equipment table is not received within the set delay time, the master station or the slave station carries out the next round of communication according to the configuration of the master station's waiting time or the equipment table;
the 8 th byte of the data frame is the data length, and the length of the data area before the check code is calculated after the byte;
the 9 th byte to 254 th byte of the data frame are data areas.
As an optimal technical scheme, in the 1 st byte of a data frame, bit 0-bit 4 are slave station numbers of master station candidates, namely, the master station occupies the right of use of a communication bus after waiting for the slave station to send data; bit5 to bit7 are frame resolution identifiers, wherein:
001 is a slave station data frame, i.e., data sent from the slave station to the bus;
010 is a secondary station response frame, i.e. a response of the secondary station to the primary station control frame;
011 is the heartbeat frame of the slave station, namely the heartbeat signal sent to the bus when the data of the slave station is not updated;
101 is a frame broadcast by the master station, that is, the master station broadcasts information to all the slave stations of the bus, and since the half duplex bus can only be occupied by one master station or slave station at the same time, the frame specifies which slave station responds first in the "response station number" byte; in addition, the master station broadcast frame is also used for the master station to start communication bus transmission, and the byte of the response slave station number specifies which slave station starts to transmit data;
110 is a master control frame, i.e. the master transmits control information to a specific slave.
As a preferred technical solution, the communication network comprises the following data frames:
master control frames, master broadcast frames, slave data frames, slave responses, and slave heartbeat frames.
As a preferable technical scheme, the byte information also comprises a CRC check code, wherein the CRC check code is used for checking the data length and the data area, and the check mode is CRC-16.
As a preferred technical scheme, the communication network comprises RS-232, RS-485, RS-422 and LORA.
Compared with the prior art, the application has the following advantages and beneficial effects:
1. the traditional RS-485 bus and MODBUS protocol are single-layer networks (i.e. a communication network only exists between a controller and equipment meters), the application is changed into double-layer networks, multi-thread distributed communication is carried out between a master controller and a slave controller, the frequency of equipment meter data updating is improved by more than 2 times, the more equipment on one bus is, the more efficiency is improved, the more the equipment on one bus is obviously (assuming that one equipment meter needs 2 MODBUS instructions to complete data updating, the period of one pair of instructions is 500ms, and 5 equipment is arranged on the bus, the data updating period of the equipment meter is 5s, and after the system of the application is used, the data updating period of each slave controller and the equipment meter is 2 x 500 ms=1s, and the communication period can be reduced by half due to no need of query-response round-robin between the master controller and the slave controller, namely, the updating period of the whole bus equipment meter is 1.25s, and the data updating frequency is improved by 3 times.
2. In the application, the slave controllers communicate by using the standard templates, and the slave controllers can be internally provided with the communication templates of various equipment and meters, so that the communication templates can be repeatedly used for equipment with the same model in different projects, and the construction efficiency of the self-control engineering is improved.
3. The master-slave controllers of the application can be realized by a plurality of different half-duplex buses, and have higher adaptability to severe industrial communication environments.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of an industrial equipment communication system based on master-slave control according to an embodiment of the present application;
FIG. 2 is a schematic diagram of the structure of a master controller and a slave controller according to an embodiment of the present application;
FIG. 3 is a software architecture diagram of a host controller according to an embodiment of the present application;
FIG. 4 is a software architecture diagram of a slave controller according to an embodiment of the present application;
FIG. 5 is a flow chart of an industrial equipment communication method based on master-slave control according to an embodiment of the application.
Detailed Description
In order to enable those skilled in the art to better understand the present application, the following description will make clear and complete descriptions of the technical solutions according to the embodiments of the present application with reference to the accompanying drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the described embodiments of the application may be combined with other embodiments.
As shown in fig. 1, the industrial equipment communication system based on master-slave control in the embodiment comprises a master controller and a plurality of slave controllers, wherein one communication interface of the master controller is connected with the central control system through a first communication bus, the other communication interface is connected with the plurality of slave controllers through a second communication bus, each slave controller is connected with the industrial equipment through a respective independent equipment communication bus, each slave controller is provided with two communication interfaces, one communication interface is used for being connected with the master controller, and the other communication interface is connected with the industrial equipment; the communication system comprises a central control system, a master controller, a slave controller and a device meter, and particularly various half-duplex or full-duplex communication buses can be used between the master controller and the slave controller.
As shown in FIG. 2, the hardware structures of the master controller and the slave controller are basically the same, and the controllers comprise 1 central processing unit, 2 communication modules and 1 data storage module; the 2 communication modules provide two external communication interfaces, and the data storage module provides a program downloading interface.
As shown in fig. 3, the main controller includes a first hardware driving layer, a first communication interface layer, a first standard template library, a first data buffer layer, a first business logic layer, a first real-time operating system, a first algorithm library and a first standard library;
the bottommost layer is a first hardware driving layer and mainly stores driving programs of hardware interfaces such as hardware IO ports and I2C, UART, SPI.
The first communication interface layer is used for implementing a software interface of a standard communication protocol such as MODBUS, profibus, profinet, canOpen.
The first standard template library is a software template after carrying out homography on different equipment and instruments, and a set of standard templates are respectively arranged on different equipment or instrument types such as an air compressor, a centrifuge, an ammeter and the like.
The first data buffer layer is a data buffer pool of the master controller and the slave controller which are connected currently and is used for data arrangement and cleaning.
The first business logic layer is a processing layer for carrying out logic interaction between data and a real-time operating system, an algorithm library and a standard library.
The first real-time operation system is used for controlling the main controller in real time;
the first algorithm library is used for storing software algorithms in the main controller;
the first standard library is used for storing communication templates of a plurality of different types of industrial equipment;
as shown in fig. 4, the slave controller includes a second hardware driving layer, a second communication interface layer, a second standard template library, a functional module layer, a second data buffer layer, a second service logic layer, a second real-time operating system, a second algorithm library and a second standard library;
the bottommost layer is a second hardware driving layer, and mainly stores driving programs of hardware interfaces such as hardware IO ports and I2C, UART, SPI.
The second communication interface layer is used for implementing a software interface of a standard communication protocol such as MODBUS, profibus, profinet, canOpen.
The second standard template library is a software template after carrying out homomorphism induction on different equipment and instruments, and different equipment or instrument types such as an air compressor, a centrifuge, an ammeter and the like are respectively provided with a set of standard templates.
The second functional module layer is used for storing communication templates of various different brands and types of equipment and instruments, and can realize data butt joint only by selecting the corresponding communication template when communicating with equipment of a certain model, and the data is uploaded to the second data buffer layer.
The second data buffer layer is a data buffer pool of the slave controller and the currently connected equipment or instrument and is used for data arrangement and cleaning.
The second business logic layer is a processing layer for carrying out logic interaction between the data and the real-time operating system, the algorithm library and the standard library.
The second real-time operation system is used for being controlled in real time by the slave controller;
the second algorithm library is used for storing software algorithms in the slave controller;
the second standard library is used for storing communication templates of a plurality of different types of industrial equipment;
as shown in fig. 5, another embodiment of the present application provides a communication method of an industrial equipment communication system based on master-slave control, which includes the following steps:
s1, inquiring whether a communication module of the equipment exists in a template, if not, executing a step S2, and if so, executing a step S4;
s2, compiling a communication template of the equipment according to the equipment communication address table;
s3, downloading the communication template into a template library of the slave controller;
s4, the slave controller is configured to communicate with the equipment by using the communication template;
s5, the master controller configures a communication equipment table, confirms slave controllers participating in communication, and sends broadcast frame data;
s6, the slave controller judges whether to send data according to the station number and the communication equipment table;
s7, entering a main controller waiting area;
s8, the main controller judges whether control information needs to be sent, if so, the step S9 is executed, if not, the step S5 is returned,
s9, the master controller sends a slave station control frame to a specified slave controller, and the process returns to S6.
Furthermore, the communication method is applicable to half-duplex or full-duplex communication networks, such as common industrial bus networks of RS-232, RS-485, RS-422, LORA and the like, and each network comprises at most 1 master station and 32 slave stations; each data frame contains a minimum of 11 bytes of information and a maximum of 256 bytes of information: the method comprises the following steps:
(1) The 1 st byte of the data frame is an identification, bit 0-bit 4 are the slave station numbers of the master station, namely the master station occupies the use right of the communication bus after waiting for the slave station to send data; bit5 to bit7 are frame resolution identifiers, wherein:
001 is a slave station data frame, i.e., data sent from the slave station to the bus;
010 is a secondary station response frame, i.e. a response of the secondary station to the primary station control frame;
011 is the heartbeat frame of the slave station, namely the heartbeat signal sent to the bus when the data of the slave station is not updated;
101 is a frame broadcast by the master station, that is, the master station broadcasts information to all the slave stations of the bus, and since the half duplex bus can only be occupied by one master station or slave station at the same time, the frame specifies which slave station responds first in the "response station number" byte; in addition, the master station broadcast frame is also used for the master station to start communication bus transmission, and the byte of the response slave station number specifies which slave station starts to transmit data;
110 is a master control frame, i.e. the master transmits control information to a specific slave.
(2) Byte 2 is the "responding slave station number" or "own station number".
(3) The 3 rd to 6 th byte data of 32 bits are the equipment list, and each 1 bit is 1, the slave station representing the corresponding station number participates in communication, and the slave station representing the corresponding station number does not participate in communication when 0 time.
(4) The 7 th byte is delay, the unit is 0.1 seconds, and if the slave station information (the slave station is offline or the bus communication quality is too bad) participating in the communication on the device table is not received within the set delay time, the master station or the slave station will perform the next round of communication according to the configuration of the master station round or the device table.
(5) The 8 th byte is the data length, and the data area length before the check code is calculated after the byte.
(6) The 9 th byte to 254 th byte are data areas, and the data areas are distinguished according to different conditions as follows:
(6-1) the data area basic format of the master station control frame or the broadcast frame is as follows:
data type: 001H represents a state, 010H represents a 16-bit integer, 011H represents a 32-bit integer, 100H represents a 32-bit floating point number, 101H represents a 64-bit integer, and 110H represents a 64-bit floating point number.
The address is divided into a state address and a data address, the minimum value is 0, and the maximum value is 65535; "state" is used to characterize data of 1 or 0, and "data" is used to characterize integers and real numbers.
The write value may have different byte lengths depending on the type of data, where the state is 1 byte, the 16-bit integer is 2 bytes, the 32-bit integer and 32 floating point number are 4 bytes, the 64-bit integer and 64-bit floating point number are 8 bytes, all data is displayed in the big-end-in-front manner.
(6-2) the data area basic format of the slave station data frame is as follows:
device type: a maximum of 65536 different device or meter types can be distinguished, each using the same data formatting.
Data 1 to data N: the data format for each device or meter is fixed, with a maximum value of 244.
(6-3) the data area basic format of the slave response frame is as follows:
data type: 001H represents a state, 010H represents a 16-bit integer, 011H represents a 32-bit integer, 100H represents a 32-bit floating point number, 101H represents a 64-bit integer, and 110H represents a 64-bit floating point number.
Bit7: when 1, it represents write success, and when 0, it represents write failure.
Address: the associated address of the surface slave station response.
(7) CRC check code: the data length and the data area are checked in a CRC-16 manner.
Further, master control frames, master broadcast frames, slave data frames, slave response frames, slave heartbeat frames are shown in tables 1-5 below.
TABLE 1
TABLE 2
TABLE 3 Table 3
TABLE 4 Table 4
TABLE 5
The software architecture of the master-slave controller is mainly characterized in that the master-slave controller is communicated by using a standard template, the slave controller can be internally provided with communication templates of various equipment meters, and the slave controller can be repeatedly used for equipment with the same model in different projects. The application adopts a double-layer network, the multi-thread distributed communication is carried out between the master controller and the slave controllers, the data updating frequency of the equipment meters is improved by more than 2 times, the more equipment is arranged on one bus, the more the improved efficiency is obvious (the more equipment meters are required to finish the data updating of the MODBUS instructions, the period of one pair of instructions is 500ms, 5 pieces of equipment are arranged on the bus, the data updating period of the equipment meters is 5s, after the system is used, the data updating period of each slave controller and the equipment meters is 2 x 500ms = 1s, and the communication period can be reduced by half, namely 500ms/2*5 = 1.25s, so the data updating frequency of the whole bus equipment meters is improved by 3 times.
Those skilled in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by a computer program for instructing relevant hardware, where the program may be stored in a non-volatile computer readable storage medium, and where the program, when executed, may include processes in the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples are preferred embodiments of the present application, but the embodiments of the present application are not limited to the above examples, and any other changes, modifications, substitutions, combinations, and simplifications that do not depart from the spirit and principle of the present application should be made in the equivalent manner, and the embodiments are included in the protection scope of the present application.

Claims (10)

1. The industrial equipment communication system based on master-slave control is characterized by comprising a master controller and a plurality of slave controllers, wherein one communication interface of the master controller is connected with the central control system through a first communication bus, the other communication interface is connected with the plurality of slave controllers through a second communication bus, each slave controller is connected with industrial equipment through a respective independent equipment communication bus, each slave controller is provided with two communication interfaces, one communication interface is used for being connected with the master controller, and the other communication interface is connected with the industrial equipment;
the main controller comprises a first hardware driving layer, a first communication interface layer, a first standard template library, a first data buffer layer, a first business logic layer, a first real-time operating system, a first algorithm library and a first standard library;
the first hardware driving layer is used for storing a driving program of a hardware interface in the main controller;
the first communication interface layer is used for realizing a software interface of a standard communication protocol;
the first standard template library is used for carrying out homography on the same type of industrial equipment so as to enable the same type of industrial equipment to have the same data format, and the master controller uses templates of the template library to carry out standardized communication with the slave controller;
the first data buffer layer is a data buffer pool of the master controller and the slave controller which are connected at present and is used for data arrangement and cleaning;
the first business logic layer is used for carrying out logic interaction with the first real-time operating system, the first algorithm library and the first standard library;
the first real-time operation system is used for controlling the main controller in real time;
the first algorithm library is used for storing software algorithms in the main controller;
the first standard library is used for storing communication templates of a plurality of different types of industrial equipment, and the master controller uses the templates of the template library to perform standardized communication with the slave controllers;
the slave controller comprises a second hardware driving layer, a second communication interface layer, a second standard template library, a functional module layer, a second data buffer layer, a second business logic layer, a second real-time operating system, a second algorithm library and a second standard library;
the second hardware driving layer is used for storing a driving program of a hardware interface in the slave controller;
the second communication interface layer is used for realizing a software interface of a standard communication protocol;
the second standard template library is used for carrying out homography on the same type of industrial equipment so as to enable the same type of industrial equipment to have the same data format, and the slave controller uses the templates of the template library to carry out standardized communication with the master controller;
the function module layer is used for storing communication templates of various different brands and types of equipment and instruments, and can realize data docking only by selecting the corresponding communication template when communicating with equipment of a certain type, and uploading the data to the second data buffer layer;
the second data buffer layer is used for data buffer of the slave controller and the currently connected equipment or instrument and is used for data arrangement and cleaning;
the second business logic layer is used for carrying out logic interaction with a second real-time operating system, a second algorithm library and a second standard library;
the second real-time operation system is used for being controlled in real time by the slave controller;
the second algorithm library is used for storing software algorithms in the slave controller;
the second standard library is used for storing communication templates of a plurality of different types of industrial equipment, and the slave controller uses the templates of the template library to perform standardized communication with the master controller.
2. The master-slave control based industrial equipment communication system of claim 1, wherein the master controller and the slave controller each comprise a central processing unit, a communication module and a storage module, wherein the communication module and the storage module are connected with the central processing unit, the central processing unit is used for processing data, the communication module provides an external communication interface, and the storage module provides a program downloading interface.
3. The industrial equipment communication system based on master-slave control of claim 1, wherein the functional module layer comprises an air compressor template library, a cold dryer template library, a suction dryer template library, an electric meter template library, a flow meter template library and a centrifuge template library.
4. The industrial equipment communication system based on master-slave control according to claim 1, wherein the hardware interface comprises an IO port, I2C, UART, SPI.
5. A communication method of an industrial equipment communication system based on master-slave control according to any of claims 1-4, characterized by comprising the steps of:
s1, inquiring whether a communication template of the equipment exists in the templates, if not, executing a step S2, and if so, executing a step S4;
s2, compiling a communication template of the equipment according to the equipment communication address table;
s3, downloading the communication template into a template library of the slave controller;
s4, the slave controller is configured to communicate with the equipment by using the communication template;
s5, the master controller configures a communication equipment table, confirms slave controllers participating in communication, and sends broadcast frame data;
s6, the slave controller judges whether to send data according to the station number and the communication equipment table;
s7, entering a main controller waiting area;
s8, the main controller judges whether control information needs to be sent, if so, the step S9 is executed, and if not, the step S5 is returned;
s9, the master controller sends a slave station control frame to the command slave controller, and the step S6 is returned.
6. The communication method according to claim 5, wherein half-duplex or full-duplex communication networks are adopted between the master controller and the slave controllers, and each communication network comprises at most 1 master station and 32 slave stations; each data frame contains 11 bytes of information at least and 256 bytes of information at most; wherein,,
byte 1 of the data frame is the identification;
byte 2 of the data frame is "response slave station number" or "own station number";
the 3 rd to 6 th bytes of the data frame are 32bit data as an equipment list, each 1 bit represents that the slave station corresponding to the station number participates in communication when being 1, and each 0 represents that the slave station corresponding to the station number does not participate in communication;
the 7 th byte of the data frame is delay, the unit is 0.1 second, if the information of the slave station participating in the communication on the equipment table is not received within the set delay time, the master station or the slave station carries out the next round of communication according to the configuration of the master station's waiting time or the equipment table;
the 8 th byte of the data frame is the data length, and the length of the data area before the check code is calculated after the byte;
the 9 th byte to 254 th byte of the data frame are data areas.
7. The communication method according to claim 6, wherein in the 1 st byte of the data frame, bit0 to bit4 are secondary station numbers of the primary station's waiting time, i.e. the primary station occupies the right of use of the communication bus after waiting for the secondary station to send data; bit5 to bit7 are frame resolution identifiers, wherein:
001 is a slave station data frame, i.e., data sent from the slave station to the bus;
010 is a secondary station response frame, i.e. a response of the secondary station to the primary station control frame;
011 is the heartbeat frame of the slave station, namely the heartbeat signal sent to the bus when the data of the slave station is not updated;
101 is a frame broadcast by the master station, that is, the master station broadcasts information to all the slave stations of the bus, and since the half duplex bus can only be occupied by one master station or slave station at the same time, the frame specifies which slave station responds first in the "response station number" byte; in addition, the master station broadcast frame is also used for the master station to start communication bus transmission, and the byte of the response slave station number specifies which slave station starts to transmit data;
110 is a master control frame, i.e. the master transmits control information to a specific slave.
8. The communication method according to claim 6, wherein the communication network comprises the following data frames:
master control frames, master broadcast frames, slave data frames, slave responses, and slave heartbeat frames.
9. The communication method according to claim 6, wherein the byte information of the data frame further includes a CRC check code, and the CRC check code is used for checking the data length and the data area in a CRC-16 manner.
10. The communication method of claim 6, wherein the communication network comprises RS-232, RS-485, RS-422, and LORA.
CN202310172630.6A 2023-02-24 2023-02-24 Industrial equipment communication system and communication method based on master-slave control Active CN116418624B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310172630.6A CN116418624B (en) 2023-02-24 2023-02-24 Industrial equipment communication system and communication method based on master-slave control

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310172630.6A CN116418624B (en) 2023-02-24 2023-02-24 Industrial equipment communication system and communication method based on master-slave control

Publications (2)

Publication Number Publication Date
CN116418624A CN116418624A (en) 2023-07-11
CN116418624B true CN116418624B (en) 2023-11-03

Family

ID=87050545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310172630.6A Active CN116418624B (en) 2023-02-24 2023-02-24 Industrial equipment communication system and communication method based on master-slave control

Country Status (1)

Country Link
CN (1) CN116418624B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117579423B (en) * 2024-01-16 2024-03-29 南京德克威尔自动化有限公司 Bus extension module and communication method using same

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096405A (en) * 2011-01-05 2011-06-15 深圳市赛远自动化系统有限公司 Remote industrial network monitoring method and system based on S-Link and VLAN (Virtual Local Area Network) technique
CN103281229A (en) * 2013-05-03 2013-09-04 杭州正嘉数控设备有限公司 Motion control bus communication method based on Ethernet physical layer
CN106483930A (en) * 2016-11-18 2017-03-08 华中科技大学 A kind of method of automatic configuration of mixed type restructural CANopen slave station
CN209657111U (en) * 2019-03-25 2019-11-19 广州埃尔里德自动化科技有限公司 A kind of pneumatics station data monitoring system based on wireless communication
CN111846977A (en) * 2020-07-20 2020-10-30 重庆邮电大学 Automatic stacking robot system based on machine vision and operation method thereof
WO2022068185A1 (en) * 2020-09-29 2022-04-07 深圳大普微电子科技有限公司 Storage system and storage data processing method
CN114493305A (en) * 2022-01-30 2022-05-13 山东浪潮工业互联网产业股份有限公司 Industrial equipment management method and equipment based on identification analysis and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9977853B2 (en) * 2015-11-04 2018-05-22 Chronos Tech Llc Application specific integrated circuit link

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096405A (en) * 2011-01-05 2011-06-15 深圳市赛远自动化系统有限公司 Remote industrial network monitoring method and system based on S-Link and VLAN (Virtual Local Area Network) technique
CN103281229A (en) * 2013-05-03 2013-09-04 杭州正嘉数控设备有限公司 Motion control bus communication method based on Ethernet physical layer
CN106483930A (en) * 2016-11-18 2017-03-08 华中科技大学 A kind of method of automatic configuration of mixed type restructural CANopen slave station
CN209657111U (en) * 2019-03-25 2019-11-19 广州埃尔里德自动化科技有限公司 A kind of pneumatics station data monitoring system based on wireless communication
CN111846977A (en) * 2020-07-20 2020-10-30 重庆邮电大学 Automatic stacking robot system based on machine vision and operation method thereof
WO2022068185A1 (en) * 2020-09-29 2022-04-07 深圳大普微电子科技有限公司 Storage system and storage data processing method
CN114493305A (en) * 2022-01-30 2022-05-13 山东浪潮工业互联网产业股份有限公司 Industrial equipment management method and equipment based on identification analysis and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"基于DSP的多元数据同步采集与存储系统的设计与实现";张迪等;《液晶与显示》;全文 *
"基于无线网络的工业并联机器人控制器设计";贾鹏飞;《中国优秀硕士学位论文全文数据库》(第5期);全文 *

Also Published As

Publication number Publication date
CN116418624A (en) 2023-07-11

Similar Documents

Publication Publication Date Title
CN116418624B (en) Industrial equipment communication system and communication method based on master-slave control
CN101976074B (en) Industrial control system based on field bus and control network
CN103828305B (en) For parametrization automated system or the system and method for the field apparatus of control system
CN101399700B (en) Apparatus, method and integrated circuit chip having on-line addressing bus type node
CN205539996U (en) Redundant control system of controller, IO communication bus and communication module
CN101866328B (en) Automatically accessed serial bus read/write control method
CN105843199A (en) Control systems and methods of providing the same
CN101132328A (en) Real-time industry Ethernet EtherCAT communication controller
CN108199941B (en) CAN bus communication method based on CAN2.0B
CN105939253A (en) Industrial wireless gateway device and protocol conversion method thereof
CN104238517B (en) Communication method of PROFIBUS-DPV1 communication master station
CN102316113B (en) POWERLINK and HDLC protocol conversion equipment and realization method thereof
CN114205427A (en) Method, device and storage medium for protocol docking debugging
CN103366540B (en) Wireless network dynamic route kilowatt meter reading-out system and meter register method thereof
CN103346943A (en) Method and system of data transmission
CN104950880B (en) Industrial control equipment debugging system and method
CN104678918A (en) CANOPEN main control equipment based on PC104 bus and control method of CANOPEN main control equipment
CN205092874U (en) Data link layer circuit of real -time ethernet of industry
JP3227657B2 (en) Communication method and device for air conditioning control system
CN112764385A (en) System and method for realizing small PLC bus
CN101820373B (en) Real-time collocation method for fieldbus modules
CN105245422B (en) A kind of data link layer circuitry and its method for interchanging data of industry real-time ethernet
JPS6054549A (en) Data transmitting method and device
CN105281999B (en) A kind of bus-type driver port and its control method
CN214236813U (en) Welding controller and robot communication system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant