CN-122001697-A - Power supply addressing and data uploading method and device for EtherCAT/CANFD hybrid cascade system
Abstract
The invention provides a power supply addressing and data uploading method and device for an EtherCAT/CANFD hybrid cascade system, and belongs to the technical field of industrial communication and distributed data acquisition. The system is powered on to complete equipment identification and protocol matching in a low-voltage mode, high-voltage power supply is switched after verification is passed, safe power supply is achieved by means of a single-wire power supply and communication fusion link, gateway nodes automatically address and report the number of equipment to a down-hanging CANFD (computer defined network function) subnet device, core control nodes calculate address offset and issue the address offset, a unified address space of the whole network is built, the gateway nodes periodically collect data and package the data, the data are transmitted to the core control nodes through EtherCAT channels, and the core control nodes are forwarded to an upper computer after the data are de-duplicated based on package sequence numbers. The system supports topology self-adaptive adjustment, realizes automatic configuration, unified addressing and efficient and reliable transmission of the hybrid network, reduces deployment and maintenance cost, and improves safety and suitability.
Inventors
- ZHANG YAN
Assignees
- 深圳市拓普瑞电子有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260209
Claims (10)
- 1. The power supply addressing and data uploading method of the EtherCAT/CANFD hybrid cascade system is applied to the hybrid cascade system comprising a core control node, at least one gateway node and a plurality of CANFD subnetwork devices hung under each gateway node, and is characterized by comprising the following steps: The method comprises the steps of firstly, in the safe power supply establishment stage, initiating equipment identification and protocol matching by adopting a low-voltage mode in the system power-on, switching to a high-voltage power supply mode after matching verification, and providing safe power supply for each level of equipment by means of a single-wire power supply and communication fusion link, wherein the single-wire power supply and communication fusion link simultaneously realizes power supply transmission and data interaction; Step two, in the automatic addressing stage of the sub-network, each gateway node respectively executes automatic addressing operation on the CANFD sub-network equipment hung below the gateway node to acquire the equipment quantity of the corresponding sub-network; step three, in the unified addressing stage of the whole network, the core control node collects the number of the subnet equipment reported by each gateway node, calculates the address offset corresponding to each gateway node and transmits the address offset to the gateway node, and establishes the unified address space of the whole network covering all the CANFD subnet equipment; step four, in the data acquisition and packaging stage, the gateway node reads the acquired data of the equipment of the hung CANFD subnetwork through the CANFD communication interface, and performs aggregation treatment on the acquired data according to a preset period and packages the acquired data to form a data frame; And step five, in the data transmission deduplication stage, the gateway node transmits the packed data frames to the core control node through the EtherCAT period process data channel, the core control node performs deduplication processing on the received data frames, each batch of data is ensured to be transmitted to the upper computer only once, and the core control node establishes communication with the upper computer through a USB interface or an Ethernet interface and completes data forwarding.
- 2. The method according to claim 1, characterized in that said subnet automatic addressing phase comprises in particular the following sub-steps: the gateway node broadcasts an addressing instruction to all the CANFD subnet devices hung below the gateway node; after the CANFD subnet equipment receives the addressing instruction, the unique identification information of the CANFD subnet equipment is fed back to the gateway node; The gateway node collects the unique identification information of all CANFD subnet devices, and sorts the unique identification information according to a preset sorting rule; And distributing continuous local addresses to each CANFD subnet device according to the sequencing result, and simultaneously counting the number of devices for obtaining the subnet.
- 3. The method of claim 1, wherein the address offset is calculated by setting the address offset of the first gateway node to 0 and setting the address offset of any other gateway node equal to the sum of the numbers of subnet equipments corresponding to all gateway nodes before the gateway node.
- 4. The method of claim 1, wherein the predetermined period is a configurable period, the data frame includes a data identification field, a device identification field, a packet sequence number field, a data length field, and a data payload field, wherein the data identification field is used to distinguish between data frame types, the device identification field is used to identify a gateway node that sent the data frame, the packet sequence number field is used for data deduplication verification, the data length field is used to indicate an actual number of bytes of the data payload field, and the data payload field includes a timestamp, a number of lanes, lane data, and a check code.
- 5. The method according to claim 1, wherein the data transmission de-duplication stage is implemented by the core control node maintaining, for each gateway node, a packet sequence number record of the last forwarded data frame; after receiving the new data frame, the core control node extracts the equipment identification field and the packet sequence number field in the data frame; finding out a corresponding packet sequence number record according to the equipment identification field, and comparing the packet sequence number of the new data frame with the packet sequence number of the record; If the two are different, judging the data as new data, forwarding the data frame to an upper computer by a core control node, and updating a corresponding packet sequence number record; if the two are the same, the core control node judges that the data is repeated, and the core control node discards the data frame.
- 6. The method of claim 1, wherein the safe power supply establishment stage further comprises a power supply state monitoring mechanism for continuously monitoring the working state of the power supply link during the system operation, and immediately cutting off the high-voltage power supply and triggering an alarm when detecting overcurrent, short circuit or abnormal equipment connection, maintaining a low-voltage identification mode or closing a power supply channel.
- 7. The method of claim 1, further comprising a topology adaptive adjustment mechanism that automatically triggers re-execution of a subnet auto-addressing phase and a full-network unified addressing phase upon detection of CANFD subnet device insertion, removal, or communication link anomalies, updating the number of subnet devices and address offsets, and reconstructing the full-network unified address space.
- 8. The utility model provides an EtherCAT/CANFD hybrid cascade system power supply addressing and data uploading device which characterized in that includes: The EtherCAT interface module is used for establishing EtherCAT communication connection with the core control node to realize the receiving and sending of the data frame and the receiving of the address offset; the CANFD interface module is used for establishing CANFD communication connection with the hung CANFD subnet equipment to realize issuing of an addressing instruction, receiving of unique identification information and reading of acquired data; the processor is used for executing a safe power supply control logic, a subnet automatic addressing logic and a data aggregation packaging logic, and the processor is respectively connected with the EtherCAT interface module and the CANFD interface module in a signal manner; The memory is used for storing the unique identification information, the number of the subnet devices, the address offset, the preset period parameter, the data frame format rule and program instructions required by the execution of the processor, and the memory is in data interaction connection with the processor.
- 9. The apparatus as recited in claim 8, further comprising: the power management module is used for realizing the switching between a low-voltage mode and a high-voltage mode and providing a stable power supply for the device and the hung CANFD subnetwork equipment, and the power management module is in control connection with the processor; The safety power supply control module is used for executing equipment identification, protocol matching verification and power supply state monitoring, the safety power supply control module is respectively connected with the power management module and the processor in a signal mode, and the safety power supply control module is integrated in a signal processing path of a single-wire power supply and communication fusion link.
- 10. An EtherCAT/CANFD hybrid cascade system, comprising a core control node, at least one EtherCAT/CANFD hybrid cascade system power supply addressing and data uploading device as claimed in claim 8 or 9, and a CANFD subnet equipment set hung under each device; The core control node is used as a system core, establishes a master-slave communication relationship with each device through an EtherCAT communication link and is used for receiving the number of subnet equipment reported by each device, calculating address offset, issuing and receiving data frames transmitted by the device and executing deduplication forwarding; The system is configured to perform the EtherCAT/CANFD hybrid cascading system power addressing and data upload method of any one of claims 1 to 7.
Description
Power supply addressing and data uploading method and device for EtherCAT/CANFD hybrid cascade system Technical Field The invention relates to the technical field of industrial communication and distributed data acquisition, in particular to a power supply addressing and data uploading method and device of an EtherCAT/CANFD hybrid cascade system. Background In the field of industrial automation, an industrial control system usually adopts a layered network architecture, the upper layer realizes high-speed real-time control communication through an industrial Ethernet such as EtherCAT network, and the lower layer is connected with a distributed acquisition module by means of a field bus such as a CANFD subnet to hang the acquisition module or an executing mechanism as follows. Although the architecture can exert the advantages of different network technologies, the architecture faces a plurality of problems in practical application. The EtherCAT network and the CANFD subnetwork adopt independent address allocation mechanisms, so that a system address system is split, unified addressing and configuration of the whole network equipment are difficult to realize, and complexity of system integration and maintenance is increased. In the cascade topology, when the number of devices changes, the traditional scheme needs to manually dial the code or reconfigure software parameters, so that the maintenance cost is high and errors are easy to occur. In the periodic process data transmission, the lack of effective aggregation, deduplication and forwarding mechanisms easily causes repeated uploading of data or low bandwidth utilization rate, and affects the real-time performance of the system. In the single-wire power supply and communication fusion scenario, lack of an effective safety recognition mechanism, misinsertion of incompatible devices may lead to electrical damage risk, and the safety protection requirement of the single-wire power supply and communication fusion link is not fully satisfied. In the prior art, part of schemes only focus on single problem solution, and a comprehensive scheme which takes uniform addressing, automatic configuration, high-efficiency data transmission and safe power supply into consideration cannot be formed, so that the actual requirements of scenes such as industrial automation, intelligent manufacturing and the like cannot be met. Therefore, an EtherCAT/CANFD hybrid cascade system power supply addressing and data uploading method and device are provided. Disclosure of Invention The invention aims to solve the problems in the background technology, and provides a method and a device for addressing power supply and uploading data of an EtherCAT/CANFD hybrid cascade system. The specific technical scheme is as follows: The power supply addressing and data uploading method of the EtherCAT/CANFD hybrid cascade system is applied to the hybrid cascade system comprising a core control node, at least one gateway node and a plurality of CANFD subnetwork devices hung under each gateway node, and comprises the following steps: The method comprises the steps that in the safe power supply establishment stage, a low-voltage mode is adopted to initiate equipment identification and protocol matching in system power-on, the system is switched to a high-voltage power supply mode after matching verification, safe power supply is provided for each level of equipment by means of a single-wire power supply and communication fusion link, power supply transmission and data interaction are simultaneously realized by the single-wire power supply and communication fusion link, a core control node establishes power supply control and data communication connection with each gateway node through the link, and a gateway node establishes power supply and communication connection with a hung CANFD sub-network device through the link; step two, in the automatic addressing stage of the sub-network, each gateway node initiates addressing interaction to the hung CANFD sub-network equipment through the CANFD communication link, and respectively executes automatic addressing operation to acquire the equipment number of the corresponding sub-network; Step three, in the unified addressing stage of the whole network, the core control node collects the number of subnet equipment reported by each gateway node through an EtherCAT period communication link, calculates the address offset corresponding to each gateway node based on the number and transmits the address offset to the gateway node through an EtherCAT data channel, and each gateway node receives the address offset and then associates the address offset with the local address of the own downlink equipment to establish the unified address space of the whole network for covering all CANFD subnet equipment; In the data acquisition and packaging stage, the gateway node reads acquisition data of the equipment of the hung CANFD subnetwork in real time through a CANFD comm