CN118311907A - Device IO communication method, system, device, storage medium and product - Google Patents
Device IO communication method, system, device, storage medium and product Download PDFInfo
- Publication number
- CN118311907A CN118311907A CN202410727025.5A CN202410727025A CN118311907A CN 118311907 A CN118311907 A CN 118311907A CN 202410727025 A CN202410727025 A CN 202410727025A CN 118311907 A CN118311907 A CN 118311907A
- Authority
- CN
- China
- Prior art keywords
- slave station
- ethercat
- station
- periodic process
- process data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/042—Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
- G05B19/0423—Input/output
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/547—Remote procedure calls [RPC]; Web services
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/20—Pc systems
- G05B2219/25—Pc structure of the system
- G05B2219/25257—Microcontroller
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Communication Control (AREA)
Abstract
The application discloses a device IO communication method, a system, a device, a storage medium and a product, wherein the device IO communication method comprises the following steps: after receiving the periodic process data sent by the Ethercat master station, the Ethercat slave station analyzes the periodic process data and stores the analysis result into a shared memory; the Ethercat slave station determines a target sub-slave station according to the analysis result and acquires a protocol bus of the target sub-slave station; the Ethercat slave station performs data encapsulation on the analysis result stored in the shared memory based on the protocol bus to obtain a data frame of the target sub-slave station; the Ethercat slave forwards the data frame to the corresponding target sub-slave. Compared with the prior art that a communication object for the Ethercat master station is only suitable for Ethercat slave station equipment, the application can transfer the control of the target sub-slave station to the corresponding Ethercat slave station, and improves the communication efficiency.
Description
Technical Field
The application relates to the technical field of data processing, in particular to an equipment IO communication method, system, equipment, storage medium and product.
Background
The industrial bus is widely applied to the industrial field due to the characteristics of simple installation, strong portability and higher reliability, but various bus protocols can be designed by various factories on the market according to the own requirements, so that communication among various devices is difficult. Ethernet control automation (EtherCAT) is an open architecture, ethernet-based fieldbus system, which can handle 1000I/O points at 30us as a low-latency high-speed bus, and has become one of the mainstream buses in the market due to its efficient performance. However, according to the Ethercat master station protocol, the communication object of the Ethercat master station communication is often only suitable for Ethercat slave station equipment, otherwise, data conversion needs to be performed through the low-speed bus twice, and the communication efficiency is low, so how to improve the communication efficiency of the Ethercat bus and other various buses becomes a technical problem to be solved urgently.
Disclosure of Invention
The application mainly aims to provide a device IO communication method, a system, a device, a storage medium and a product, and aims to solve the technical problem that the communication efficiency of an Ethercat bus and other various buses is low.
In order to achieve the above objective, the present application provides an apparatus IO communication method, where the apparatus IO communication method is applied to an apparatus IO communication system, and the apparatus IO communication system includes: the device IO communication method comprises the following steps:
after receiving the periodic process data sent by the Ethercat master station, the Ethercat slave station analyzes the periodic process data and stores an analysis result into a shared memory;
The Ethercat slave station determines a target sub-slave station according to the analysis result and acquires a protocol bus of the target sub-slave station;
The Ethercat slave station performs data encapsulation on the analysis result stored in the shared memory based on the protocol bus to obtain a data frame of the target sub-slave station;
The Ethercat slave station forwards the data frame to the corresponding target sub-slave station.
Optionally, after the step of forwarding the data frame by the Ethercat slave station to the corresponding target sub-slave station, the method further includes:
the Ethercat slave station receives a sub-slave station data frame sent by the target sub-slave station;
The Ethercat slave station analyzes the sub-slave station data frame through the shared memory to obtain sub-slave station data, and encapsulates the sub-slave station data into an Ethercat data frame;
The Ethercat slave station injects the Ethercat data frame into a sending queue and sends the Ethercat data frame to the Ethercat master station.
Optionally, the Ethercat slave station injects the Ethercat data frame into a sending queue, and sends the Ethercat data frame to the Ethercat master station, including:
the Ethercat slave station determines the insertion position of the Ethercat data frame;
The Ethercat slave station inserts the Ethercat data frame into the periodic process data based on the insertion position to obtain target periodic process data;
The Ethercat slave station injects the target periodic process data into a transmission queue and transmits the target periodic process data to the next slave station of the Ethercat slave station;
And taking the next slave station as the Ethercat slave station, and returning the target periodic process data as the periodic process data to the following step: after receiving the periodic process data sent by the Ethercat master station, the Ethercat slave station analyzes the periodic process data and stores the analysis result into a shared memory until the next sending object of the Ethercat slave station is the Ethercat master station.
Optionally, after receiving the periodic process data sent by the Ethercat master station, the Ethercat slave station parses the periodic process data, and stores a parsing result into a shared memory, where the method includes:
After receiving the periodic process data sent by the Ethercat master station, the Ethercat slave station stores the periodic process data into the internal memory of the built-in chip of the Ethercat slave station through an FSMC bus;
Analyzing the periodic process data through the built-in chip and the private protocol of the Ethercat slave station, and storing an analysis result into a shared memory;
wherein, the built-in chip is ARM, stm32 or dsp.
Optionally, the Ethercat slave station and the Ethercat master station perform clock synchronization through a DC synchronization algorithm.
Optionally, the device IO communication method further includes:
The Ethercat slave station acquires a protocol bus of the target sub-slave station and determines a synchronization algorithm based on the protocol bus;
And the Ethercat slave station and the target sub-slave station perform clock synchronization through the synchronization algorithm.
In addition, in order to achieve the above objective, the present application further provides an apparatus IO communication system, where the apparatus IO communication system includes: ethercat master and Ethercat slave:
the Ethercat master station is used for periodically sending periodic process data to the Ethercat slave station;
The Ethercat slave station is used for analyzing the periodic process data after receiving the periodic process data sent by the Ethercat master station, and storing the analysis result into a shared memory;
the Ethercat slave station is also used for determining a target sub-slave station according to the analysis result and acquiring a protocol bus of the target sub-slave station;
The Ethercat slave station is further used for carrying out data encapsulation on the analysis result stored in the shared memory based on the protocol bus to obtain a data frame of the target sub-slave station;
the Ethercat slave station is further configured to forward the data frame to the corresponding target sub-slave station.
In addition, in order to achieve the above object, the present application further provides an apparatus IO communication apparatus, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the device IO communication method as described above.
In addition, to achieve the above object, the present application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the device IO communication method as described above.
Furthermore, to achieve the above object, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the device IO communication method as described above.
The device IO communication method is applied to a device IO communication system, and the device IO communication system comprises: the device IO communication method comprises the following steps: after receiving the periodic process data sent by the Ethercat master station, the Ethercat slave station analyzes the periodic process data and stores an analysis result into a shared memory; the Ethercat slave station determines a target sub-slave station according to the analysis result and acquires a protocol bus of the target sub-slave station; the Ethercat slave station performs data encapsulation on the analysis result stored in the shared memory based on the protocol bus to obtain a data frame of the target sub-slave station; the Ethercat slave station forwards the data frame to the corresponding target sub-slave station. Compared with the prior art that a communication object of the Ethercat master station is only suitable for Ethercat slave station equipment, the mode can transfer the control of the target sub-slave station to the corresponding Ethercat slave station, and improves the communication efficiency of the equipment IO communication system.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic flow chart of an embodiment of an IO communication method of an apparatus according to the present application;
FIG. 2 is a schematic diagram of an IO communication system of a device according to a first embodiment of the IO communication method of the present application;
FIG. 3 is a schematic diagram of an Ethercat slave station according to a first embodiment of the IO communication method of the present application;
FIG. 4 is a schematic flow chart of a second embodiment of an IO communication method of the device of the present application;
FIG. 5 is a schematic block diagram of an IO communication system of an embodiment of the present application;
fig. 6 is a schematic device structure diagram of a hardware operating environment related to a device IO communication method in an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the technical solution of the present application and are not intended to limit the present application.
For a better understanding of the technical solution of the present application, the following detailed description will be given with reference to the drawings and the specific embodiments.
The main solutions of the embodiments of the present application are: after receiving the periodic process data sent by the Ethercat master station, the Ethercat slave station analyzes the periodic process data and stores the analysis result into a shared memory; the Ethercat slave station determines a target sub-slave station according to the analysis result and acquires a protocol bus of the target sub-slave station; the Ethercat slave station performs data encapsulation on the analysis result stored in the shared memory based on the protocol bus to obtain a data frame of the target sub-slave station; the Ethercat slave forwards the data frame to the corresponding target sub-slave.
Compared with the prior art that a communication object for the Ethercat master station is only suitable for Ethercat slave station equipment, the application can transfer the control of the target sub-slave station to the corresponding Ethercat slave station, and improves the communication efficiency.
It should be noted that, the execution body of the embodiment may be a computing service device with functions of data processing, network communication and program running, such as a tablet computer, a personal computer, a mobile phone, or an electronic device, a device IO communication system, or the like, which can implement the above functions. The present embodiment and the following embodiments will be described below by taking the device IO communication system as an example.
Based on this, an embodiment of the present application provides a device IO communication method, and referring to fig. 1, fig. 1 is a schematic flow chart provided in an embodiment of the device IO communication method of the present application.
In this embodiment, the device IO communication method is applied to a device IO communication system, where the device IO communication system includes: the device IO communication method comprises the following steps:
Step S10, after receiving the periodical process data sent by the Ethercat master station, the Ethercat slave station analyzes the periodical process data and stores an analysis result into a shared memory;
It should be noted that, referring to fig. 2, fig. 2 is a schematic diagram of an IO communication system of a device according to a first embodiment of the IO communication method of the present application; the real-time ECAT master station with the real-time operating system in fig. 2 is the Ethercat master station. The Ethercat slave station system in fig. 2 includes a plurality of Ethercat slave stations (slave stations): slave 0, slave 1..slave n, ethercat slave is connected by a Network Interface Card (NIC), the Ethercat master transmits periodic process data to slave 0, slave 0 to slave 1, slave 1 to slave 2..until it is transmitted to the Ethercat master, the data between Ethercat master and Ethercat slave is not a one-to-one individual transmission. The parsing of the periodic process data may be that the Ethercat slave station parses the periodic process data through a predetermined private protocol.
Further, in order to improve the communication efficiency, the step S10 may include: after receiving the periodic process data sent by the Ethercat master station, the Ethercat slave station stores the periodic process data into the internal memory of the built-in chip of the Ethercat slave station through an FSMC bus;
Analyzing the periodic process data through the built-in chip and the private protocol of the Ethercat slave station, and storing an analysis result into a shared memory;
wherein, the built-in chip is ARM, stm32 or dsp.
It should be noted that the private protocol may be a preset private protocol of the Ethercat slave station. The analysis result is part of the periodic process data which can be identified by the private protocol in the Ethercat slave station.
Step S20, the Ethercat slave station determines a target sub-slave station according to the analysis result and acquires a protocol bus of the target sub-slave station;
In this embodiment, in order to alleviate the pressure that one Ethercat master station needs to drive multiple slaves at the same time, the present embodiment gives control of a lower slave station of the slaves to the current slave station, that is, referring to fig. 2, and the Ethercat slave station controls multiple corresponding sub-slaves, that is, the sub-slave station system in fig. 2. The Ethercat slave station determines that the target sub-slave station can be the sub-slave station which needs to perform data transmission currently according to the analysis result, namely the target sub-slave station, according to the analysis result, and then obtains a protocol bus corresponding to the target sub-slave station.
Step S30, the Ethercat slave station performs data encapsulation on the analysis result stored in the shared memory based on the protocol bus to obtain a data frame of the target sub-slave station;
It should be noted that, the Ethercat slave station performs data encapsulation on the analysis result stored in the shared memory based on the protocol bus, so that the obtained data frame of the target sub-slave station may be that the Ethercat slave station performs data encapsulation on the data stored in the shared memory and required to be forwarded to the target sub-slave station according to the protocol bus identifiable by the target sub-slave station, so as to obtain the data frame required to be forwarded to the target sub-slave station.
And step S40, the Ethercat slave station forwards the data frame to the corresponding target sub-slave station.
It should be noted that, the Ethercat slave station forwarding the data frame to the corresponding target sub-slave station may be that the Ethercat slave station adds the data frame to a transmission queue and then sends the data frame to the target sub-slave station.
In a specific implementation, the Ethercat slave EETHERCAT information (i.e., the periodic process data sent by the Ethercat master station) is parsed into downlink slave device information (i.e., the information included in the parsing result), where the downlink slave device information should include the target sub-slave address, the register address, the data length, and the data content. The slave station module in the Ethercat slave station delivers the information of the uplink and downlink slave station equipment to the master station module in the Ethercat slave station in the form of a shared memory, after the shared memory information is obtained, the master station module selects different protocols according to the category of the secondary slave station (namely the target sub-slave station) to be packaged again, a data frame of the target sub-slave station is obtained, the data frame is injected into a sending pool, and the data frame is sent out through different physical media, so that the communication purpose of the master station module and the secondary slave station (namely the target sub-slave station) is achieved. Referring specifically to fig. 3, fig. 3 is a schematic diagram of an Ethercat slave station provided in a first embodiment of an IO communication method of an apparatus according to the present application; the ECAT slave station in fig. 3 is the slave station module, and the Ethercat slave station is further integrated with a bus master station of a target sub-slave station, namely the master station module (namely other bus master stations such as Profinet/RS485 in fig. 3), and specifically: and the ECAT slave station (namely the Ethercat slave station) stores the obtained periodic process data into the memory of the Arm chip through the 16-bit parallel bus of the FSMC by an internal ESC slave station control chip, analyzes pdo data (namely the periodic process data) sent by the current Ethercat master station in a slave station board card through a formulated private protocol, directly regroups the analyzed information through the private protocol (the protocol of the target sub-slave station) in a high-speed communication mode such as a shared memory, and respectively transmits the data to the target sub-slave station through other bus protocols.
The device IO communication method of the embodiment is applied to a device IO communication system, and the device IO communication system comprises: the device IO communication method comprises the following steps: after receiving the periodic process data sent by the Ethercat master station, the Ethercat slave station analyzes the periodic process data and stores an analysis result into a shared memory; the Ethercat slave station determines a target sub-slave station according to the analysis result and acquires a protocol bus of the target sub-slave station; the Ethercat slave station performs data encapsulation on the analysis result stored in the shared memory based on the protocol bus to obtain a data frame of the target sub-slave station; the Ethercat slave station forwards the data frame to the corresponding target sub-slave station. Compared with the prior art that the communication object of one Ethercat master station is only suitable for Ethercat slave station equipment, the mode of the embodiment can transfer the control of the target sub slave station to the corresponding Ethercat slave station, and improves the communication efficiency of the equipment IO communication system.
In the second embodiment of the present application, the same or similar content as in the first embodiment of the present application may be referred to the above description, and will not be repeated. On this basis, please refer to fig. 4, fig. 4 is a flow chart of a second embodiment of the IO communication method of the device according to the present application, and after step S40, the method further includes:
Step S50: the Ethercat slave station receives a sub-slave station data frame sent by the target sub-slave station;
In specific implementation, the Ethercat slave station receives the data frame of the sub-slave station sent by the target sub-slave station in real time.
Step S60: the Ethercat slave station analyzes the sub-slave station data frame through the shared memory to obtain sub-slave station data, and encapsulates the sub-slave station data into an Ethercat data frame;
It should be noted that, the Ethercat slave station analyzes the sub-slave station data frame through the shared memory to obtain sub-slave station data, and encapsulates the sub-slave station data into an Ethercat data frame, which may be other bus master stations in the Ethercat slave station, that is, the master station module analyzes the sub-slave station data frame, and stores the analyzed sub-slave station data into the shared memory, and the slave station module in the Ethercat slave station encapsulates the sub-slave station data in the shared memory to obtain the Ethercat data frame.
Step S70: the Ethercat slave station injects the Ethercat data frame into a sending queue and sends the Ethercat data frame to the Ethercat master station.
The Ethercat slave station may inject the Ethercat data frame into a transmission queue, and the Ethercat data frame may be transmitted to the Ethercat master station by adding the Ethercat data frame to the periodic process data, and transmitting the periodic process data to which the Ethercat data frame is added to the next Ethercat slave station adjacent to the Ethercat slave station, so that the periodic process data to which the Ethercat data frame is added is transmitted to the Ethercat master station through each Ethercat slave station. Specifically, the step S70 may include: the Ethercat slave station determines the insertion position of the Ethercat data frame;
The Ethercat slave station inserts the Ethercat data frame into the periodic process data based on the insertion position to obtain target periodic process data;
The Ethercat slave station injects the target periodic process data into a transmission queue and transmits the target periodic process data to the next slave station of the Ethercat slave station;
And taking the next slave station as the Ethercat slave station, and returning the target periodic process data as the periodic process data to the following step: after receiving the periodic process data sent by the Ethercat master station, the Ethercat slave station analyzes the periodic process data and stores the analysis result into a shared memory until the next sending object of the Ethercat slave station is the Ethercat master station.
The insertion position may be an insertion position of the Ethercat data frame into the periodic process data, and may be a position of data included in the periodic process data and transferred to the Ethercat slave station. In this embodiment, the communication between the Ethercat slave station and the Ethercat master station is not one-to-one, but is a ring data transmission process, and the Ethercat slave station and the Ethercat master station perform clock synchronization through a DC synchronization algorithm.
Further, in order to improve the communication efficiency, the device IO communication method further includes:
The Ethercat slave station acquires a protocol bus of the target sub-slave station and determines a synchronization algorithm based on the protocol bus;
And the Ethercat slave station and the target sub-slave station perform clock synchronization through the synchronization algorithm.
It should be noted that, the Ethercat slave station acquires the protocol bus of the target sub-slave station, and determines, based on the protocol bus, a synchronization algorithm, which may be a synchronization manner of determining, according to the protocol bus of the target sub-slave station, a clock synchronization algorithm supported by the target sub-slave station, for example, IRT of profinet.
In specific implementation, the IO communication system of the device in this embodiment mainly comprises three parts, namely an Ethercat master station, an Ethercat slave station and a sub-slave station of the Ethercat slave station. When the Ethercat master station enters the OP state, PDO data (namely, periodic process data) required by each slave station device are periodically transmitted to the Ethercat slave station device through the network card device to carry out real-time data. The specific function implementation of each Ethercat slave station is shown in fig. 3, and the Ethercat slave station is a function multiplexing slave station, and an ESC is adopted to carry an ARM chip. The specific communication steps comprise: after the ESC chip receives the periodical process data from the Ethercat master station, the data is delivered to the ARM through the FSMC high-speed bus, the ARM utilizes a private protocol to carry out analysis processing and reprofiling on the received data, converts the received data into data frames communicated by other bus protocols and generates a signal quantity to inform real-time processes of protocol stacks such as Profinet and the like, the real-time processes of the protocol stacks such as Profinet and the like push the data frames to a transmission queue after acquiring the data, for example, the Profinet bus communication process, and finally the data can be transmitted to a corresponding target sub-slave station through a physical interface such as a network port and the like. Because the Ethercat master station of the embodiment is provided with the DC synchronization algorithm, each Ethercat slave station can be synchronized, and the Ethercat slave stations can synchronize the target sub-slave stations according to other synchronization modes, such as the IRT synchronization mode of profinet, so that the real-time performance of the whole system can be ensured to a certain extent. The shared memory is only one communication method as exemplified in this embodiment, and other communication methods in the core, such as xddp, may be used.
The Ethercat slave station in this embodiment receives a sub-slave station data frame sent by the target sub-slave station; the Ethercat slave station analyzes the sub-slave station data frame through the shared memory to obtain sub-slave station data, and encapsulates the sub-slave station data into an Ethercat data frame; the Ethercat slave station injects the Ethercat data frame into a sending queue and sends the Ethercat data frame to the Ethercat master station. The embodiment solves the problem that one Ethercat master station needs to carry the pressure of a plurality of Ethercat slave stations at the same time, gives the control of the lower slave station (namely the target sub-slave station) of the Ethercat slave station to the current Ethercat slave station, meanwhile, the Ethercat slave station is used as the dc communication to keep the clock synchronization of the current Ethercat master station all the time, and the Ethercat slave station can keep the time synchronization of the sub-slave station and the Ethercat slave station through a dc or other clock synchronization algorithm, so that the reliability of the IO communication system of the whole equipment is improved.
The application also provides an equipment IO communication system, please refer to FIG. 5, FIG. 5 is a schematic diagram of a module structure of the equipment IO communication system according to an embodiment of the application; the device IO communication system comprises: ethercat master and Ethercat slave:
The Ethercat master station 10 is configured to periodically send periodic process data to the Ethercat slave station;
The Ethercat slave station 20 is configured to parse the periodic process data after receiving the periodic process data sent by the Ethercat master station, and store the parsing result into a shared memory;
The Ethercat slave station 20 is further configured to determine a target sub-slave station according to the parsing result, and obtain a protocol bus of the target sub-slave station;
the Ethercat slave station 20 is further configured to perform data encapsulation on the analysis result stored in the shared memory based on the protocol bus, so as to obtain a data frame of the target sub-slave station;
the Ethercat slave 20 is further configured to forward the data frame to the corresponding target sub-slave.
The IO communication system of the device in this embodiment includes: the system comprises an Ethercat master station and an Ethercat slave station, wherein the Ethercat slave station analyzes the periodic process data after receiving the periodic process data sent by the Ethercat master station, and stores the analysis result into a shared memory; the Ethercat slave station determines a target sub-slave station according to the analysis result and acquires a protocol bus of the target sub-slave station; the Ethercat slave station performs data encapsulation on the analysis result stored in the shared memory based on the protocol bus to obtain a data frame of the target sub-slave station; the Ethercat slave station forwards the data frame to the corresponding target sub-slave station. Compared with the prior art that the communication object of one Ethercat master station is only suitable for Ethercat slave station equipment, the mode of the embodiment can transfer the control of the target sub slave station to the corresponding Ethercat slave station, and improves the communication efficiency of the equipment IO communication system.
The device IO communication system provided by the application can solve the technical problem of lower communication efficiency of the Ethercat bus and other various buses by adopting the device IO communication method in the embodiment. Compared with the prior art, the beneficial effects of the device IO communication device provided by the application are the same as those of the device IO communication method provided by the embodiment, and other technical features of the device IO communication device are the same as those disclosed by the embodiment method, so that the description is omitted herein.
The application provides an equipment IO communication equipment, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the device IO communication method in the first embodiment.
Referring now to fig. 6, a schematic diagram of a device IO communication device suitable for use in implementing embodiments of the present application is shown. The device IO communication device in the embodiment of the present application may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (Personal DIGITAL ASSISTANT: personal digital assistant), a PAD (Portable Application Description: tablet computer), a PMP (Portable MEDIA PLAYER: portable multimedia player), an in-vehicle terminal (e.g., an in-vehicle navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The device IO communication device shown in fig. 6 is only an example, and should not be construed as limiting the function and scope of use of the embodiment of the present application.
As shown in fig. 6, the device IO communication device may include a processing means 1001 (e.g., a central processor, a graphics processor, etc.) which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage means 1003 into a random access Memory (RAM: random Access Memory) 1004. In the RAM1004, various programs and data required for the operation of the device IO communication device are also stored. The processing device 1001, the ROM1002, and the RAM1004 are connected to each other by a bus 1005. An input/output (I/O) interface 1006 is also connected to the bus. In general, the following systems may be connected to the I/O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, and the like; an output device 1008 including, for example, a Liquid crystal display (LCD: liquid CRYSTAL DISPLAY), a speaker, a vibrator, and the like; storage device 1003 including, for example, a magnetic tape, a hard disk, and the like; and communication means 1009. Communication means 1009 may allow the device IO communication device to communicate wirelessly or wired with other devices to exchange data. While device IO communications devices are shown having various systems, it should be understood that not all of the illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. The above-described functions defined in the method of the disclosed embodiment of the application are performed when the computer program is executed by the processing device 1001.
The device IO communication device provided by the application adopts the device IO communication method in the embodiment, and can solve the technical problem of device IO communication. Compared with the prior art, the beneficial effects of the device IO communication device provided by the application are the same as those of the device IO communication method provided by the embodiment, and other technical features of the device IO communication device are the same as those disclosed by the method of the previous embodiment, and are not described in detail herein.
It is to be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon for performing the device IO communication method of the above-described embodiments.
The computer readable storage medium provided by the present application may be, for example, a U disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access Memory (RAM: random Access Memory), a Read-Only Memory (ROM: read Only Memory), an erasable programmable Read-Only Memory (EPROM: erasable Programmable Read Only Memory or flash Memory), an optical fiber, a portable compact disc Read-Only Memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: wire, fiber optic cable, RF (Radio Frequency), and the like, or any suitable combination of the foregoing.
The computer readable storage medium may be included in an IO communication device; or may exist alone without being assembled into the device IO communication device.
The computer-readable storage medium carries one or more programs that, when executed by a device IO communication device, perform the steps of the device IO communication method described above.
Computer program code for carrying out operations of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of remote computers, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN: local Area Network) or a wide area network (WAN: wide Area Network), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules involved in the embodiments of the present application may be implemented in software or in hardware. Wherein the name of the module does not constitute a limitation of the unit itself in some cases.
The readable storage medium provided by the application is a computer readable storage medium, and the computer readable storage medium stores computer readable program instructions (namely computer programs) for executing the device IO communication method, so that the technical problem of device IO communication can be solved. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the application are the same as those of the device IO communication method provided by the embodiment, and are not described in detail herein.
The application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the device IO communication method described above.
The computer program product provided by the application can solve the technical problem of IO communication of equipment. Compared with the prior art, the beneficial effects of the computer program product provided by the application are the same as those of the device IO communication method provided by the embodiment, and are not repeated here.
The foregoing description is only a partial embodiment of the present application, and is not intended to limit the scope of the present application, and all the equivalent structural changes made by the description and the accompanying drawings under the technical concept of the present application, or the direct/indirect application in other related technical fields are included in the scope of the present application.
Claims (10)
1. The device IO communication method is characterized in that the device IO communication method is applied to a device IO communication system, and the device IO communication system comprises: the device IO communication method comprises the following steps:
after receiving the periodic process data sent by the Ethercat master station, the Ethercat slave station analyzes the periodic process data and stores an analysis result into a shared memory;
The Ethercat slave station determines a target sub-slave station according to the analysis result and acquires a protocol bus of the target sub-slave station;
The Ethercat slave station performs data encapsulation on the analysis result stored in the shared memory based on the protocol bus to obtain a data frame of the target sub-slave station;
The Ethercat slave station forwards the data frame to the corresponding target sub-slave station.
2. The device IO communication method of claim 1, wherein after the step of forwarding the data frame by the Ethercat slave to the corresponding target sub-slave, further comprising:
the Ethercat slave station receives a sub-slave station data frame sent by the target sub-slave station;
The Ethercat slave station analyzes the sub-slave station data frame through the shared memory to obtain sub-slave station data, and encapsulates the sub-slave station data into an Ethercat data frame;
The Ethercat slave station injects the Ethercat data frame into a sending queue and sends the Ethercat data frame to the Ethercat master station.
3. The device IO communication method of claim 2, wherein the step of the Ethercat slave station injecting the Ethercat data frame into a transmit queue and transmitting the Ethercat data frame to the Ethercat master station includes:
the Ethercat slave station determines the insertion position of the Ethercat data frame;
The Ethercat slave station inserts the Ethercat data frame into the periodic process data based on the insertion position to obtain target periodic process data;
The Ethercat slave station injects the target periodic process data into a transmission queue and transmits the target periodic process data to the next slave station of the Ethercat slave station;
And taking the next slave station as the Ethercat slave station, and returning the target periodic process data as the periodic process data to the following step: after receiving the periodic process data sent by the Ethercat master station, the Ethercat slave station analyzes the periodic process data and stores the analysis result into a shared memory until the next sending object of the Ethercat slave station is the Ethercat master station.
4. The device IO communication method according to any one of claims 1 to 3, wherein the step of the Ethercat slave station, after receiving the periodic process data sent by the Ethercat master station, parsing the periodic process data and storing the parsing result in the shared memory includes:
After receiving the periodic process data sent by the Ethercat master station, the Ethercat slave station stores the periodic process data into the internal memory of the built-in chip of the Ethercat slave station through an FSMC bus;
Analyzing the periodic process data through the built-in chip and the private protocol of the Ethercat slave station, and storing an analysis result into a shared memory;
Wherein, the built-in chip is: ARM, stm32, or dsp.
5. A device IO communication method according to any one of claims 1-3, wherein said Ethercat slave station and said Ethercat master station are clock synchronized by a DC synchronization algorithm.
6. The device IO communication method according to any one of claims 1-3, wherein the device IO communication method further comprises:
The Ethercat slave station acquires a protocol bus of the target sub-slave station and determines a synchronization algorithm based on the protocol bus;
And the Ethercat slave station and the target sub-slave station perform clock synchronization through the synchronization algorithm.
7. A device IO communication system, the device IO communication system comprising: ethercat master and Ethercat slave:
the Ethercat master station is used for periodically sending periodic process data to the Ethercat slave station;
The Ethercat slave station is used for analyzing the periodic process data after receiving the periodic process data sent by the Ethercat master station, and storing the analysis result into a shared memory;
the Ethercat slave station is also used for determining a target sub-slave station according to the analysis result and acquiring a protocol bus of the target sub-slave station;
The Ethercat slave station is further used for carrying out data encapsulation on the analysis result stored in the shared memory based on the protocol bus to obtain a data frame of the target sub-slave station;
the Ethercat slave station is further configured to forward the data frame to the corresponding target sub-slave station.
8. A device IO communication device, the device comprising: memory, a processor and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the device IO communication method of any one of claims 1 to 6.
9. A storage medium, characterized in that the storage medium is a computer-readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the steps of the device IO communication method according to any one of claims 1 to 6.
10. A computer program product, characterized in that it comprises a computer program which, when executed by a processor, implements the steps of the device IO communication method according to any one of claims 1 to 6.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410727025.5A CN118311907B (en) | 2024-06-06 | 2024-06-06 | Device IO communication method, system, device, storage medium and product |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410727025.5A CN118311907B (en) | 2024-06-06 | 2024-06-06 | Device IO communication method, system, device, storage medium and product |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN118311907A true CN118311907A (en) | 2024-07-09 |
| CN118311907B CN118311907B (en) | 2024-09-20 |
Family
ID=91727628
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410727025.5A Active CN118311907B (en) | 2024-06-06 | 2024-06-06 | Device IO communication method, system, device, storage medium and product |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN118311907B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120675835A (en) * | 2025-08-21 | 2025-09-19 | 深圳新益昌科技股份有限公司 | Data interaction method, device, system and equipment for multi-node equipment transmission |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014075758A (en) * | 2012-10-05 | 2014-04-24 | Sumitomo Electric Networks Inc | Communication system, communication method, relay device, and master station device |
| CN105553795A (en) * | 2015-12-24 | 2016-05-04 | 武汉华中数控股份有限公司 | Method for transmitting standard Ethernet data in industrial Ethernet |
| US20210318978A1 (en) * | 2020-04-14 | 2021-10-14 | Ningbo Techmation Co., Ltd. | Ethercat master-slave station integrated bridge controller and control method thereof |
| CN115913884A (en) * | 2022-11-22 | 2023-04-04 | 广东安达智能装备股份有限公司 | Communication method, etherCAT system, communication device and storage medium |
| CN117354083A (en) * | 2023-10-27 | 2024-01-05 | 福氏新能源技术(上海)有限公司 | A low-cost control system integrating EtherCAT master station and slave station |
-
2024
- 2024-06-06 CN CN202410727025.5A patent/CN118311907B/en active Active
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2014075758A (en) * | 2012-10-05 | 2014-04-24 | Sumitomo Electric Networks Inc | Communication system, communication method, relay device, and master station device |
| CN105553795A (en) * | 2015-12-24 | 2016-05-04 | 武汉华中数控股份有限公司 | Method for transmitting standard Ethernet data in industrial Ethernet |
| US20210318978A1 (en) * | 2020-04-14 | 2021-10-14 | Ningbo Techmation Co., Ltd. | Ethercat master-slave station integrated bridge controller and control method thereof |
| CN115913884A (en) * | 2022-11-22 | 2023-04-04 | 广东安达智能装备股份有限公司 | Communication method, etherCAT system, communication device and storage medium |
| CN117354083A (en) * | 2023-10-27 | 2024-01-05 | 福氏新能源技术(上海)有限公司 | A low-cost control system integrating EtherCAT master station and slave station |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120675835A (en) * | 2025-08-21 | 2025-09-19 | 深圳新益昌科技股份有限公司 | Data interaction method, device, system and equipment for multi-node equipment transmission |
| CN120675835B (en) * | 2025-08-21 | 2025-11-18 | 深圳新益昌科技股份有限公司 | Data interaction methods, apparatus, systems and equipment for multi-node device transmission |
Also Published As
| Publication number | Publication date |
|---|---|
| CN118311907B (en) | 2024-09-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11991517B2 (en) | Bluetooth communication system capable of increasing generation efficiency of cypher keys required for data transmission between bluetooth host device and bluetooth device set, and related bluetooth device set | |
| CN118311907B (en) | Device IO communication method, system, device, storage medium and product | |
| CN108845946A (en) | A kind of terminal, debugging system and terminal debugging method | |
| CN116450554A (en) | Interrupt processing method, root complex device and electronic device | |
| CN110048865A (en) | A kind of bus data transmission method, device, electronic equipment and storage medium | |
| CN109286689B (en) | Information sending method, device and vehicle-mounted human-vehicle interaction terminal | |
| CN115550464B (en) | System monitoring method based on industrial internet cloud platform, electronic equipment and medium | |
| CN114866549B (en) | Data acquisition method and device | |
| US20220405213A1 (en) | Data processing method and apparatus | |
| CN114866370B (en) | Communication method, device, equipment and medium based on asymmetric binary tree link | |
| CN113542412B (en) | Data transmission method, device, electronic equipment and storage medium | |
| TWI815098B (en) | Web request processing method, device, electronic device, and computer-readable recording medium with stored program | |
| CN113132480B (en) | Data transmission method, device and system | |
| CN118466691B (en) | Clock synchronization method, device, equipment, medium and product | |
| US20150052278A1 (en) | Dock Apparatus of Mobile Electronic Device and Connecting Method Thereof | |
| US10542125B2 (en) | Systems and methods for configuring a computing device to use a communication protocol | |
| CN119299355B (en) | AUTOSAR-based CAN-to-LIN diagnostic methods, devices, equipment, and storage media | |
| CN115604246B (en) | Data remote transmission method and device, electronic equipment and storage medium | |
| CN115114051B (en) | Node communication method, device, equipment and storage medium | |
| CN115037795B (en) | Multi-machine communication method for embedded equipment | |
| CN112688863B (en) | Gateway data processing method and device and electronic equipment | |
| CN112789945B (en) | Discontinuous receiving method and device | |
| CN111324512B (en) | Method, apparatus, electronic device, and computer-readable medium for generating text | |
| CN120956552A (en) | Methods, devices, and storage media for implementing CC-Link protocol data transmission based on the AutBus bus | |
| CN121078138A (en) | Multi-protocol compatible data transmission methods, devices, and storage media |
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 |