[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

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

Communication device, data transmission method and electronic device Download PDF

Info

Publication number
CN114095303B
CN114095303B CN202111394319.3A CN202111394319A CN114095303B CN 114095303 B CN114095303 B CN 114095303B CN 202111394319 A CN202111394319 A CN 202111394319A CN 114095303 B CN114095303 B CN 114095303B
Authority
CN
China
Prior art keywords
protocol
station
communication
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.)
Active
Application number
CN202111394319.3A
Other languages
Chinese (zh)
Other versions
CN114095303A (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

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 a communication device, a data transmission method and an electronic device. The communication device 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 master 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 a communication standard to which a first communication protocol belongs, and each second protocol slave station and the protocol conversion gateway communicate by using a second communication protocol, so that the compatibility of the communication equipment to different protocols is realized.

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 communications device, a data transmission method, and an electronic device.
Background
Profibus (Process Field Bus ) is a Fieldbus standard used in automation technology. Among them, DP in Profibus-DP (Decentralized Peripherals, distributed peripheral) is a computer electronic component with high speed and low cost for communication of device-level control systems with distributed I/O. Which together with Profibus-PA (Process Automation), profibus-FMS (Fieldbus Message Specification), constitute the Profibus standard. Profibus-DP is used in factory automation applications where a number of sensors and actuators may be controlled by a central controller, or where the status of each module may be known using standard or selected diagnostic functions. The Profibus-DP protocol specifies the manner in which user data is transferred between the stations of the bus.
The relationship between the existing controller and the Profibus-DP protocol master-slave station is shown in fig. 1, and if the controller needs to support other protocols, other protocol functions need to be added in the controller, and hardware support is needed. Taking CAN (Controller Area Network) open protocol as an example, the related art needs to add a master station supporting the CANopen protocol in a controller, and connect the CANopen master station and the CANopen slave station by using a CAN bus, and the connection mode is shown in fig. 2. From the above, for the controller only supporting the ProfibusDP protocol master station, if the support of other protocols such as the CANopen protocol is to be added, not only the hardware needs to be changed, but also the cost is high, the practicability is poor, and the universality is not strong; and the controller software needs to be modified, the version is updated, and the expandability and the compatibility are poor.
Disclosure of Invention
The application provides communication equipment, a data transmission method and electronic equipment, realizes compatibility among different protocols, and solves the defects of high development cost and poor expandability when a controller only supporting a Profibus-DP protocol is compatible with other protocols.
In order to solve the technical problems, the embodiment of the application provides the following technical scheme:
in one aspect, the embodiment of the application provides a communication device, which 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 the first communication protocol, and the other end of the protocol conversion gateway is connected with each second protocol slave station through the 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 a communication standard to which the first communication protocol belongs, and each second protocol slave station 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 deploys a standby controller and a standby first protocol master station;
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 comprises configuration data and configuration data of the second protocol master station and each second protocol slave station.
Optionally, the protocol conversion gateway comprises a first protocol secondary station component and a second protocol primary station component;
the first protocol slave station assembly is used for correspondingly processing the received data based on the first communication protocol and transmitting the data obtained by processing to the second protocol master station assembly or the controller;
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 secondary station component is configured to receive the original data of the controller sent by the first protocol primary station, parse the original data of the controller based on the first communication protocol to obtain transmission data of the controller, and send the transmission data of the controller to the second protocol primary station component;
the second protocol master station assembly 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 assembly is configured to receive the primary data of the slave stations sent by each second protocol slave station, parse the primary data of the slave stations based on the second communication protocol to obtain transmission data of the slave stations, and send the transmission data of the slave stations to the first protocol slave station assembly;
the first protocol secondary station component is used for packaging the secondary station transmission data based on the first communication protocol to obtain secondary station target data, and sending the secondary station target data to the first protocol primary 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 a 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 application provides a data transmission method, which is applied to any one of the communication devices described above, including:
the method comprises the steps of sending data to be sent from a first protocol master station to a second protocol slave station to a protocol conversion gateway, analyzing the data to be sent by the protocol conversion gateway based on a communication protocol corresponding to the first protocol master station, packaging the analyzed data to be sent according to the communication protocol corresponding to the second protocol slave station, and sending the data obtained by packaging 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; 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 embodiment of the application also provides electronic equipment, which comprises a processor, wherein the processor is used for realizing the steps of the data transmission method according to any one of the previous claims 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 is connected with the slave station supporting the second communication protocol, so that the conversion of 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, so that the cost of the whole communication equipment is effectively reduced, and the defect that the development cost of the controller only supporting the first communication protocol such as Profibus-DP protocol is high when the controller is compatible with other protocols is overcome, and the controller is good in practicability and strong in 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 supporting the first communication protocol such as Profibus-DP protocol is compatible with other protocols.
In addition, the embodiment of the application 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 application or the technical solutions of the related art, the drawings that are required to be used in the embodiments or the description of the related art 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 to those of ordinary skill in the art.
FIG. 1 is a schematic diagram of a master-slave station connection supporting a Profibus-DP protocol according to an embodiment of the present application;
fig. 2 is a schematic diagram of supporting a ProfibusDP protocol and a CANopen protocol in an exemplary application scenario according to the related art provided in the embodiment of the present application;
FIG. 3 is a block diagram of a communication device according to an embodiment of the present application;
fig. 4 is a block diagram of another embodiment of a communication device according to an embodiment of the present application;
fig. 5 is a schematic diagram of a protocol conversion flow provided in an embodiment of the present application;
fig. 6 is a schematic flow chart of a data transmission method according to an embodiment of the present application;
fig. 7 is a block diagram of an embodiment of an electronic device according to an embodiment of the present application.
Detailed Description
In order to better understand the aspects of the present application, the present application will be described in further detail with reference to the accompanying drawings and detailed description. 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.
The terms first, second, third, fourth and the like in the description and in the claims and in the above drawings are used for distinguishing between different objects and not necessarily for describing a particular sequential or chronological order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. 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 embodiments of the present application, various non-limiting embodiments of the present application are described in detail below.
Referring first to fig. 3, fig. 3 is a schematic structural diagram of a communication device according to an embodiment of the present application, where the embodiment of the present application may include 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 any way by the present application. The first communication protocol and the second communication protocol may be any communication protocol, and the controller 31 itself only supports the first communication protocol, and implements conversion of the first communication protocol and the second communication protocol through the protocol conversion gateway 32. The first protocol master station 33 is a calling first protocol slave station to establish communication, and a set of systems comprises a master station and a plurality of slave stations, wherein each first protocol slave station responds to the first protocol master station 33 after establishing communication, and each first protocol slave station 34 can only exchange data with the first protocol master station 33 when the master station rounds to the slave stations.
In the present embodiment, each of the first protocol slave stations 34 is connected to the controller 31 through a first communication protocol; one end of the protocol conversion gateway 32 is connected to the controller through a first communication protocol, and the other end is connected to each second protocol slave station through a second communication protocol. The protocol conversion gateway 32 is configured to perform 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 implement a previous conversion of a first communication protocol to a second communication protocol. The first protocol master station 33 and the protocol conversion gateway 32 communicate using a communication standard to which the first communication protocol belongs, and the second protocol slave stations 35 and the protocol conversion gateway 32 communicate using a second communication protocol.
In the technical scheme provided by the embodiment of the application, one end of the protocol conversion gateway is connected with the controller supporting the first communication protocol, and the other end is connected with the slave station supporting the second communication protocol, so that the conversion of 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, so that the cost of the whole communication equipment is effectively reduced, and the defect that the development cost of the controller only supporting the first communication protocol such as Profibus-DP protocol is high when the controller is compatible with other protocols is overcome, and the controller is good in practicability and strong in 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 supporting the first communication protocol such as 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 embodiment, the application can also provide a redundant part, which can comprise the following contents:
the communication device of the present embodiment includes a working machine in which the above-described controller 31 is disposed for controlling a communication process of the entire communication device through the controller in a normal operation state, and a standby machine for realizing normal communication of the entire communication device in place of the working machine when an abnormality occurs in the working machine. 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 each first protocol slave station and the protocol conversion gateway through the first communication protocol, so that the compatibility of the standby machine to the first communication protocol and the second communication protocol is realized.
In order to ensure the normal use of the communication device, the protocol conversion gateway 32 may be further configured to perform an initialization process 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 NODE-ID, baud rate, synchronous COB-ID, etc., slave station number, NODE daemon information, each second protocol slave station NODE-ID, urgent message COB-ID, SDO and PDO configuration.
The above embodiment does not limit the structure of the protocol conversion gateway 32, and this embodiment further provides an alternative implementation of the protocol conversion gateway 32, which may include:
protocol conversion gateway 32 may include a first protocol secondary station component and a second protocol primary station component; the first protocol slave station assembly is used for correspondingly processing the received data based on the first communication protocol and transmitting the processed data to the second protocol master station assembly or the controller; the second protocol master station assembly is used for correspondingly processing the received data based on the second communication protocol and transmitting the processed data to each second protocol slave station or the first protocol slave station assembly.
Based on the above structure of the protocol conversion gateway 32, the data communication flow inside the protocol conversion gateway 32 may be: the flow of the first protocol master station transmitting data to each second protocol slave station is as follows: the first protocol slave station assembly is used for receiving the original data of the controller sent by the first protocol master station, analyzing the original data of the controller based on the first communication protocol to obtain the transmission data of the controller, and sending the transmission data of the controller to the second protocol master station assembly; the second protocol master station assembly is used for packaging the controller transmission data based on the second communication protocol to obtain the controller target data, and sending the controller target data to each second protocol slave station. The flow of each second protocol slave station feeding back data to the first protocol master station is as follows: the second protocol master station assembly is used for receiving the original data of the slave stations sent by each second protocol slave station, analyzing the original data of the slave stations based on the second communication protocol to obtain transmission data of the slave stations, and sending the transmission data of the slave stations to the first protocol slave station assembly; the first protocol secondary station component is used for packaging secondary station transmission data based on a first communication protocol, obtaining secondary station target data and sending the secondary station target data to the first protocol primary station.
In order to make the technical solution of the present application more clear for those skilled in the art, the present application also uses the first communication protocol as Profibus-DP protocol, the second communication protocol as CANopen protocol as an example, and the whole technical solution is described with reference to fig. 4 and 5, which may include the following:
in this embodiment, the first protocol master station is a Profibus-DP protocol master station, where 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 the Profibus-DP protocol. Each second protocol slave station is a CANopen slave station, the second protocol master station component is a CANopen master station component, and the protocol conversion gateway comprises the CANopen master station component and a Profibus-DP protocol slave station component. One end of the protocol conversion gateway is connected with a DP master station on the controller through a DP slave interface, and the other end of the protocol conversion gateway is connected with a CANopen 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 CANopen protocol to finish ProfibusDP protocol and CANopen protocol conversion, configuration data received by the protocol conversion gateway contains CANopen master-slave station configuration and configuration related data in a parameter setting stage, and the protocol conversion gateway completes initialization of the CANopen master station and each CANopen slave station according to the parameter, 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 component in a protocol conversion gateway receives data sent by a ProfibusDP master station in a controller, analyzes the data according to a ProfibusDP protocol and then transmits the data to the CANopen master station component, and the CANopen master station packages the data according to the CANopen protocol and then transmits the data to the CANopen slave station to complete conversion from the ProfibusDP protocol to the CANopen protocol, so that control of the CANopen slave station is completed; the CANopen master station component receives data of the CANopen slave station, analyzes the data according to a CANopen protocol and transmits the analyzed data to the ProfibusDP slave station component; and the ProfibusDP slave station component packages the data according to the ProfibusDP protocol and then transmits the packaged data to the ProfibusDP master station, so that the controller acquires the data of the CANopen slave station. The data flow diagram of the ProfibusDP protocol and the CANOpen protocol conversion process is shown in fig. 5.
As can be seen from the above, the present embodiment completes the conversion between the ProfibusDP protocol and the CANOpen protocol through the protocol conversion gateway, so as to realize the compatibility of different protocols, and avoid the disadvantages of high development cost and poor expandability when the controller only supporting the ProfibusDP protocol is compatible with the CANOpen protocol. The master control can complete the compatibility of the ProfibusDP protocol and the CANOpen protocol without hardware support and upgrading, and the cost of hardware and software development is saved.
Based on the foregoing embodiments, please refer to fig. 6, fig. 6 is a flow chart of a data transmission method provided in an embodiment of the present application, which is applied to the communication device according to any one of the foregoing embodiments, the embodiment of the present application may include the following:
s601: and transmitting the data to be 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.
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; 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.
From the above, the embodiment of the application realizes the compatibility between different protocols, and solves the defects of high development cost and poor expandability when the controller only supporting Profibus-DP protocol is compatible with other protocols.
It should be noted that, in the present application, the steps are not strictly executed sequentially, so long as they conform to the logic sequence, the steps may be executed simultaneously, or may be executed according to a certain preset sequence, and fig. 6 is only a schematic manner, and is not meant to represent only such an execution sequence.
The embodiment of the application also provides a corresponding device for the data transmission method, and the device is applied to the communication equipment of any embodiment, so that the method is more practical. Wherein the device may be described separately from the functional module and the hardware. The following describes a data transmission device provided in an embodiment of the present application, and the data transmission device 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 the data to be transmitted, which is transmitted 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 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, wherein the data to be written is sent to the first protocol master station by the second protocol slave station; 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 viewpoint of functional modules, and further, the application also provides an electronic device, which is described from the viewpoint 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 comprises 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 as mentioned in any of the above embodiments when executing the computer program.
Processor 71 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and processor 71 may also be a controller, microcontroller, microprocessor, or other data processing chip, among others. The processor 71 may be implemented in at least one hardware form of DSP (Digital Signal Processing ), FPGA (Field-Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array ). The processor 71 may also include a main processor, which is a processor for processing data in an awake state, also called a CPU (Central Processing Unit ), and a coprocessor; 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, image processor) for taking care of rendering and drawing of content that the display screen is required to display. In some embodiments, the processor 71 may also include an AI (Artificial Intelligence ) processor for processing computing operations related to machine learning.
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. Memory 70 may be an internal storage unit of the electronic device, such as a hard disk of a server, in some embodiments. The memory 70 may also be an external storage device of the electronic device, such as a plug-in hard disk provided on a server, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), etc. in other embodiments. Further, the memory 70 may also include both internal storage units and external storage devices of the electronic device. The memory 70 may be used to store not only application software installed on the electronic device, but also various types of data, such as: code of a program that executes the vulnerability processing method, or the like, 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 a computer program 701, where the computer program, when loaded and executed by the processor 71, 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 further include an operating system 702, data 703, and the like, where the storage manner may be transient storage or permanent storage. The operating system 702 may include Windows, unix, linux, among other things. The data 703 may include, but is not limited to, communication devices, data transmission methods, data corresponding to the results of the electronic device, and the like.
In some embodiments, the electronic device may further include a display screen 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. Among other things, the display screen 72, an input output interface 73 such as a Keyboard (Keyboard) belong to a user interface, which may alternatively include a standard wired interface, a wireless interface, etc. 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, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual 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 standard (peripheral component interconnect, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 7, but not only one bus or one type of bus.
Those skilled in the art will appreciate that the configuration shown in fig. 7 is not limiting of the electronic device and may include more or fewer components than shown, for example, may also include sensors 77 to perform various functions.
The functions of each functional module of the electronic device according to the embodiment of the present application may be specifically implemented according to the method in the embodiment of the method, and the specific implementation process may refer to the related description of the embodiment of the method, which is not repeated herein.
From the above, the embodiment of the application realizes the compatibility between different protocols, and solves the defects of high development cost and poor expandability when the controller only supporting Profibus-DP protocol is compatible with other protocols.
It will be appreciated that the data transmission method of the above embodiments may be stored in a computer readable storage medium if implemented in the form of software functional units and sold or used as a stand alone product. Based on this understanding, the technical solution of the present application may be embodied essentially or in part or in whole or in part in the form of a software product stored in a storage medium for performing all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrically erasable programmable ROM, registers, a hard disk, a multimedia card, a card-type Memory (e.g., SD or DX Memory, etc.), a magnetic Memory, a removable disk, a CD-ROM, a magnetic disk, or an optical disk, etc., that can store program code.
Based on this, an embodiment of the present application further provides a readable storage medium storing a computer program, which when executed by a processor, performs the steps of the data transmission method according to any one of the embodiments above.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the hardware including the device and the electronic equipment disclosed in the embodiments, the description is relatively simple because the hardware includes the device and the electronic equipment corresponding to the method disclosed in the embodiments, and relevant places refer 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 elements and steps are described above generally in terms of functionality in order to clearly illustrate the 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 solution. 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 application.
The communication device, the data transmission method and the electronic device provided by the application are described in detail. The principles and embodiments of the present application have been described herein with reference to specific examples, the description of which is intended only to facilitate an understanding of the method of the present application and its core ideas. It should be noted that it will be apparent to those skilled in the art that various modifications and adaptations of the application can be made without departing from the principles of the application and these modifications and adaptations are intended to be within the scope of the application as defined in the following claims.

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 a Profibus-DP protocol master station; each first protocol slave station is a Profibus-DP protocol slave station; the controller only supports a ProfibusDP protocol master station;
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 the 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 a communication standard to which the first communication protocol belongs, and each second protocol slave station 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 work machine, the communication device further comprising a standby machine;
the standby machine deploys a standby controller and a standby first protocol master station;
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 according to claim 1, wherein the protocol conversion gateway is further configured to perform an initialization process 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.
4. A communication device according to any of claims 1 to 3, wherein the protocol conversion gateway comprises a first protocol secondary station component and a second protocol primary station component;
the first protocol slave station assembly is used for correspondingly processing the received data based on the first communication protocol and transmitting the data obtained by processing to the second protocol master station assembly or the controller;
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 of claim 4, wherein the first protocol slave station assembly 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 station assembly;
the second protocol master station assembly 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 assembly 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 protocol to obtain slave station transmission data, and send the slave station transmission data to the first protocol slave station assembly;
the first protocol secondary station component is used for packaging the secondary station transmission data based on the first communication protocol to obtain secondary station target data, and sending the secondary station target data to the first protocol primary station.
7. The communication device of claim 4, wherein each first protocol secondary station is coupled to the controller via a Profibus-DP protocol.
8. The communication device of claim 7, wherein each second protocol secondary station is a CANopen secondary station and the second protocol primary station component is a CANopen primary 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 a 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:
the method comprises the steps of sending data to be sent from a first protocol master station to a second protocol slave station to a protocol conversion gateway, analyzing the data to be sent by the protocol conversion gateway based on a communication protocol corresponding to the first protocol master station, packaging the analyzed data to be sent according to the communication protocol corresponding to the second protocol slave station, and sending the data obtained by packaging 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; 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 implement the steps of the data transmission method of 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 CN114095303A (en) 2022-02-25
CN114095303B true 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)

