CN114095303A - Communication device, data transmission method and electronic device - Google Patents

Communication device, data transmission method and electronic device Download PDF

Info

Publication number
CN114095303A
CN114095303A CN202111394319.3A CN202111394319A CN114095303A CN 114095303 A CN114095303 A CN 114095303A CN 202111394319 A CN202111394319 A CN 202111394319A CN 114095303 A CN114095303 A CN 114095303A
Authority
CN
China
Prior art keywords
protocol
communication
slave station
data
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.)
Granted
Application number
CN202111394319.3A
Other languages
Chinese (zh)
Other versions
CN114095303B (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.)
Hangzhou Hollysys Automation Co Ltd
Original Assignee
Hangzhou Hollysys Automation 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 Hangzhou Hollysys Automation Co Ltd filed Critical Hangzhou Hollysys Automation Co Ltd
Priority to CN202111394319.3A priority Critical patent/CN114095303B/en
Publication of CN114095303A publication Critical patent/CN114095303A/en
Application granted granted Critical
Publication of CN114095303B publication Critical patent/CN114095303B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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
    • 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/40169Flexible bus arrangements
    • H04L12/40176Flexible bus arrangements involving redundancy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/08Protocols for interworking; Protocol conversion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • 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
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • 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)
  • Computer Security & Cryptography (AREA)
  • Communication Control (AREA)

Abstract

The application discloses communication equipment, a data transmission method and electronic equipment. The communication equipment comprises a controller, a protocol conversion gateway, a first protocol master station, a plurality of first protocol slave stations and a plurality of second protocol slave stations. The first protocol master station is deployed in the controller, and each first protocol slave station is connected with the controller through a first communication protocol; one end of the protocol conversion gateway is connected with the controller through a first communication protocol, and the other end of the protocol conversion gateway is connected with each second protocol slave station through a second communication protocol; the protocol conversion gateway is used for completing protocol conversion between the first communication protocol and the second communication protocol so that the controller is compatible with the first communication protocol and the second communication protocol at the same time; the first protocol master station and the protocol conversion gateway communicate by using the communication standard to which the first communication protocol belongs, and the second protocol slave stations and the protocol conversion gateway communicate by using the second communication protocol, so that the communication equipment is compatible with different protocols.

Description

