PROFINET to CAN communication system

By introducing PN gateway and CAN bus ring network into the PROFINET system, the PROFINET protocol is converted into the CAN protocol, which solves the problem of many connection cables and long wiring distances between the PROFINET slave station and the on-site input and output equipment, and realizes cost reduction and communication reliability.

CN119814897APending Publication Date: 2025-04-11HUNAN CHANGTIAN AUTOMATION ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510006852.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

In the prior art, PROFINET has many cables and long wiring distances between the station and the on-site input and output equipment, resulting in high implementation costs.

Method used

The PROFINET to CAN communication system is adopted, and the PROFINET protocol is converted into the CAN protocol through the PN gateway, and the field node equipment is connected to the CAN bus ring network to realize communication.

Benefits of technology

On the basis of ensuring communication reliability, the implementation cost is reduced, the problems of many connection cables and long wiring distances are solved, and resource management and equipment configuration are simplified.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814897A_ABST
    Figure CN119814897A_ABST
Patent Text Reader

Abstract

The invention provides a PROFINET to CAN communication system. The PROFINET to CAN communication system comprises a main controller, a PN bus, a PN gateway installed in a control box, a plurality of node devices installed on site, and a CAN bus looped network. The PN gateway is connected with the main controller through a PN bus, the PN bus adopts a PROFINET communication protocol, and the PN gateway communicates with each node device through a CAN bus ring network. And the PN gateway and the node equipment are connected with the field input and output equipment through the CAN communication bus, so that the problems of more connecting cables and long wiring distance between the PN slave station and the field input and output equipment in the prior art are solved, and the implementation cost is reduced on the basis of ensuring the communication reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of industrial communication technology, and in particular, relates to a PROFINET to CAN communication system. Background Art

[0002] PROFINET is an Ethernet-based industrial communication protocol, referred to as PN, which can achieve high-speed, real-time and reliable data transmission to meet the needs of industrial automation for communication performance and real-time control. It supports a wide range of device connections and flexible network configurations, and is widely used in industrial automation systems, such as production line control, process automation, logistics systems and robot control. It is currently widely used in the field of industrial control and has the largest market share; the Controller Area Network (CAN) bus is a network widely used for communication between devices in the fields of automobiles, industrial automation, etc. It has the advantages of low implementation cost, long communication distance, high-speed data transmission, and strong anti-interference ability. It is very suitable for long-distance two-way communication of some node devices in the industrial field.

[0003] At present, PROFINET applications in the industrial field are divided into master and slave. A master can manage multiple slave devices. The master is usually a first-level PLC controller, and the slave is a second-level programmable automation controller (PAC) or distributed input / output (I / O) and gateway devices. The gateway device converts PN to other protocol communications (such as PN to Modbus). In actual applications, when a large number of IO devices or field instruments are connected, the Ethernet communication distance is often limited, and optical fiber networks or repeaters need to be used. There are also problems such as many cables and long distances for access devices. For example, the PN slave device of Siemens ET200SP uses Ethernet PN bus communication with the master. ET200SP is then connected to some field instruments that are far away through expansion IO modules, and a large number of long cables need to be laid. Summary of the invention

[0004] The main purpose of the embodiment of the present invention is to provide a PROFINET to CAN communication system, which solves the problem of multiple connection cables and long wiring distance between PN slave stations and field input and output devices in the prior art, and reduces implementation costs while ensuring communication reliability.

[0005] In the first aspect, a PROFINET to CAN communication system is provided, including: a main controller, a PN bus, a PN gateway installed in a control box, multiple node devices installed on site, and a CAN bus ring network; the PN gateway is connected to the main controller via the PN bus, the PN bus adopts the PROFINET communication protocol, and the PN gateway communicates with each node device via the CAN bus ring network.

[0006] In another possible implementation, the PN gateway includes a PN communication module, a CAN communication module, and an MCU connected to the PN communication module and the CAN communication module, the PN communication module is connected to the main controller for PROFINET communication, the MCU is used for data processing from PROFINET communication protocol to CAN communication protocol, and the CAN communication module is used for data management of each of the connected node devices.

[0007] In another possible implementation, the CAN communication module includes: a first CAN communication controller and a second CAN communication controller connected to the MCU; the first CAN communication controller and the second CAN communication controller are both connected to a CAN communication bus.