Families Citing this family (1)

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

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* 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

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN114095303A (en) 2022-02-25

Similar Documents

Publication Publication Date Title
US9667699B2 (en) Method for transmitting data via a CANopen bus
US10901392B2 (en) Method and system for monitoring a plant of process automation
CN105005471A (en) Method, device, server and system for modifying configuration parameters of BIOS
US20160170405A1 (en) Systems and methods for memory map utilization
CN104965700A (en) Method and system for implementing driving on SPI equipment under VxWorks operating system
JP6627571B2 (en) Programmable controller, programmable controller control method, and programmable controller control program
CN104678798A (en) Method for operating a field device
CN112416505A (en) Remote control system, method and computing equipment
CN114095303B (en) Communication device, data transmission method and electronic device
CN101923320B (en) For storing the system and method for the data from industrial control unit (ICU)
CN105785905A (en) Configurable field bus system and configuration method thereof
CN114285695B (en) Communication method, device, apparatus, system and storage medium
CN105487403A (en) Establishment of motion control system based on CAN and simulation modeling method
CN201514569U (en) Nonstandard-configuration PLC remote control system
CN111371799B (en) Method, device and equipment for controlling data receiving and transmitting of MCTP (Multi-channel media Port) controller
CN114064091A (en) OTA (over the air) upgrade control method and device, electronic equipment and automatic driving vehicle
CN105511442A (en) Man-machine interaction system and method, and fire fighting truck
CN103346943A (en) Method and system of data transmission
CN111459510A (en) Cross-network operating system installation method and device, electronic equipment and medium
CN117439838A (en) An adaptive fast networking method for edge computing gateway master-slave machines
US7443886B1 (en) Communication protocol system and method
CN104007944A (en) Debugging printing method and system
CN114938397A (en) Kaitai-based high-efficiency protocol unpacking and packing method, system and readable storage medium
CN103916427A (en) First mobile communication terminal and communication method thereof, and system for Internet of Things
JP6570462B2 (en) Communication protocol converter

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