Communication device, data transmission method and electronic device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a communication device, a data transmission method, and an electronic device.
Background
Profibus (Process Field Bus) is a Field Bus standard used in automation technology. Among them, DP in Profibus-DP (distributed Peripherals) is a kind of computer electronic element with high speed and low cost for communication of device level control system and distributed I/O. Together with Profibus-PA (Process Automation), Profibus-FMS (Fieldbus Message Specification), it forms the Profibus standard. Profibus-DP is used in plant automation applications where a central controller controls a number of sensors and actuators, and where standard or selected diagnostics are used to learn the status of the various modules. The Profibus-DP protocol specifies the manner in which user data is transferred between the stations of the bus.
The existing relationship between the controller and the Profibus-DP protocol master and slave is shown in fig. 1, if the controller needs to support other protocols, other protocol functions need to be added to the controller, and hardware support is needed. Taking CAN (controller Area network) open protocol as an example, in the related art, a master station supporting the CANopen protocol needs to be added in a controller, and a CAN bus is used to connect the CANopen master station and a CANopen slave station, where the connection mode is shown in fig. 2. As can be seen from the above, for a controller that only supports the profibus dp protocol master station, if the support for other protocols such as the CANopen protocol is to be added, hardware needs to be changed, which is high in cost, poor in practicability, and not strong in universality; and the controller software needs to be modified, the version is upgraded, and the expandability and the compatibility are poor.
Disclosure of Invention
The application provides communication equipment, a data transmission method and electronic equipment, compatibility among different protocols is achieved, and the defects that a controller only supporting a Profibus-DP protocol is high in development cost and poor in expandability when being compatible with other protocols are overcome.
In order to solve the above technical problems, embodiments of the present invention provide the following technical solutions:
in one aspect, an embodiment of the present invention provides a communication device, including a controller, a protocol conversion gateway, a first protocol master station, a plurality of first protocol slave stations, and a plurality of second protocol slave stations;
the first protocol master station is deployed in the controller, and each first protocol slave station is connected with the controller through a first communication protocol;
one end of the protocol conversion gateway is connected with the controller through the first communication protocol, and the other end of the protocol conversion gateway is connected with each second protocol slave station through a second communication protocol; the protocol conversion gateway is used for completing protocol conversion between a first communication protocol and a second communication protocol so that the controller is compatible with the first communication protocol and the second communication protocol at the same time;
the first protocol master station and the protocol conversion gateway communicate by using the communication standard of the first communication protocol, and the second protocol slave stations and the protocol conversion gateway communicate by using the second communication protocol.
Optionally, the controller is disposed in a working machine, and the communication device further includes a standby machine;
the standby machine is provided with a standby controller and a standby first protocol master station;
and the standby controller is respectively connected with each first protocol slave station and the protocol conversion gateway through the first communication protocol.
Optionally, the protocol conversion gateway is further configured to initialize the second protocol master station and each second protocol slave station according to the received configuration data, so that the second protocol master station and each second protocol slave station enter a communication state after the initialization is successful;
the configuration data includes configuration data and configuration data of the second protocol master station and each second protocol slave station.
Optionally, the protocol conversion gateway includes a first protocol slave station component and a second protocol master station component;
the first protocol slave station component is used for correspondingly processing the received data based on the first communication protocol and sending the processed data to the second protocol master station component or the controller;
and the second protocol master station assembly is used for correspondingly processing the received data based on the second communication protocol and sending the processed data to each second protocol slave station or the first protocol slave station assembly.
Optionally, the first protocol slave station component is configured to receive controller raw data sent by the first protocol master station, analyze the controller raw data based on the first communication protocol to obtain controller transmission data, and send the controller transmission data to the second protocol master station component;
and the second protocol master station component is used for packaging the controller transmission data based on the second communication protocol to obtain controller target data and sending the controller target data to each second protocol slave station.
Optionally, the second protocol master station component is configured to receive slave station raw data sent by each second protocol slave station, analyze the slave station raw data based on the second communication protocol to obtain slave station transmission data, and send the slave station transmission data to the first protocol slave station component;
the first protocol slave station assembly is used for packaging the slave station transmission data based on the first communication protocol to obtain slave station target data and sending the slave station target data to the first protocol master station.
Optionally, the first protocol master station is a Profibus-DP protocol master station; each first protocol slave station is a Profibus-DP protocol slave station; correspondingly, each first protocol slave station is connected with the controller through a Profibus-DP protocol.
Optionally, each second protocol slave station is a CANopen slave station, and the second protocol master station component is a CANopen master station component;
correspondingly, one end of the protocol conversion gateway is connected with the controller through the Profibus-DP protocol, and the other end of the protocol conversion gateway is connected with each second protocol slave station through the CANopen protocol; the first protocol master station and the protocol conversion gateway communicate by using Profibus, and each second protocol slave station and the protocol conversion gateway communicate by using the CANopen protocol.
Another aspect of the embodiments of the present invention provides a data transmission method, which is applied to any one of the above communication devices, and includes:
sending data to be sent, which is sent by a first protocol master station to a second protocol slave station, to a protocol conversion gateway so that the protocol conversion gateway analyzes the data to be sent based on a communication protocol corresponding to the first protocol master station, encapsulates the analyzed data to be sent according to a communication protocol corresponding to the second protocol slave station, and sends the encapsulated data to the second protocol slave station;
receiving data to be written sent by the protocol conversion gateway, wherein the data to be written is sent to the first protocol master station by the second protocol slave station; and the protocol conversion gateway analyzes the data to be written based on the communication protocol corresponding to the second protocol slave station, and encapsulates the analyzed data to be written according to the communication protocol corresponding to the first protocol master station.
An embodiment of the present invention further provides an electronic device, which includes a processor, and the processor is configured to implement the steps of the data transmission method according to any one of the foregoing items when executing the computer program stored in the memory.
The technical scheme provided by the application has the advantages that one end of the protocol conversion gateway is connected with the controller supporting the first communication protocol, and the other end of the protocol conversion gateway is connected with the slave station supporting the second communication protocol, so that the conversion between the first communication protocol and the second communication protocol is realized. The controller can complete the compatibility of the first communication protocol and the second communication protocol without hardware support, effectively reduces the cost of the whole communication equipment, overcomes the defect that the development cost is high when the controller only supporting the first communication protocol such as the Profibus-DP protocol is compatible with other protocols, and has good practicability and strong universality. The controller can complete the compatibility of the first communication protocol and the second communication protocol without software upgrading, thereby saving the cost of software development, improving the expandability and the compatibility of the controller, and solving the defects of high development cost, poor expandability and poor compatibility when the controller only supports the first communication protocol such as the Profibus-DP protocol is compatible with other protocols.
In addition, the embodiment of the invention also provides a corresponding data transmission method and electronic equipment for the communication equipment, so that the communication equipment has feasibility and practicability, and the data transmission method and the electronic equipment have corresponding advantages.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the related art, the drawings required to be used in the description of the embodiments or the related art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of connections between master and slave stations supporting Profibus-DP protocols according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a connection between a master station and a slave station supporting profibus dp protocol and CANopen protocol in an exemplary application scenario in the related art according to the embodiment of the present invention;
fig. 3 is a block diagram of a specific implementation of a communication device according to an embodiment of the present invention;
fig. 4 is a block diagram of another specific implementation of a communication device according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a protocol conversion process provided in the embodiment of the present invention;
fig. 6 is a schematic flowchart of a data transmission method according to an embodiment of the present invention;
fig. 7 is a block diagram of an embodiment of an electronic device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first," "second," "third," "fourth," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may include other steps or elements not expressly listed.
Having described the technical solutions of the embodiments of the present invention, various non-limiting embodiments of the present application are described in detail below.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a communication device according to an embodiment of the present invention, where the embodiment of the present invention includes the following:
the communication device may comprise a controller 31, a protocol conversion gateway 32, a first protocol master station 33, a plurality of first protocol slave stations 34 and a plurality of second protocol slave stations 35. The first protocol master station 33 is disposed in the controller 31, and the total number of the first protocol slave stations and the second protocol slave stations can be flexibly selected according to actual requirements, which is not limited in this application. The first communication protocol and the second communication protocol may be any one, the controller 31 itself only supports the first communication protocol, and the protocol conversion gateway 32 converts the first communication protocol and the second communication protocol. The first protocol master station 33 is a calling party for each first protocol slave station to establish communication, a set of system comprises a master station and a plurality of slave stations, each first protocol slave station responds to the first protocol master station 33 after establishing communication, and each first protocol slave station 34 exchanges data with the first protocol master station 33 only when the master station rounds to call the slave station.
In the present embodiment, each first protocol slave 34 is connected to the controller 31 by a first communication protocol; one end of the protocol conversion gateway 32 is connected to the controller via a first communication protocol, and the other end is connected to each of the second protocol slave stations via a second communication protocol. The protocol conversion gateway 32 is used for performing protocol conversion between the first communication protocol and the second communication protocol, so that the controller 31 is compatible with the first communication protocol and the second communication protocol at the same time. Protocol conversion gateway 32 is any component that can perform a conversion between the first communication protocol and the second communication protocol. The first protocol master 33 and the protocol conversion gateway 32 communicate using the communication standard to which the first communication protocol belongs, and each of the second protocol slaves 35 and the protocol conversion gateway 32 communicate using the second communication protocol.
In the technical solution provided in the embodiment of the present invention, one end of the protocol conversion gateway is connected to the controller supporting the first communication protocol, and the other end is connected to the slave station supporting the second communication protocol, thereby implementing conversion between the first communication protocol and the second communication protocol. The controller can complete the compatibility of the first communication protocol and the second communication protocol without hardware support, effectively reduces the cost of the whole communication equipment, overcomes the defect that the development cost is high when the controller only supporting the first communication protocol such as the Profibus-DP protocol is compatible with other protocols, and has good practicability and strong universality. The controller can complete the compatibility of the first communication protocol and the second communication protocol without software upgrading, thereby saving the cost of software development, improving the expandability and the compatibility of the controller, and solving the defects of high development cost, poor expandability and poor compatibility when the controller only supports the first communication protocol such as the Profibus-DP protocol is compatible with other protocols.
In order to further improve the security of the whole communication device and ensure that the whole communication device can perform data communication safely and stably, based on the above embodiment, the present application may further provide a redundant portion, which may include the following:
the communication device of this embodiment includes a working machine and a standby machine, the controller 31 is disposed in the working machine, the working machine is used for controlling the communication process of the whole communication device through the controller in a normal working state, and the standby machine is used for replacing the working machine to realize normal communication of the whole communication device when the working machine is abnormal. A standby controller and a standby first protocol master station are also deployed in the standby machine; the standby controller performs the same function as the controller 31 and the standby first protocol master performs the same function as the first protocol master 33 described above. The standby controller is respectively connected with the first protocol slave stations and the protocol conversion gateway through the first communication protocol, so that the standby machine is compatible with the first communication protocol and the second communication protocol.
In order to ensure normal use of the communication device, the protocol conversion gateway 32 may be further configured to perform initialization processing on the second protocol master station and each second protocol slave station according to the received configuration data, so that the second protocol master station and each second protocol slave station enter a communication state after the initialization is successful; the configuration data comprises configuration data and configuration data of the second protocol master station and each second protocol slave station. The second protocol master station configuration information may include master station configuration information such as master station NODE-ID, baud rate, and synchronous COB-ID, the number of slave stations, NODE guard information, each second protocol slave station NODE-ID, urgent message COB-ID, SDO, and PDO configuration, for example.
The foregoing embodiment does not limit the structure of the protocol conversion gateway 32 at all, and this embodiment also provides an optional implementation manner of the protocol conversion gateway 32, which may include:
protocol translation gateway 32 may include a first protocol slave component and a second protocol master component; the first protocol slave station component is used for correspondingly processing the received data based on the first communication protocol and sending the processed data to the second protocol master station component or the controller; and the second protocol master station component is used for correspondingly processing the received data based on the second communication protocol and sending the processed data to each second protocol slave station or the first protocol slave station component.
Based on the structure of the protocol conversion gateway 32, the data communication flow inside the protocol conversion gateway 32 may be: the process of the first protocol master station sending data to each second protocol slave station is as follows: the first protocol slave station component is used for receiving the controller original data sent by the first protocol master station, analyzing the controller original data based on the first communication protocol to obtain controller transmission data, and sending the controller transmission data to the second protocol master station component; and the second protocol master station component is used for encapsulating the controller transmission data based on a second communication protocol to obtain controller target data and sending the controller target data to each second protocol slave station. The flow of the data feedback from each second protocol slave station to the first protocol master station is as follows: the second protocol master station assembly is used for receiving the original slave station data sent by the second protocol slave stations, analyzing the original slave station data based on a second communication protocol to obtain slave station transmission data and sending the slave station transmission data to the first protocol slave station assembly; the first protocol slave station assembly is used for packaging the slave station transmission data based on a first communication protocol to obtain slave station target data and sending the slave station target data to the first protocol master station.
In order to make the technical solutions of the present application more clearly apparent to those skilled in the art, the present application also takes the first communication protocol as Profibus-DP protocol, and the second communication protocol as CANopen protocol as an example, and with reference to fig. 4 and 5, the whole technical solutions are described, which may include the following contents:
in this embodiment, the first protocol master station is a Profibus-DP protocol master station, the Profibus-DP protocol master station is disposed in a controller of the working machine, each first protocol slave station is a Profibus-DP protocol slave station, and each first protocol slave station is connected to the controller through a Profibus-DP protocol. Each second protocol slave station is CANopen slave station, and second protocol main website subassembly is CANopen main website subassembly, and the protocol conversion gateway includes CANopen main website subassembly and Profibus-DP protocol slave station subassembly. One end of the protocol conversion gateway is connected with a DP master station on the DP slave interface connection controller, and the other end of the protocol conversion gateway is connected with a CAN open slave station through a CAN interface. One end of the protocol conversion gateway is connected with the controller through a Profibus-DP protocol, and the other end of the protocol conversion gateway is connected with each second protocol slave station through a CANopen protocol; the first protocol master station and the protocol conversion gateway communicate by using Profibus, each second protocol slave station and the protocol conversion gateway communicate by using a CANopen protocol to complete the conversion between the Profibus DP protocol and the CANopen protocol, in a parameter setting stage, configuration data received by the protocol conversion gateway comprise CANopen master-slave station configuration and configuration related data, the protocol conversion gateway completes the initialization of the CANopen master station and each CANopen slave station according to the parameters, and the master-slave station enters a communication state after the initialization is successful. After the CANopen master-slave station enters a communication state, a ProfibusDP slave station assembly in the protocol conversion gateway receives data sent by a ProfibusDP master station in the controller, the data are analyzed according to a ProfibusDP protocol and then sent to the CANopen master station assembly, the CANopen master station packages the data according to a CANopen protocol and sends the data to a CANopen slave station, conversion from the ProfibusDP protocol to the CANopen protocol is completed, and therefore the CANopen slave station is controlled; similarly, after receiving the data of the CANopen slave station, the CANopen master station component analyzes the data according to a CANopen protocol and then transmits the data to the Profibus DP slave station component; and the Profibus DP slave station component encapsulates the data according to a Profibus DP protocol and then sends the encapsulated data to a Profibus DP master station, so that the controller acquires the data of the CANopen slave station. The data flow diagram of the conversion process between profibus dp protocol and CANOpen protocol is shown in fig. 5.
As can be seen from the above, in this embodiment, the protocol conversion gateway completes the conversion between the profibus dp protocol and the CANOpen protocol, so as to implement compatibility of different protocols, and avoid the disadvantages of high development cost and poor expandability when the controller supporting only the profibus dp protocol is compatible with the CANOpen protocol. The main control can complete the compatibility of the Profibus DP protocol and the CANOpen protocol without hardware support and upgrade, and the hardware and software development cost is saved.
Based on the foregoing embodiment, please refer to fig. 6, where fig. 6 is a schematic flowchart of a data transmission method provided in an embodiment of the present invention, and is applied to a communication device according to any of the foregoing embodiments, where the embodiment of the present invention may include the following:
s601: and sending the data to be sent, which is sent by the first protocol master station to the second protocol slave station, to the protocol conversion gateway so that the protocol conversion gateway analyzes the data to be sent based on the communication protocol corresponding to the first protocol master station, encapsulates the analyzed data to be sent according to the communication protocol corresponding to the second protocol slave station, and sends the encapsulated data to the second protocol slave station.
S602: receiving data to be written sent by a protocol conversion gateway, wherein the data to be written is sent to a first protocol master station by a second protocol slave station; and the protocol conversion gateway analyzes the data to be written based on the communication protocol corresponding to the second protocol slave station, and encapsulates the analyzed data to be written according to the communication protocol corresponding to the first protocol master station.
Therefore, the embodiment of the invention realizes compatibility among different protocols, and overcomes the defects of high development cost and poor expandability when a controller only supporting the Profibus-DP protocol is compatible with other protocols.
It should be noted that, in the present application, there is no strict sequential execution order among the steps, and as long as the logical order is met, the steps may be executed simultaneously or according to a certain preset order, and fig. 6 is only an exemplary manner, and does not represent that only the execution order is the order.
The embodiment of the invention also provides a corresponding device for the data transmission method, and the device is applied to the communication equipment in any embodiment, so that the method has higher practicability. Wherein the means can be described separately from the functional module point of view and the hardware point of view. In the following, the data transmission apparatus provided by the embodiment of the present invention is introduced, and the data transmission apparatus described below and the communication device described above may be referred to correspondingly.
Based on the angle of the functional module, the apparatus may include:
the data transmission module is used for transmitting data to be transmitted, which are transmitted from the first protocol master station to the second protocol slave station, to the protocol conversion gateway so that the protocol conversion gateway analyzes the data to be transmitted based on the communication protocol corresponding to the first protocol master station, encapsulates the analyzed data to be transmitted according to the communication protocol corresponding to the second protocol slave station, and transmits the encapsulated data to the second protocol slave station;
the data receiving module is used for receiving data to be written sent by the protocol conversion gateway, and the data to be written is sent to the first protocol master station from the second protocol slave station; and the protocol conversion gateway analyzes the data to be written based on the communication protocol corresponding to the second protocol slave station, and encapsulates the analyzed data to be written according to the communication protocol corresponding to the first protocol master station.
The data transmission device mentioned above is described from the perspective of a functional module, and further, the present application also provides an electronic device described from the perspective of hardware. Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 7, the electronic device includes a memory 70 for storing a computer program; the processor 71 is configured to implement the steps of the communication device, the data transmission method and the electronic device method according to any of the above embodiments when executing the computer program.
The processor 71 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the processor 71 may also be a controller, a microcontroller, a microprocessor or other data processing chip, and the like. The processor 71 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 71 may also include a main processor and a coprocessor, the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 71 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content that the display screen needs to display. In some embodiments, the processor 71 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
The memory 70 may include one or more computer-readable storage media, which may be non-transitory. Memory 70 may also include high speed random access memory as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. The memory 70 may in some embodiments be an internal storage unit of the electronic device, for example a hard disk of a server. The memory 70 may also be an external storage device of the electronic device in other embodiments, such as a plug-in hard disk provided on a server, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 70 may also include both an internal storage unit and an external storage device of the electronic device. The memory 70 may be used for storing various data and application software installed in the electronic device, such as: the code of the program that executes the vulnerability handling method, etc. may also be used to temporarily store data that has been output or is to be output. In this embodiment, the memory 70 is at least used for storing the following computer program 701, wherein after being loaded and executed by the processor 71, the computer program can implement the relevant steps of the communication device, the data transmission method and the electronic device method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 70 may also include an operating system 702, data 703, and the like, and the storage manner may be a transient storage or a permanent storage. Operating system 702 may include Windows, Unix, Linux, etc. The data 703 may include, but is not limited to, data corresponding to a communication device, a data transmission method, an electronic device, and the like.
In some embodiments, the electronic device may further include a display 72, an input/output interface 73, a communication interface 74, alternatively referred to as a network interface, a power supply 75, and a communication bus 76. The display 72 and the input/output interface 73, such as a Keyboard (Keyboard), belong to a user interface, and the optional user interface may also include a standard wired interface, a wireless interface, and the like. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, as appropriate, is used for displaying information processed in the electronic device and for displaying a visualized user interface. The communication interface 74 may optionally include a wired interface and/or a wireless interface, such as a WI-FI interface, a bluetooth interface, etc., typically used to establish a communication connection between an electronic device and other electronic devices. The communication bus 76 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus.
Those skilled in the art will appreciate that the configuration shown in fig. 7 is not intended to be limiting of the electronic device and may include more or fewer components than those shown, such as a sensor 77 that performs various functions.
The functions of the functional modules of the electronic device according to the embodiments of the present invention may be specifically implemented according to the method in the above method embodiments, and the specific implementation process may refer to the description related to the above method embodiments, which is not described herein again.
Therefore, the embodiment of the invention realizes compatibility among different protocols, and overcomes the defects of high development cost and poor expandability when a controller only supporting the Profibus-DP protocol is compatible with other protocols.
It is to be understood that, if the data transmission method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it may be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the present application may be substantially or partially implemented in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods of the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), an electrically erasable programmable ROM, a register, a hard disk, a multimedia card, a card type Memory (e.g., SD or DX Memory, etc.), a magnetic Memory, a removable magnetic disk, a CD-ROM, a magnetic or optical disk, and other various media capable of storing program codes.
Based on this, the embodiment of the present invention further provides a readable storage medium, which stores a computer program, and the computer program is executed by a processor, and the steps of the data transmission method according to any one of the above embodiments are provided.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. For hardware including devices and electronic equipment disclosed by the embodiment, the description is relatively simple because the hardware includes the devices and the electronic equipment correspond to the method disclosed by the embodiment, and the relevant points can be obtained by referring to the description of the method.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The communication device, the data transmission method and the electronic device provided by the present application are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present application.