[0008] In another possible implementation, the CAN bus ring network includes a first CAN communication controller, a second CAN communication controller and two CAN communication buses. The two CAN communication buses are interconnected to form a ring network. The first CAN communication controller and the second CAN communication controller are connected through the communication bus ring network and are redundant to each other. Each node device is connected to the CAN bus ring network.

[0009] In another possible implementation, the CAN communication module also includes: a first terminal resistor and a second terminal resistor, the first terminal resistor is connected to one end of the two CAN communication buses through the first CAN communication controller, and the second terminal resistor is connected to the other end of the two CAN communication buses through the second CAN communication controller.

[0010] In another possible implementation, the access of the first terminal resistor and the second terminal resistor is selected through a jumper or a DIP switch.

[0011] In another possible implementation, the data transmitted between the PN communication module and the main controller includes at least a downlink node control data block, an uplink node reporting data block and an uplink node status data block, wherein the downlink node control data block is the control data sent to each of the node devices, the uplink node reporting data block is the data reported by the received node device, and the uplink node status data block is the data on the type and online status of each of the node devices that needs to be reported to the main controller.

[0012] In another possible implementation, the number and size of each data block is determined according to the fixed number and type of each node device.

[0013] In another possible implementation, the number and size of each data block is determined according to the maximum number of nodes N and the maximum number of bytes M transmitted by a single node device.

[0014] In another possible implementation, the CAN message transmitted between the PN communication module and the node device includes a top 29-bit ID and 8 bytes of data content, wherein the top 13 bits of the ID are used to indicate the node type, and the bottom 16 bits are used to distinguish the node address. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in describing the embodiments of the present application are briefly introduced below.

[0016] Figure 1 It is a structural diagram of the existing PN master-slave station system;

[0017] Figure 2 A structural block diagram of a PROFINET to CAN communication system provided by an embodiment of the present invention;

[0018] Figure 3 A schematic diagram of the specific structure of the PROFINET to CAN communication system provided by an embodiment of the present invention;

[0019] Figure 4 A schematic diagram of a processing flow of a PN gateway provided by an embodiment of the present invention;

[0020] Figure 5 A schematic diagram of a processing flow of an output node device provided by an embodiment of the present invention;

[0021] Figure 6 A schematic diagram of the processing flow of the input node device provided by the present invention;

[0022] Figure 7 This is an example diagram of the PROFINET to CAN communication system provided by the present invention being applied to a belt conveyor. DETAILED DESCRIPTION

[0023] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar modules or modules with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be interpreted as limiting the present invention.

[0024] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present application refers to the presence of the features, integers, steps, operations, modules and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, modules, components and / or groups thereof. It should be understood that when we refer to a module as being "connected" or "coupled" to another module, it may be directly connected or coupled to the other modules, or there may be intermediate modules. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any modules and all combinations of one or more associated listed items.

[0025] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation method of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0026] The technical solution of the present application and how to solve the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0027] The existing PN master-slave system is as follows Figure 1 As shown, the master station and the slave station communicate through the PN bus. The PLC or distributed IO and other devices as the slave station are installed in the control box, and then connected to various signals on site through hard wiring. Each digital, analog, pulse and other signals must be laid out with a separate physical wiring, which is prone to encountering situations with large quantities and long distances. This application fully utilizes the advantages of the two industrial buses PN and CAN, supports redundant system design in hardware to ensure reliability, and combines software processing methods to build a PROFINET to CAN communication system. The main problems solved are as follows:

[0028] (1) The PN slave products on the market are generally PLCs or distributed IO devices of large companies, which are expensive, and the various expansion modules are not cheap. The use of independent devices can reduce equipment costs;

[0029] (2) The gateway and nodes are connected to the field IO devices through the CAN communication bus, which solves the problem of multiple cables and long wiring distance between the slave station and the field IO devices, and reduces the implementation cost while ensuring communication reliability;

[0030] (3) The problem of troublesome access resource management is solved. As a PN slave device, the gateway can more conveniently manage CAN node devices (access resources). It can generate a device description file for the PN master station (such as PLC) at one time according to the maximum configuration. Various node devices can be added or removed at any time during use without repeated programming and configuration, which reduces the workload of debugging and maintenance.

[0031] like Figure 2-3 The figure shows a structural diagram of a PROFINET to CAN communication system provided by an embodiment of the present invention, and the PROFINET to CAN communication system includes: a main controller 11, a PN bus 12, a PN gateway 13 installed in a control box, a plurality of node devices 14 installed on site, and a CAN bus ring network 15; the PN gateway 13 is connected to the main controller 11 through the PN bus 12, the PN bus 12 adopts the PROFINET communication protocol, and the PN gateway 13 communicates with each node device 14 through the CAN bus ring network 15. The main controller 11 is a first-level PLC controller, and the PN gateway 13 communicates with the main controller 11 through PROFINET. As a PN slave station in PROFINET communication, it communicates with a plurality of node devices installed on site through the CAN communication bus. Each node device has its own node address and device type. For example, a DI node device with an address of 1 indicates that the node is used to collect DI signals accessing the site. The transmission rate of CAN communication can be configured according to the situation, and can reach up to 1Mbps. When the transmission rate is 1Mbps, the bus length is within 40 meters; when the transmission rate is 40kbps, the bus length can reach 1000 meters. To ensure stability, up to 100 node devices can be connected. This solves the problem of many cables and long wiring distances between the PN slave station and the on-site input and output devices in the prior art, and reduces the implementation cost while ensuring communication reliability.

[0032] In the embodiment of the present invention, the PN gateway is used as a PN bus communication slave station, and adopts a modular design concept. Figure 3 The PN gateway 13 includes a PN communication module 131, a CAN communication module 132, and an MCU 133 connected to the PN communication module 131 and the CAN communication module 132. The PN communication module 131 is connected to the main controller 11 for PROFINET communication, the MCU 133 is used for data processing of converting the PROFINET communication protocol to the CAN communication protocol, and the CAN communication module 132 is used for data management of each node device 14 connected.

[0033] PN communication function can use chips that have implemented PN protocol stack and application layer, such as AnybusAB6675 module of HMS, or can be developed by transplanting PN protocol software package based on high-performance processor platform. Based on TCP / IP protocol stack, PN communication implements RT / IRT real-time protocol, DCP device search protocol, ARP address resolution protocol, etc. In addition, it also supports Siemens standard MRP media redundancy protocol and S2 system redundancy protocol, etc., to further ensure the communication reliability of PN master and slave stations.

[0034] The CAN communication module includes: a first CAN communication controller CAN1 and a second CAN communication controller CAN2 connected to the MCU 133; the first CAN communication controller CAN1 and the second CAN communication controller CAN2 are both connected to the CAN communication bus (including CANH and CANL). The CAN communication module also includes: a first terminal resistor and a second terminal resistor, the first terminal resistor is connected to one end of the two CAN communication buses through the first CAN communication controller, and the second terminal resistor is connected to the other end of the two CAN communication buses through the second CAN communication controller. The access of the first terminal resistor and the second terminal resistor is selected by a jumper or a dip switch.

[0035] The CAN bus ring network 15 includes a first CAN communication controller, a second CAN communication controller and two CAN communication buses. The two CAN communication buses are interconnected to form a ring network. Each node device is connected to the CAN bus ring network (the CAN communication bus contains CANH and CANL signals). The two CAN controllers are connected through the communication bus ring network and are redundant to each other. Each node device is connected to the CAN bus ring network 15. The advantages of the CAN bus ring network 15 are: first, the two CAN communication controllers and the CAN communication buses use a parallel communication mechanism and are redundant to each other. When the hardware in a CAN communication bus fails or processes abnormally, the other CAN communication bus can also ensure normal communication, and no master-slave switching processing time is required; second, if the signal line somewhere in the CAN bus ring network is disconnected due to damage, it will not affect the normal operation of the system, further ensuring reliability. For example Figure 3 As shown, even if the CAN communication network between node device 2 and node device 3 is disconnected, all node devices 1~N can still communicate normally with the PN gateway 13. At this time, the PN gateway 13 can also compare and judge based on the data of the node device 14 received by the two CAN communication buses, and prompt that there is a disconnection abnormality.

[0036] The CAN communication function is implemented by the MCU chip, and the MCU 133 that supports two CAN communication controllers CAN1 and CAN2 is selected. The two CAN communication controllers CAN1 and CAN2 are processed in parallel by the MCU chip software, without the distinction between the host and the slave. Each CAN communication bus has a built-in terminal resistor connection on the circuit board. The access of the resistor can be selected through a jumper or a dip switch to adapt to different application requirements. Normally, when both ends of the CAN bus ring network 15 are configured with terminal resistors (such as 120Ω), they have the best impedance matching characteristics and achieve the best transmission quality, ensuring the stability and accuracy of the signal. Because the two CAN communication controllers of the PN gateway 13 are built-in terminal resistors, the connected node device 14 does not need to be configured with resistor access.