Claims (10)

1. A communication device comprising a controller, a protocol conversion gateway, a first protocol master station, a plurality of first protocol slave stations and a plurality of second protocol slave stations;
the first protocol master station is deployed in the controller, and each first protocol slave station is connected with the controller through a first communication protocol;
one end of the protocol conversion gateway is connected with the controller through the first communication protocol, and the other end of the protocol conversion gateway is connected with each second protocol slave station through a second communication protocol; the protocol conversion gateway is used for completing protocol conversion between a first communication protocol and a second communication protocol so that the controller is compatible with the first communication protocol and the second communication protocol at the same time;
the first protocol master station and the protocol conversion gateway communicate by using the communication standard of the first communication protocol, and the second protocol slave stations and the protocol conversion gateway communicate by using the second communication protocol.
2. The communication device of claim 1, wherein the controller is disposed in a working machine, the communication device further comprising a standby machine;
the standby machine is provided with a standby controller and a standby first protocol master station;
and the standby controller is respectively connected with each first protocol slave station and the protocol conversion gateway through the first communication protocol.
3. The communication device of claim 1, wherein the protocol conversion gateway is further configured to perform initialization processing on the second protocol master station and each second protocol slave station according to the received configuration data, so that the second protocol master station and each second protocol slave station enter a communication state after the initialization is successful;
the configuration data includes configuration data and configuration data of the second protocol master station and each second protocol slave station.
4. The communication device of any of claims 1 to 3, wherein the protocol conversion gateway comprises a first protocol slave component and a second protocol master component;
the first protocol slave station component is used for correspondingly processing the received data based on the first communication protocol and sending the processed data to the second protocol master station component or the controller;
and the second protocol master station assembly is used for correspondingly processing the received data based on the second communication protocol and sending the processed data to each second protocol slave station or the first protocol slave station assembly.
5. The communication device according to claim 4, wherein the first protocol slave component is configured to receive controller raw data sent by the first protocol master station, parse the controller raw data based on the first communication protocol to obtain controller transmission data, and send the controller transmission data to the second protocol master component;
and the second protocol master station component is used for packaging the controller transmission data based on the second communication protocol to obtain controller target data and sending the controller target data to each second protocol slave station.
6. The communication device of claim 4, wherein the second protocol master station component is configured to receive slave station raw data sent by each second protocol slave station, parse the slave station raw data based on the second communication protocol to obtain slave station transmission data, and send the slave station transmission data to the first protocol slave station component;
the first protocol slave station assembly is used for packaging the slave station transmission data based on the first communication protocol to obtain slave station target data and sending the slave station target data to the first protocol master station.
7. The communication device of claim 4, wherein the first protocol master station is a Profibus-DP protocol master station; each first protocol slave station is a Profibus-DP protocol slave station; correspondingly, each first protocol slave station is connected with the controller through a Profibus-DP protocol.
8. The communication device of claim 7, wherein each second protocol slave station is a CANopen slave station, and the second protocol master station component is a CANopen master station component;
correspondingly, one end of the protocol conversion gateway is connected with the controller through the Profibus-DP protocol, and the other end of the protocol conversion gateway is connected with each second protocol slave station through the CANopen protocol; the first protocol master station and the protocol conversion gateway communicate by using Profibus, and each second protocol slave station and the protocol conversion gateway communicate by using the CANopen protocol.
9. A data transmission method applied to the communication device according to any one of claims 1 to 8, comprising:
sending data to be sent, which are sent by a first protocol master station to a second protocol slave station, to a protocol conversion gateway so that the protocol conversion gateway analyzes the data to be sent based on a communication protocol corresponding to the first protocol master station, encapsulates the analyzed data to be sent according to a communication protocol corresponding to the second protocol slave station, and sends the encapsulated data to the second protocol slave station;
receiving data to be written sent by the protocol conversion gateway, wherein the data to be written is sent to the first protocol master station by the second protocol slave station; and the protocol conversion gateway analyzes the data to be written based on the communication protocol corresponding to the second protocol slave station, and encapsulates the analyzed data to be written according to the communication protocol corresponding to the first protocol master station.
10. An electronic device comprising a processor and a memory, the processor being configured to carry out the steps of the data transmission method according to claim 9 when executing a computer program stored in the memory.
CN202111394319.3A 2021-11-23 2021-11-23 Communication device, data transmission method and electronic device Active CN114095303B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111394319.3A CN114095303B (en) 2021-11-23 2021-11-23 Communication device, data transmission method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111394319.3A CN114095303B (en) 2021-11-23 2021-11-23 Communication device, data transmission method and electronic device