[0037] Each node device 14 connected to the CAN bus ring network 15 should contain a unique address. The address can be set and saved by dialing the hardware encoder or software. The type of node device 14 can refer to the IO module classification of the PLC, which is mainly divided into DI, DO, AI, AO, PI, PO and other node devices. Each type of node device 14 is used for corresponding type of field signal acquisition or control.

[0038] PN communication modular design and redundancy, CAN bus ring network 15 redundancy, CAN bus ring network disconnection alarm, etc. can ensure reliability.

[0039] In an embodiment of the present invention, the application layer communication protocol between the gateway and the PN master station is divided according to the uplink and downlink data. Referring to Table 1, the data transmitted between the PN communication module and the main controller at least includes a downlink node control data block, an uplink node reporting data block, and an uplink node status data block. The downlink node control data block is the control data sent to each node device, the uplink node reporting data block is the data reported by the received node device, and the uplink node status data block is the data of the type and online status of each node device to be reported to the main controller. In addition, other data can be expanded according to the application, such as the operating status data of the PN gateway itself (CAN communication failure, PN disconnection times, etc.).

[0040] Table 1 Data transmitted between PN communication module 131 and main controller 11

[0041]

[0042] There are two ways to apply the data block content in the PN communication protocol:

[0043] (1) The number and size of each data block are determined according to the number and type of each node device 14. When the number and type of each node device 14 connected to the gateway are fixed, the number and size of each data block are also clear. For example, the PN gateway 13 only connects to 5 AI node devices, and each AI node device collects 4 channels of field analog signals (2 bytes per analog signal), so the data blocks reported by the upstream node are distributed according to 1 to 5, and each node device reports and transmits 8 bytes (40 bytes in total).

[0044] (2) The number and size of each data block are determined according to the maximum number of nodes N and the maximum number of bytes M transmitted by a single node device 14. That is, the maximum number of nodes N and the maximum number of bytes M transmitted by a single node device are determined, the number of node devices actually connected to the gateway is random (≤N), and each type of node device is arbitrarily combined and dynamically identified. At this time, the transmission data block is allocated according to the maximum number N and the maximum number of bytes M. The PN master station dynamically identifies the type and online status of a node device at a certain address based on the content of the uplink node status data block, and then performs uplink and downlink operations.

[0045] In both methods, the PN gateway 13 needs to generate a General Station Description (GSD) file of the PN slave station for import and use by the PN master station. The difference is that: in method 1, the gateway needs to generate various device description files for each access quantity and type of node collocation; in method 2, the device description file only needs to be generated once according to the maximum configuration, and subsequent access nodes can be arbitrarily combined and dynamically identified, which is more convenient to use.

[0046] The CAN message transmitted between the PN communication module and the node device includes the highest 29-bit ID and 8-byte data content. The upper 13-bit part of the ID is used to indicate the node type, and the lower 16-bit part is used to distinguish the node address. The ID is an extended frame. The communication between the PN gateway 13 and the node device 14 can be based on a custom protocol or a CANopen protocol, including the node type, node address, and node data. Take the implementation of a custom protocol extended frame as an example: the CAN ID supports 29 bits, including the highest 29 bits of the ID (extended frame) and 8 bytes of data content. The ID can be divided into two parts. The upper 13-bit part is used to indicate the node type (for example, 0x10 indicates a DI node, and 0x20 indicates an AI node), and the lower 16-bit part is used to distinguish the node address (for example, 1 to 100). A CAN message can transmit a maximum of 8 bytes of valid data, which can all be used for node data. When the node device communication data exceeds 8 bytes, frame transmission processing is required.

[0047] Because each node will receive the message when it is transmitted on the CAN communication bus, receiving and processing all the messages will waste a lot of system resources. Therefore, when the PN gateway 13 communicates with the node device 14, filtering settings are performed separately, and it is determined whether it needs to be processed according to the message ID. If not, it will be directly abandoned.

[0048] The processing flow of the PN gateway 13 includes synchronizing uplink data with the main controller 11 and updating downlink data. Figure 4 As shown, including:

[0049] Step S1: PN bus real-time communication.

[0050] The PN communication module 131 in the PN gateway 13 is responsible for real-time communication with the PN master station, ie, the main controller 11, including uplink and downlink data block transmission.

[0051] Step S2: CAN communication bus receiving interruption.

[0052] The two CAN channels of the PN gateway 13 are opened simultaneously to determine whether there is a reception interruption, and process it if there is one.

[0053] Step S3: Two CAN channels receive and process in parallel.

[0054] The data received by the first CAN communication controller CAN1 and the second CAN communication controller CAN2 are processed in parallel, including the judgment of CAN message repeatability, that is, when messages with the same ID and content are received at the same time or in a very short time, only one message needs to be written to the receiving queue for further processing. In addition, the CAN bus ring network can be judged to be working normally based on whether the number of valid nodes received by the two CAN communication buses is consistent. If not, it is judged that the CAN bus ring network has a disconnection fault.

[0055] Step S4: Update online node status and data.

[0056] Get CAN messages from the receiving queue, parse the corresponding node device address and type from the CAN ID, update the node device type and online status array, and update the valid data in the message to the node data array. It has the function of dynamic node device judgment. When a node device exceeds the time threshold and does not report, the type, online status and node data of the address are cleared.

[0057] Step S5: Synchronize PN uplink data.

[0058] The maintained node device type, online status and node device data are synchronously updated to the PN uplink data block for transmission between the PN communication module 131 and the PN master station.

[0059] Step S6: Update PN downlink data.

[0060] The control data of the real-time communication between the PN master station and the PN gateway 13 is updated to the PN downlink data block.

[0061] Step S7: Determine the nodes that need to be controlled.

[0062] Poll all online node devices, compare the PN downlink data block with the current node device data, and if there is any inconsistency, send a CAN control message to the node device immediately.

[0063] Step S8: Write into the CAN control sending buffer.

[0064] For node devices that need to send CAN control messages, frames are formed according to the node device type and the downlink data block, and the framed CAN messages are written into the send queue buffer.

[0065] Step S9: Two CAN channels are sent in parallel.

[0066] The CAN message is obtained from the sending queue, and is synchronously sent and processed by the first CAN communication controller CAN1 and the second CAN communication controller CAN2.

[0067] The node device 14 includes output type node devices (such as DO, AO, PO) and input type node devices (such as DI, AI, PI). The processing flow of the node device 14 is divided into two types, see Figure 5 and Figure 6 . Figure 5 For the processing flow of the output node device, when the output node device receives the control command, it should immediately execute the control command and report the node data in reply. If there is no control command, the current node data shall be reported according to the reporting interval for the gateway to perform node maintenance. Figure 6 It is the processing flow of the input node device. When the data of the input node device changes or the interval period collection time is met, the latest node data is immediately reported through CAN communication.

[0068] Through the functional design and data processing methods of PN gateways and node devices, the communication distance can be extended while the cost can be reduced, thus achieving cost reduction and efficiency improvement; through the corresponding data communication methods, automatic identification and adaptive management of access node devices can be achieved; and the method in which the PN gateway generates a device description file according to the maximum configuration at one time for use by the PN master station (such as PLC) can achieve efficient management.

[0069] The following is an explanation using a belt conveyor as an example. A belt conveyor is an ideal equipment for high-speed, automated, and continuous operation of long-distance transportation of bulk materials. In order to ensure the normal operation of the conveyor, it is generally required to install a pull rope switch and a deviation switch at a certain distance on both sides of the conveyor. The two-way pull rope switch is a protective switch used for emergency shutdown of the belt conveyor. Pulling the wire rope at any point within the switch operating distance cuts off the operating circuit and shuts down the entire line, thereby protecting the belt conveyor and personal safety; the deviation switch is mainly used for conveyor belt deviation detection to prevent belt deviation from causing material overflow and other faults.

[0070] The conveying length of each belt conveyor usually ranges from several hundred meters to 1000 meters, while the CAN communication bus can reach more than 1000 meters when transmitting at a rate of 40kbps or below, which is very suitable for the application of conveyor field signal detection. The PN to CAN method can effectively reduce the implementation cost without adding a fiber optic communication network and a large number of hard-wired cables.

[0071] For specific structure, see Figure 7 Taking the example of arranging a deviation switch and a pull-rope switch every 50m on both sides of the belt conveyor, it is only necessary to install a DI type node device every 50m (at least 4 DI signals can be connected). The address of each DI node is accumulated from 1 to N according to the length of the belt (for example, when N is 20, the length of the belt conveyor has reached 20×50, which is 1000 meters). If other types of node devices are needed, they can be added or subtracted at any time.