Publications (2)

Publication Number Publication Date
CN114095303A true CN114095303A (en) 2022-02-25
CN114095303B CN114095303B (en) 2023-08-22

Family

ID=80303425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111394319.3A Active CN114095303B (en) 2021-11-23 2021-11-23 Communication device, data transmission method and electronic device

Country Status (1)

Country Link
CN (1) CN114095303B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115373354A (en) * 2022-08-17 2022-11-22 深圳市汇川技术股份有限公司 Device control method, device, terminal device and storage medium

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040210664A1 (en) * 2003-04-17 2004-10-21 Schneider Automation Inc. System and method for transmitting data
CN101753486A (en) * 2008-12-19 2010-06-23 中国科学院沈阳自动化研究所 Industrial automation field bus gateway equipment
CN101964737A (en) * 2010-11-08 2011-02-02 国电南瑞科技股份有限公司 Protocol conversion device based on PROFIBUS-DP master station field bus
CN105491059A (en) * 2015-12-29 2016-04-13 国网浙江省电力公司湖州供电公司 Low-voltage electric power acquisition terminal and electric power data communication method
CN108881001A (en) * 2017-05-16 2018-11-23 比亚迪股份有限公司 The gateway and method of data conversion are carried out based on CANopen agreement and Ethernet protocol
CN110430110A (en) * 2019-08-12 2019-11-08 北京和利时系统工程有限公司 A kind of field bus gateway and its method for converting protocol
CN110535759A (en) * 2019-09-20 2019-12-03 杭州和利时自动化有限公司 A kind of communication gate, correlation technique and relevant apparatus
CN111510363A (en) * 2020-05-23 2020-08-07 东莞市艾莫迅自动化科技有限公司 Slave station conversion device based on MODBUS protocol and control method thereof

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040210664A1 (en) * 2003-04-17 2004-10-21 Schneider Automation Inc. System and method for transmitting data
CN101753486A (en) * 2008-12-19 2010-06-23 中国科学院沈阳自动化研究所 Industrial automation field bus gateway equipment
CN101964737A (en) * 2010-11-08 2011-02-02 国电南瑞科技股份有限公司 Protocol conversion device based on PROFIBUS-DP master station field bus
CN105491059A (en) * 2015-12-29 2016-04-13 国网浙江省电力公司湖州供电公司 Low-voltage electric power acquisition terminal and electric power data communication method
CN108881001A (en) * 2017-05-16 2018-11-23 比亚迪股份有限公司 The gateway and method of data conversion are carried out based on CANopen agreement and Ethernet protocol
CN110430110A (en) * 2019-08-12 2019-11-08 北京和利时系统工程有限公司 A kind of field bus gateway and its method for converting protocol
CN110535759A (en) * 2019-09-20 2019-12-03 杭州和利时自动化有限公司 A kind of communication gate, correlation technique and relevant apparatus
CN111510363A (en) * 2020-05-23 2020-08-07 东莞市艾莫迅自动化科技有限公司 Slave station conversion device based on MODBUS protocol and control method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115373354A (en) * 2022-08-17 2022-11-22 深圳市汇川技术股份有限公司 Device control method, device, terminal device and storage medium