[0072] The PN master station controls the PLC and communicates with the PN gateway in real time through Ethernet. The PN gateway connects to the node devices on site through the CAN communication bus (collecting switch signals). The CAN network can be connected in a ring network as needed. When a node device reports that the pull rope is valid or the deviation is valid, the PN gateway can immediately report it to the control PLC, and the PLC will issue a command to stop the belt conveyor.

[0073] In the PROFINET to CAN communication system of the embodiment of the present invention, the uplink communicates with the PN master station through Ethernet, and the downlink forms a ring network to connect multiple node devices for communication through two CAN ports. The node devices can support different types for arbitrary combination to achieve adaptive management; the method supports redundant design of uplink PN and downlink CAN communications to ensure system reliability, and the PN to CAN solution is only changed by the uplink communication module, and can be easily applied to other industrial real-time bus systems, such as EtherNet / IP to CAN, EtherCAT to CAN, etc.

[0074] In summary, the PROFINET to CAN communication system of the embodiment of the present invention includes: a main controller, a PN bus, a PN gateway installed in a control box, a plurality of node devices installed on site, and a CAN bus ring network; the PN gateway is connected to the main controller via the PN bus, the PN bus adopts the PROFINET communication protocol, and the PN gateway communicates with each node device via the CAN bus ring network. The PN gateway and the node device are connected to the field input and output devices via the CAN communication bus, which solves the problem of many cables and long wiring distances between the PN slave station and the field input and output devices in the prior art, and reduces the implementation cost on the basis of ensuring communication reliability.

[0075] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0076] The above is only a partial implementation of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A PROFINET to CAN communication system, characterized in that: The PROFINET to CAN system includes: a main controller, a PN bus, a PN gateway installed in a control box, multiple node devices installed on site, and a CAN bus ring network; the PN gateway is connected to the main controller via the PN bus, the PN bus adopts the PROFINET communication protocol, and the PN gateway communicates with each of the node devices via the CAN bus ring network.

2. The PROFINET to CAN communication system according to claim 1, characterized in that: The PN gateway includes a PN communication module, a CAN communication module, and an MCU connected to the PN communication module and the CAN communication module. The PN communication module is connected to the main controller for PROFINET communication. The MCU is used for data processing from PROFINET communication protocol to CAN communication protocol. The CAN communication module is used for data management of each of the connected node devices.

3. The PROFINET to CAN communication system according to claim 2, characterized in that: The CAN communication module includes: a first CAN communication controller and a second CAN communication controller connected to the MCU; the first CAN communication controller and the second CAN communication controller are both connected to a CAN communication bus.

4. The PROFINET to CAN communication system according to claim 3, characterized in that: The CAN bus ring network includes the first CAN communication controller, the second CAN communication controller and two CAN communication buses, the two CAN communication buses are interconnected to form a ring network, the first CAN communication controller and the second CAN communication controller are connected through the communication bus ring network and are redundant to each other, and each of the node devices is connected to the CAN bus ring network.

5. The PROFINET to CAN communication system according to claim 3, characterized in that: The CAN communication module also includes: a first terminal resistor and a second terminal resistor, the first terminal resistor is connected to one end of the two CAN communication buses through the first CAN communication controller, and the second terminal resistor is connected to the other end of the two CAN communication buses through the second CAN communication controller.

6. The PROFINET to CAN communication system according to claim 5, characterized in that: The access of the first terminal resistor and the second terminal resistor is selected by a jumper or a DIP switch.

7. The PROFINET to CAN communication system according to claim 3, characterized in that: The data transmitted between the PN communication module and the main controller includes at least a downlink node control data block, an uplink node reporting data block and an uplink node status data block. The downlink node control data block is the control data sent to each of the node devices, the uplink node reporting data block is the data reported by the received node device, and the uplink node status data block is the data on the type and online status of each of the node devices that needs to be reported to the main controller.

8. The PROFINET to CAN communication system according to claim 7, characterized in that: The number and size of each data block are determined according to the number and type of fixed node devices.

9. The PROFINET to CAN communication system according to claim 7, characterized in that: The number and size of each data block is determined by the maximum number of nodes N and the maximum number of bytes M transmitted by a single node device.

10. The PROFINET to CAN communication system according to claim 1, characterized in that: The CAN message transmitted between the PN communication module and the node device includes a top 29-bit ID and 8 bytes of data content, wherein the top 13 bits of the ID are used to indicate the node type, and the bottom 16 bits are used to distinguish the node address.