Also Published As

Publication number Publication date
CN114095303B (en) 2023-08-22

Similar Documents

Publication Publication Date Title
EP2237120B1 (en) Universal network adapter for industrial control networks
US10901392B2 (en) Method and system for monitoring a plant of process automation
US9124445B2 (en) Apparatus for integrating device objects into a superordinated control unit
US11435729B2 (en) Method for operating a field device
US10534357B2 (en) Data exchange between a machine and an external control module in the beverage industry
EP2495624A2 (en) System and method for porting of device software
EP3002649B1 (en) Industrial simulation using redirected i/o module configurations
CN102902243A (en) System and method for servicing field devices in an automation plant
US9898925B2 (en) Method for operating a field device
CN107132808B (en) Programmable controller, control method thereof, and recording medium
CN109565526B (en) Method and gateway for connecting a data source system to an IT system
US20130131833A1 (en) Method, computer program, computer-readable medium and processing unit for controlling field devices
US20160170405A1 (en) Systems and methods for memory map utilization
CN105785905A (en) Configurable field bus system and configuration method thereof
CN101923320B (en) For storing the system and method for the data from industrial control unit (ICU)
CN113454551A (en) Automated code generator for interoperability between industrial ecosystems
CN114095303B (en) Communication device, data transmission method and electronic device
CN114064091A (en) OTA (over the air) upgrade control method and device, electronic equipment and automatic driving vehicle
US11481516B2 (en) Method for preventing impermissible access to software applications in field devices
CN103314554A (en) Dynamic host profiles for option modules
CN104007944A (en) Debugging printing method and system
CN205594417U (en) Field bus system that can dispose
US20130295977A1 (en) Automatic configuration of a system comprising movable rf devices
CN102193536A (en) Marco functional block for packaging device-level embedded logic
CN114338358B (en) Data interaction method, device, storage medium and PLC

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