Data transmission method and module, linear motor device, electronic device and medium

By introducing a data transmission module into the linear motor equipment and using a protocol mapping table to convert the communication protocol, the communication problems caused by different communication protocols between linear motor equipment and other devices are solved, data interaction between devices is realized, and the scalability and production efficiency of the device are enhanced.

CN119766900APending Publication Date: 2025-04-04SHANGHAI GOLYTEC AUTOMATION CO LTD

Patent Information

Application Number
CN202411971155.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

In industrial production systems, due to different communication protocol types between linear motor equipment and other equipment, communication connections cannot be established directly, resulting in independent operation.

Method used

It provides a data transmission method and data transmission module, which realizes data transmission format conversion between different types of protocols by receiving data frames of different types of protocols and performs protocol conversion based on protocol mapping tables.

Benefits of technology

This enables the establishment of communication connections between the controller and the operating device using different types of communication protocols, enhances the scalability of linear motor equipment, and improves production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766900A_ABST
    Figure CN119766900A_ABST
Patent Text Reader

Abstract

The invention provides a data transmission method, a data transmission module, linear motor equipment, electronic equipment and a computer readable storage medium, and relates to the technical field of automatic processing, and the method comprises the steps: arranging the data transmission module with a protocol conversion function in the linear motor equipment, when a controller in the linear motor equipment performs data interaction with operation equipment, a data transmission module converts a first communication data frame into a second communication data frame after receiving the first communication data frame sent by one of the controller and the operation equipment, and sends the second communication data frame to the other one of the controller and the operation equipment; the problem that communication cannot be carried out due to different communication protocol types between the linear motor equipment and the operation equipment can be solved, so that data interaction can be carried out among multiple pieces of equipment adopting different communication protocol types, and the expandability of the linear motor equipment is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of industrial production technology, and more specifically, to a data transmission method, a data transmission module, a linear motor device, an electronic device and a computer-readable storage medium in the field of automated processing technology. Background Art

[0002] In industrial production systems, communication protocols are the basis for data exchange and collaborative work between devices. Different types of communication protocols usually have different data transmission format requirements, making it difficult for different communication protocols to be compatible.

[0003] In recent years, the application demand of linear motor equipment in industrial production systems has gradually increased due to its advantages such as high speed, high precision and flexible configuration. However, there are other equipment in industrial production systems (such as processing equipment, material discharging equipment, material retrieving equipment, monitoring equipment, etc.), and linear motor equipment may use different types of communication protocols with these equipment, resulting in the inability to establish a direct communication connection, and they can only operate independently.

[0004] Therefore, there is an urgent need for a solution to the problem that a linear motor device cannot communicate with other devices due to different communication protocol types. Summary of the invention

[0005] The embodiments of the present application provide a data transmission method, a data transmission module, a linear motor device, an electronic device and a computer-readable storage medium. The embodiments of the present application can solve the problem of inability to communicate due to different types of communication protocols between devices, so that devices with different communication protocols can also exchange data normally.

[0006] In a first aspect, a data transmission method is provided, which is applied to a data transmission module in a linear motor device, wherein the linear motor device also includes a controller, and the data transmission module is electrically connected to the controller and an operating device, respectively, and the controller and the operating device adopt different types of communication protocols; the data transmission method comprises: receiving a first communication data frame sent by a data sending end, wherein the data sending end is one type of the controller and the operating device; based on a protocol mapping table, converting the first communication data frame into a second communication data frame; wherein the protocol mapping table is at least used to indicate a mapping relationship between a communication protocol type adopted by the controller and a communication protocol type adopted by the operating device; and sending the second communication data frame to a data receiving end, wherein the data receiving end is the other type of the controller and the operating device.

[0007] Based on the above description, it can be known that the embodiment of the present application uses a data transmission module with a protocol conversion function. After receiving a first communication data frame sent by one type of controller and operating device, based on a protocol mapping table, the first communication data frame can be converted into a second communication data frame, thereby realizing the conversion of data transmission formats between different types of protocols, and then the second communication data frame is sent to another type of controller and operating device, thereby converting the data transmission format of the data frame received from the controller into a data transmission format that can be recognized by the operating device, and / or, the data transmission format of the data frame received from the operating device can be converted into a data transmission format that can be recognized by the controller, so that a communication connection can be established between controllers and operating devices using different types of communication protocols, thereby enhancing the scalability of the linear motor device.

[0008] In a second aspect, a linear motor device is provided, the linear motor device comprising: a conveyor line body, a controller and a data transmission module, an operating device is arranged around the conveyor line body, the data transmission module is electrically connected to the controller and the operating device respectively, and the controller and the operating device adopt different types of communication protocols;

[0009] The controller is used to control the conveyor line to transport items;

[0010] The data transmission module is used to receive a first communication data frame sent by a data sending end, convert the first communication data frame into a second communication data frame based on a protocol mapping table, and send the second communication data frame to a data receiving end;

[0011] Among them, the data sending end is one type of the controller and the operating device, the data sending end is the other type of the controller and the operating device, and the protocol mapping table is at least used to indicate the mapping relationship between the communication protocol type adopted by the controller and the communication protocol type adopted by the operating device.

[0012] In a third aspect, a data transmission module is provided, wherein the data transmission module is located in the linear motor, and the data transmission module comprises:

[0013] A receiving module, used for receiving a first communication data frame sent by a data sending end; wherein the data sending end is a type of controller of an operating device and a linear motor device;

[0014] A conversion module, configured to convert the first communication data frame into a second communication data frame based on a protocol mapping table; wherein the protocol mapping table is at least used to indicate a mapping relationship between a communication protocol type adopted by the controller and a communication protocol type adopted by the operating device;

[0015] A sending module is used to send the second communication data frame to a data receiving end, wherein the data sending end is the other type of the controller and the operating device.

[0016] In a fourth aspect, an electronic device is provided, comprising a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, so that the electronic device executes the data transmission method in the first aspect or any possible implementation of the first aspect.

[0017] In a fifth aspect, a computer program product is provided, which includes: a computer program code, which, when executed on a computer, enables the computer to execute the data transmission method in the first aspect or any possible implementation of the first aspect.

[0018] In a sixth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the data transmission method in the above-mentioned first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 An exemplary data interaction diagram between a linear motor device and an operating device provided in an embodiment of the present application is shown;

[0020] Figure 2 An exemplary data interaction diagram between an operating device and a linear motor device provided by an embodiment of the present application is shown;

[0021] Figure 3 A schematic flow chart of a data transmission method provided in an embodiment of the present application is shown;

[0022] Figure 4 An exemplary schematic diagram showing the mapping relationship between different communication protocol types;

[0023] Figure 5 Another exemplary schematic diagram showing a mapping relationship between different communication protocol types;

[0024] Figure 6 A schematic diagram showing a connection between an operating device and a linear motor device provided in an embodiment of the present application is shown;

[0025] Figure 7 A schematic diagram showing the connection between another operating device and a linear motor device provided in an embodiment of the present application is shown;

[0026] Figure 8 A structural block diagram of a linear motor device provided in an embodiment of the present application is shown;

[0027] Fig. 9 A schematic diagram of the structure of a data transmission module provided in an embodiment of the present application is shown;

[0028] Fig.10 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0029] The technical solution in the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0030] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.

[0031] In industrial production systems, communication protocols are the basis for data exchange and collaborative work between devices. Different types of communication protocols usually have different data transmission format requirements, making it difficult for different communication protocols to be compatible.

[0032] In recent years, the application demand of linear motor equipment in industrial production systems has gradually increased due to its advantages such as high speed, high precision and flexible configuration. However, there are other equipment in industrial production systems (such as processing equipment, material discharging equipment, material retrieving equipment, monitoring equipment, etc.), and linear motor equipment may use different types of communication protocols with these equipment, resulting in the inability to establish a direct communication connection, and they can only operate independently.

[0033] Based on the above problems, the present application provides an embodiment of a data transmission method, a data transmission module, a linear motor device, an electronic device and a computer-readable storage medium, which are described below respectively.

[0034] like Figure 1 and Figure 2 As shown, Figure 1 An exemplary data interaction diagram between a linear motor device and an operating device provided in an embodiment of the present application is shown. Figure 2FIG. 1 shows an exemplary data interaction diagram of an operating device and a linear motor device provided in an embodiment of the present application. The linear motor device 100 provided in an embodiment of the present application may include a controller 101, a data transmission module 102, and a conveying line body ( Figure 1 and Figure 2 (not shown), operating equipment 200 is distributed around the linear motor device 100, and the operating equipment 200 may include one or more of processing equipment, material discharge equipment, material collection equipment, and monitoring equipment. The conveyor line body includes at least one track assembly and at least one moving part. The controller 101 is electrically connected to the conveyor line body. The controller 101 may drive the moving part to move along the track assembly by controlling the track assembly, or the controller 101 may control the moving part to move along the track assembly. For example, when the track assembly is a stator assembly and the moving part is a movable part, the movable part is used to load items, and the controller 101 controls the magnetic field of the stator assembly. The stator assembly can drive the movable part by magnetic coupling to move the movable part along the stator assembly, and the movable part drives the loaded items to move during the movement, thereby at least realizing the item transportation function.

[0035] The data transmission module 102 is electrically connected to the controller 101 and the operating device 200, respectively. The controller 101 and the operating device 200 respectively use different types of communication protocols. It can be understood that the communication protocol type specifically used by the controller 101 or the operating device 200 can be an existing communication protocol or a custom communication protocol. For example, the controller 101 and the operating device 200 can respectively use at least one different communication protocol among Ethernet for Control Automation Technology (EtherCAT), Ethernet, User Datagram Protocol (UDP), Control & Communication Link Protocol (CC-Link), Serial Communication Protocol (Modbus), Transmission Control Protocol (TCP), Process Field Net Protocol (PN) and Industrial Ethernet Protocol (EIP). For further example, the communication protocol used by the controller 101 can be at least one of EtherCAT and Ethernet, and the communication protocol used by the operating device 200 can be at least one of UDP, CC-Link, Modbus, TCP, PN, and EIP. For another example, the communication protocol adopted by the controller 101 may be a custom communication protocol, and the communication protocol adopted by the operating device 200 may be at least one of EtherCAT, Ethernet, UDP, CC-Link, Modbus, TCP, PN, and EIP.

[0036] like Figure 1 As shown, the controller 101 can establish communication with the operating device 200 through the data transmission module 102, such as Figure 2 As shown, the operating device 200 can establish communication with the controller 101 through the data transmission module 102 .

[0037] Specifically, the data transmission module 102 of the linear motor device 100 has a data transmission format conversion function, which can convert the data transmission format of the data frame received from the controller 101 into a data transmission format that can be recognized by the operating device 200, and / or, can convert the data transmission format of the data frame received from the operating device 200 into a data transmission format that can be recognized by the controller 101, so that a communication connection can be established between the controller 101 and the operating device 200 using different types of communication protocols.

[0038] The following is an embodiment of a data transmission method provided in this application specification.

[0039] Figure 3 A schematic flow chart of a data transmission method provided in an embodiment of the present application is shown, such as Figure 3 As shown, the data transmission method provided in the embodiment of the present application is applied to a data transmission module in a linear motor device, and the data transmission method may include the following steps:

[0040] S110: receiving a first communication data frame sent by a data transmitting end;

[0041] S120: Convert the first communication data frame into a second communication data frame based on the protocol mapping table;

[0042] S130: Send the second communication data frame to the data receiving end.

[0043] The data transmitter is one of the controller and the operating device of the linear motor device, and the data receiver is the other of the controller and the operating device. In other words, the data transmitter can be the controller and the data receiver can be the operating device; or the data transmitter can be the operating device and the data receiver can be the controller.

[0044] The data structure of the communication data frame may include the following information: frame header, target address, data and frame tail. In the case where the data sending end is a controller and the data receiving end is an operating device, the data information of the first communication data frame may include: at least one of the following data: the state data of the linear motor device fed back by the controller (such as data on the start, stop, power-on, power-off, fault, etc. of the linear motor device), and the sensor data received by the controller (such as the real-time position data of the moving part, and the arrival data generated when the moving part reaches the specified position). In the case where the data sending end is an operating device and the data receiving end is a controller, the data information of the first communication data frame may include: at least one of the following data: the state data fed back by the operating device (such as data on the start, stop, fault, etc. of the operating device), the operation process data, the operation result data, etc.

[0045] The protocol mapping table is at least used to indicate the mapping relationship between the communication protocol type adopted by the controller and the communication protocol type adopted by the operating device. Specifically, the protocol mapping table can be used to indicate the mapping relationship between different types of communication protocols adopted by the controller as a data sending end and the operating device as a data receiving end, and / or the protocol mapping table can be used to indicate the mapping relationship between different types of communication protocols adopted by the controller as a data receiving end and the operating device as a data sending end.

[0046] For the case where the data transmitter is a controller and the data receiver is an operating device, refer to Figure 1 The controller 101 sends the first communication data frame K1 to the data transmission module 102 according to the first communication protocol. The data transmission module 102 determines the mapping relationship between the first communication protocol adopted by the controller 101 as the data sending end and the second communication protocol adopted by the operating device 200 as the data receiving end based on the protocol mapping table, and converts the first communication data frame K1 of the controller 101 into a second communication data frame K2 based on the mapping relationship indicated by the protocol mapping table. The second communication data frame K2 has the data transmission format of the second communication protocol adopted by the operating device 200. The data transmission module 102 sends the second communication data frame K2 to the operating device 200 according to the second communication protocol. The second communication data frame K2 can be recognized by the operating device 200, thereby establishing a communication connection between the controller 101 and the operating device 200, so that the operating device 200 obtains data related to the controller 101.

[0047] For the case where the data sending end is the operating device and the data receiving end is the controller, refer to Figure 2 The operating device 200 sends the first communication data frame K3 to the data transmission module 102 according to the first communication protocol. The data transmission module 102 determines the mapping relationship between the first communication protocol adopted by the operating device 200 as the data sending end and the second communication protocol adopted by the controller 101 as the data receiving end based on the protocol mapping table, and converts the first communication data frame K3 of the operating device 200 into a second communication data frame K4 based on the mapping relationship indicated by the protocol mapping table. The second communication data frame K4 has the data transmission format of the second communication protocol adopted by the controller 101. The data transmission module 102 sends the second communication data frame K4 to the controller 101 according to the second communication protocol. The second communication data frame K4 can be recognized by the controller 101, thereby establishing a communication connection between the operating device 200 and the controller 101, so that the controller 101 obtains data related to the operating device 200.

[0048] It should be noted that the “first communication data frame”, “second communication data frame”, “first communication protocol”, “second communication protocol”, etc. described in the embodiments of the present application are based on the data transmitting end and the data receiving end. Therefore, when the controller or operating device of the linear motor device serves as the data transmitting end, the corresponding descriptions are “first communication data frame”, “first communication protocol”, etc., and when the controller or operating device of the linear motor device serves as the data receiving end, the corresponding descriptions are “second communication data frame”, “second communication protocol”, etc. In other words, depending on whether the controller of the linear motor device serves as the data transmitting end or the data receiving end, it may correspond to the descriptions of “first communication data frame”, “first communication protocol”, etc. or “second communication data frame”, “second communication protocol”, etc., and depending on whether the operating device serves as the data transmitting end or the data receiving end, it may correspond to the descriptions of “first communication data frame”, “first communication protocol”, etc. or “second communication data frame”, “second communication protocol”, etc.

[0049] The embodiment of the present application uses a data transmission module with a protocol conversion function. After receiving a first communication data frame sent by one type of controller and operating device, the first communication data frame can be converted into a second communication data frame based on a protocol mapping table, thereby realizing the conversion of data transmission formats between different types of protocols, and then the second communication data frame is sent to another type of controller and operating device. In this way, the data transmission format of the data frame received from the controller can be converted into a data transmission format that can be recognized by the operating device, and / or the data transmission format of the data frame received from the operating device can be converted into a data transmission format that can be recognized by the controller, so that a communication connection can be established between controllers and operating devices using different types of communication protocols, thereby enhancing the scalability of the linear motor device.

[0050] It can be understood that since the solution provided in the embodiment of the present application can enhance the scalability of the linear motor equipment, for scenarios with a wide variety of operating equipment types (such as large-scale logistics warehousing, high-end manufacturing scenarios, etc.), it can effectively improve the collaborative working ability between the linear motor equipment and the operating equipment, which is conducive to improving production efficiency.

[0051] In a possible implementation, in the process of converting the first communication data frame into the second communication data frame based on the protocol mapping table, the following steps may be included:

[0052] S121: Based on the protocol mapping table, map the data stored in the first storage area corresponding to the data sending end to the second storage area corresponding to the data receiving end to generate a second communication data frame. The first storage area is used to store the data in the first communication data frame. The second storage area is used to provide the data required for the second communication data frame.

[0053] Optionally, the data transmission module is configured with a program, and the first storage area allocated for the first communication protocol includes storage units corresponding to address 11 to address 1n, and the data contained in the first communication data frame can be stored in the first storage area. Wherein, n is a positive integer greater than or equal to 1. The data transmission module is configured with a program, and the second storage area allocated for the second communication protocol includes storage units corresponding to address 21 to address 2m, and the data required for the second communication data frame can be obtained from the second storage area. Wherein, m is a positive integer greater than or equal to 1. Wherein, according to actual conditions, a storage unit can be used to store at least part of the fields of data in a communication data frame, and the field length is determined according to the storage unit. For example, a storage unit can be used to store a field of one bit, a field of one byte, a field of one word, or a field of two bytes in the data.

[0054] For example, the protocol mapping table is shown in Table 1. It should be noted that the protocol mapping table only shows the mapping relationship between EtherCAT and Modbus when the communication protocol adopted by the controller is EtherCAT and the communication protocol adopted by the operating device is Modbus. In actual applications, technicians in this field can refer to the contents shown in Table 1 to derive the mapping relationship between other types of communication protocols.

[0055] Table 1

[0056]

[0057] It is understandable that, in practical applications, a corresponding storage area may be allocated in the data transmission module according to the type of communication protocol; or, a corresponding storage area may be allocated in the data transmission module according to the port used to obtain the data frame in the data transmission module. This application does not impose specific restrictions on this.

[0058] In a specific implementation, according to the requirements of different data transmission formats for data storage, different mapping relationships may exist between the first storage area and the second storage area. For example, the storage units in the first storage area and the storage units in the second storage area may be mapped one-to-one in the order of arrangement; for another example, at least the storage units in the first storage area and at least part of the storage units in the second storage area are interleaved in a specified order.

[0059] In an alternative embodiment, if Figure 4 As shown, Figure 4An exemplary schematic diagram of the mapping relationship between different communication protocol types is shown, where the storage cells in the first storage area correspond to the storage cells in the second storage area in an arrangement order. Specifically, the storage cell block corresponding to address A1 corresponds to the storage cell corresponding to address B1, the storage cell corresponding to address A2 corresponds to the storage cell corresponding to address B2, and so on. The storage cell corresponding to address An corresponds to the storage cell corresponding to address Bn.

[0060] In yet another alternative embodiment, Figure 5 As shown, Figure 5 Another exemplary schematic diagram of the mapping relationship between different communication protocol types is shown. Specifically, the storage unit corresponding to address C1 corresponds to the storage unit corresponding to address D2, the storage unit corresponding to address C2 corresponds to the storage unit corresponding to address D1, and so on. The storage unit corresponding to address C(n-1) corresponds to the storage unit corresponding to address Dn, and the storage unit corresponding to address Cn corresponds to the storage unit corresponding to address D(n-1).

[0061] by Figure 4 The mapping relationship shown in FIG. Figure 4 As shown, combined with reference Figure 1 In the case where the data sending end is a controller and the data receiving end is an operating device, after the data transmission module receives the first communication data frame K1 sent by the data sending end, the data contained in the first communication data frame K1 is stored in the first storage area allocated for the data sending end, such as in the storage unit corresponding to address A1 to address An, and then based on the mapping relationship between the first storage area and the second storage area indicated by the protocol mapping table, the data field in the storage unit corresponding to address A1 is mapped to the storage unit corresponding to address B1, and the data field in the storage unit corresponding to address A2 is mapped to the storage unit corresponding to address B2, and so on, the data field in the storage unit corresponding to address An is mapped to the storage unit corresponding to address Bn, and then the data fields stored in the storage units corresponding to address B1 to address Bn are read to obtain the data required for the second communication data frame K2.

[0062] like Figure 4 As shown, combined with reference Figure 1For the case where the data sending end is an operating device and the data receiving end is a controller, after the data transmission module receives the first communication data frame K3 sent by the data sending end, the data contained in the first communication data frame K3 is stored in the second storage area allocated for the data sending end, such as in the storage units corresponding to addresses B1 to Bn, and then based on the mapping relationship between the second storage area and the first storage area indicated by the protocol mapping table, the data field in the storage unit corresponding to address B1 is mapped to the storage unit corresponding to address A1, and the data field in the storage unit corresponding to address B2 is mapped to the storage unit corresponding to address A2, and so on, the data field in the storage unit corresponding to address Bn is mapped to the storage unit corresponding to address An, and then the data fields stored in the storage units corresponding to addresses A1 to An are read to obtain the data required for the second communication data frame K4.

[0063] It is understandable that, as described above, a storage unit can be used to store data of different units. According to the data unit adopted by the storage unit, the data between the first storage area and the second storage area can be mapped at different unit levels. For example, the data between the first storage area and the second storage area can be mapped according to bits, bytes, words or double bytes. The embodiments of the present application do not impose specific restrictions on this.

[0064] Through the protocol mapping table, the data transmission module can map the data in the first communication data frame from the data sending end to the second storage area corresponding to the data receiving end, so that the second communication data frame can contain the data in the first communication data frame, ensuring that the data between different communication protocols can be correctly transmitted and parsed, which not only realizes the interoperability of heterogeneous systems (systems composed of different types of hardware, software, network protocols or architectures), but also improves the data transmission efficiency between the linear motor device and the operating device and the scalability of the linear motor device.

[0065] In one possible implementation, the data transmission module includes a programmable logic controller (PLC). In a PLC program, a soft element is an element required for the execution of the PLC program, specifically a virtual element implemented by a processor executing a computer program in combination with a memory. The soft element is used to simulate the functions of various electronic devices, control circuits, etc. According to its functional division, soft elements can be specifically divided into input soft elements, output soft elements, intermediate soft elements, functional soft elements, etc.; according to the storage size, soft elements can be specifically divided into bit soft elements and word soft elements. Each soft element is assigned a unique storage address to identify its corresponding relationship with the PLC storage area. In other words, each soft element is correspondingly assigned a storage unit. The protocol mapping table can be used to indicate the mapping relationship between input soft elements and output soft elements.

[0066] Before mapping the data information stored in the first storage area corresponding to the data sending end to the second storage area corresponding to the data receiving end based on the protocol mapping table, the following steps may also be included:

[0067] S1211: Map the data stored in the first soft element to the second soft element based on the starting position and number of the first soft element corresponding to the data transmitting end and the starting position and number of the second soft element corresponding to the data receiving end indicated by the protocol mapping table.

[0068] The first storage area for storing the data of the data sending end corresponds to the first soft element, and the second storage area for providing data for the data receiving end corresponds to the second soft element. The protocol mapping table includes the starting position information of the first soft element, and the starting position information of the first soft element is used to indicate the storage address corresponding to the starting soft element storing the data of the data sending end; the protocol mapping table also includes the quantity information of the first soft element, and the first soft element position information and the first soft element quantity information are combined, and the recursion is started from the storage address of the starting first soft element, so that the specific position of one or more first soft elements used for mapping can be determined. Similarly, the protocol mapping table also includes the starting position information of the second soft element, and the starting position information of the second soft element indicates the storage address corresponding to the starting soft element used to provide data for the data receiving end. The protocol mapping table also includes the quantity information of the second soft element, and the second soft element position information and the second soft element quantity information are combined, and the recursion is started from the storage address of the starting second soft element, so that the specific position of one or more second soft elements used for mapping can be determined.

[0069] After the data transfer module receives the first communication data frame sent by the data sending end, based on the protocol mapping table, the starting position and number of the first soft element corresponding to the data sending end, and the starting position and number of the second soft element corresponding to the data receiving end are determined, thereby determining one or more first soft elements and one or more second soft elements for mapping, mapping the data of the first communication data frame stored in the one or more first soft elements to one or more second soft elements, and then obtaining the data required for the second communication data frame by reading the data fields in all the second soft elements.

[0070] The data conversion when the data sending end is an operating device and the data receiving end is a controller is the same as the data conversion when the data sending end is a controller and the data receiving end is an operating device, and this application will not go into details.

[0071] The data transmission module maps the data in the first soft element corresponding to the data transmitting end to the second soft element corresponding to the data receiving end through the protocol mapping table, thereby realizing data transmission between different communication protocols. Through the software configuration of the soft element, data transmission between multiple types of communication protocols can be supported, so that the configuration and mapping relationship of the soft element can be adjusted according to actual needs. For example, when a new communication protocol type is added or the communication protocol type changes, the data transmission between the added new communication protocol type or the changed communication protocol type and other existing communication protocol types can be realized by adjusting the software configuration of the soft element without redesigning the hardware, thereby improving the flexibility and scalability of the linear motor equipment.

[0072] In specific implementations, the field storage order used by different types of communication protocols may be the same or different. For example, if the storage is performed in bytes, the field storage order is the byte order, which can be divided into big-endian byte order and little-endian byte order. The storage positions of the high-order byte and the low-order byte of the data in big-endian byte order and little-endian byte order are different. If the storage is performed in bits, the field storage order is the bit order, which can be divided into positive order and reverse order. The storage positions of each bit of the data in positive order and reverse order are different.

[0073] For multiple types of communication protocols that can have different field storage orders, in one possible implementation, data can be stored in the first storage area in bits and mapped to the second storage area in a specified order correspondence. Thus, the order of at least some fields in the data information can be adjusted during the mapping process, so that after the mapping is completed, data information with a field order that meets the communication protocol requirements of the data receiving end can be obtained, thereby improving the efficiency of converting the first communication data frame into the second communication data frame.

[0074] In another possible implementation, the data information stored in the first storage area can be mapped to the second storage area in units of bytes, words or double bytes in an arrangement order, and then the storage order of the data information in the second storage area can be adjusted in units of bits or bytes to obtain data information whose field order meets the communication protocol requirements of the data receiving end, thereby improving mapping efficiency and mapping accuracy.

[0075] In a specific implementation, for a long data information length, the efficiency of mapping in bits is low, and if at least one of the controller and the operating device is replaced, resulting in a change in the communication protocol type, the mapping relationship between the first storage area and the second storage area needs to be adjusted, resulting in low debugging efficiency. Based on this, in the process of converting the first communication data frame into the second communication data frame based on the protocol mapping table, the mapping efficiency and debugging efficiency can be improved by adjusting the field order. Specifically, after mapping the data information stored in the first storage area to the second storage area, the following steps can also be included:

[0076] S1211: If the communication protocols corresponding to the data transmitting end and the data receiving end adopt the same field storage order, read the data information in the second storage area to generate a second communication data frame;

[0077] S1212: If the field storage orders adopted by the communication protocols corresponding to the data sending end and the data receiving end are different, after determining to adjust the field order according to the mapping relationship between the first storage area and the second storage area, adjust the order of at least part of the fields of the data information in the second storage area, and read the data in the second storage area after the order adjustment to generate a second communication data frame.

[0078] The data transmission module maps the data field of the first communication data frame sent by the data sending end in the first storage area to the second storage area based on the mapping relationship between the first storage area and the second storage area in the protocol mapping table, and then determines whether the field storage order adopted by the communication protocol corresponding to the data sending end and the data receiving end is the same; if they are the same, read the data information in the second storage area to generate a second communication data frame; if they are not the same, adjust the order of at least part of the fields of the data information in the second storage area, read the data in the second storage area after the order is adjusted, and generate the second communication data frame, thereby ensuring that the data can be communicated smoothly between the data sending end and the data receiving end.

[0079] For example, the data sending end uses protocol 1, and the data receiving end uses protocol 2. Protocol 1 and protocol 2 are different types of communication protocols, and the field storage order used by protocol 1 and protocol 2 is the same. Assume that the first storage area includes the storage area corresponding to address 11 to address 14, the second storage area includes the storage area corresponding to address 21 to address 24, and the first communication data frame includes 16 bits of data information 0xY 1 Y 2 Y 3 Y 4 , where Y 1 , Y 2 , Y 3 , Y 4The storage areas corresponding to address 11 to address 14 store the fields Y 1 , Y 2 , Y 3 , Y 4 After the data information of the first storage area is mapped to the second storage area, the fields stored in the storage units corresponding to addresses 21 to 24 are Y 1 , Y 2 , Y 3 , Y 4 , then read the fields stored in the storage units corresponding to address 21 to address 24 to obtain the second communication data frame. If the field storage order used by protocol 1 and protocol 2 is different, after the data information of the first storage area is mapped to the second storage area, the fields stored in the storage units corresponding to address 21 to address 24 are Y 1 , Y 2 , Y 3 , Y 4 However, the field sequence of the second communication data frame requires that the fields stored in the storage units corresponding to addresses 21 to 24 are Y 3 , Y 4 , Y 1 , Y 2 To read 0xY 1 Y 2 Y 3 Y 4 The data information of the address 21 to the address 24 is sequentially adjusted. After the adjustment, the fields stored in the storage units corresponding to the address 21 to the address 24 are Y. 3 , Y 4 , Y 1 , Y 2 , thereby ensuring that the data information included in the second communication data frame is consistent with the data information included in the first communication data frame.

[0080] For another example, the data transmitting end uses protocol 3, and the data receiving end uses protocol 4. Protocol 3 and protocol 4 are different types of communication protocols, and the field storage order used by protocol 3 and protocol 4 is the same. Assume that the first storage area includes the storage area corresponding to address 11 to address 18, the second storage area includes the storage area corresponding to address 21 to address 28, and the first communication data frame includes 8 bits of data information 0bX 1 X 2 X 3 X 4 X 5 X 6 X 7 X 8 , where X 1 To X 8The storage areas corresponding to addresses 11 to 18 store the fields X 1 , X 2 , X 3 , X 4 , X 5 , X 6 , X 7 , X 8 After the data information of the first storage area is mapped to the second storage area, the fields stored in the storage units corresponding to addresses 21 to 28 are respectively X 1 , X 2 , X 3 , X 4 , X 5 , X 6 , X 7 , X 8 , then read the fields stored in the storage units corresponding to address 21 to address 28 to obtain the second communication data frame. If the field storage order used by protocol 3 and protocol 4 is different, after the data information of the first storage area is mapped to the second storage area, the fields stored in the storage units corresponding to address 21 to address 28 are X 1 , X 2 , X 3 , X 4 , X 5 , X 6 , X 7 , X 8 However, the field sequence of the second communication data frame requires that the fields stored in the storage units corresponding to addresses 21 to 28 are respectively X 8 , X 7 , X 6 , X 5 , X 4 , X 3 , X 2 , X 1 To read 0bX 8 X 7 X 6 X 5 X 4 X 3 X 2 X 1 The data information of the address 21 to the address 28 corresponding to the storage unit stored in the field is adjusted in sequence, after the adjustment, the field stored in the storage unit corresponding to the address 21 to the address 28 is X 8 , X 7 , X 6 , X 5 , X 4 , X 3 , X 2 , X1 , thereby ensuring that the data information included in the second communication data frame is consistent with the data information included in the first communication data frame.

[0081] In a possible implementation, before converting the first communication data frame into the second communication data frame based on the protocol mapping table, the data transmission method provided in the embodiment of the present application may further include at least one of the following steps:

[0082] S101: Determine a communication protocol type adopted by a data receiving end based on target address information, wherein the target address information is determined based on a first communication data frame or according to a configuration operation;

[0083] S102: Determine a communication protocol type corresponding to the first communication data frame based on a port identifier of a received first communication data frame.

[0084] S103: Identify the communication protocol type corresponding to the first communication data frame.

[0085] For S101, the target address information may be an IP address, a MAC address, a port number, etc. The data transmission module may obtain the target address information by parsing the first communication data frame or by user configuration. The data transmission module obtains the communication protocol type used by the data receiving end by obtaining the preset protocol type corresponding to the target address information.

[0086] For S102, after the data transmission module receives the first communication data frame, it parses the first communication data frame to obtain the port identifier carried by the first communication data frame. The preset protocol type corresponding to the port identifier is the communication protocol type corresponding to the first communication data frame, that is, the communication protocol type adopted by the data sending end.

[0087] For S103, the data transmission module parses the received first communication data frame to obtain the communication protocol type carried by the first communication data frame, that is, obtains the communication protocol type adopted by the data sending end.

[0088] Based on S101 - S103 , the communication protocol type adopted by the data sending end and the communication protocol type adopted by the data receiving end can be flexibly obtained in a variety of different ways.

[0089] It is understandable that the protocol mapping table can be constructed based on different types of known communication protocols, and is not limited to the communication protocol types used by the controller and the operating device. Therefore, after at least one of the controller and the operating device is replaced, as long as the protocol mapping table has been configured with a mapping relationship between the replaced communication protocol and other types of communication protocols, the conversion between the first communication data frame and the second communication data frame can still be achieved. The method for determining the communication protocol type can refer to the description of the above-mentioned related embodiments.

[0090] In a possible implementation, in the process of sending the second communication data frame to the data receiving end, the following steps may be included:

[0091] S131: Send the second communication data frame to the data receiving end through the target port corresponding to the target port information; wherein the target port information is determined by the target address information or according to the configuration operation.

[0092] The linear motor device may include N controllers, and the number of operating devices may be M. The data transmission module has N first ports for connecting to the controllers and M second ports for connecting to the operating devices. The first port and the second port of the data transmission module can both receive and send data, wherein N is a positive integer and M is a positive integer.

[0093] It is understandable that the number of controllers and the number of operating devices may be the same or different. A controller may communicate with one or more operating devices through a data transmission module, and / or an operating device may communicate with one or more controllers through a data transmission module. After the data transmission module converts the first communication data frame of the data sending end into the second communication data frame, the corresponding target port may be determined according to the target port information, and the second communication data frame may be sent to the data receiving end through the target port. Specifically, when the target port is the first port connected to the controller, the second communication data frame may be sent to the corresponding controller through the target port, or, when the target port is the first port connected to the operating device, the second communication data frame may be sent to the corresponding operating device through the target port. Among them, the target address information may be obtained by parsing the first communication data frame, or, by presetting the port correspondence between the controller and the operating device through a configuration operation and storing it in the data transmission module, so that after the first communication data frame is converted into the second communication data frame, the target port of the data receiving end with a port correspondence relationship may be determined according to whether the sending subject of the first communication data frame is a controller or an operating device.

[0094] It can be understood that, when there are multiple data receiving ends, a data sending end can send the second communication data frame to the corresponding data receiving end through at least one target port of the data transmission module.

[0095] In an alternative embodiment, if Figure 6 As shown, Figure 6 A schematic diagram showing the connection between an operating device and a linear motor device provided in an embodiment of the present application is shown. The linear motor device ( Figure 6The data transmission module 102 may include three controllers, namely, controllers 1011 to 1013, three operating devices, namely, operating devices 2001 to 2003, and the data transmission module 102 may include three first ports and three second ports, namely, first port 1 to first port 3, and second port 1 to second port 3. Among them, the controller 1011 is electrically connected to the first port 1, the controller 1012 is electrically connected to the first port 2, the controller 1013 is electrically connected to the first port 3, the operating device 2001 is electrically connected to the second port 1, the operating device 2002 is electrically connected to the second port 2, and the operating device 2003 is electrically connected to the second port 3. The following schematically lists several situations:

[0096] For example, the data transmission module 102 receives a first communication data frame sent by the controller 1011 through the first port 1, parses the first communication data frame, obtains the target address information, and determines through the parsed target address information that the target port information indicates that the target port is the second port 1 connected to the operating device 2001. After converting the first communication data frame of the controller 1011 into the second communication data frame, the second communication data frame is sent to the operating device 2001 through the second port 1, thereby realizing communication between the controller 1011 and the operating device 2001.

[0097] For another example, the data transmission module 102 receives the first communication data frame sent by the controller 1012 through the first port 2, and determines, according to the port correspondence relationship set by the configuration operation, that the target port indicated by the target port information is the second port 2 connected to the operating device 2002 and the second port 3 connected to the operating device 2003. After the first communication data frame of the controller 1012 is converted into the second communication data frame, the second communication data frame is sent to the operating device 2002 and the operating device 2003 through the second port 2 and the second port 3, thereby realizing communication between the controller 1011 and the operating device 2002, and the operating device 2003.

[0098] For example, the data transmission module 102 receives a first communication data frame sent by the operating device 2002 through the second port 2, parses the first communication data frame, obtains the target address information, and determines through the parsed target address information that the target port information indicates that the target port is the first port 2 connected to the controller 1012. After the first communication data frame of the operating device 2002 is converted into a second communication data frame, the second communication data frame is sent to the controller 1012 through the first port 2, thereby realizing communication between the operating device 2002 and the controller 1012.

[0099] It can be understood that the above examples are schematic descriptions for technical personnel in the field to understand. Technical personnel in the field can directly and meaninglessly deduce more data interaction situations between the controller and the operating device based on the above related descriptions, and this application will not go into details.

[0100] Sending the second communication data frame to the data receiving end through the port corresponding to the target port information is conducive to ensuring that the second communication data frame is sent to the correct data receiving end, which not only ensures the accuracy and reliability of communication, but also improves data transmission efficiency.

[0101] like Figure 7 As shown, Figure 7 A schematic diagram of another connection between an operating device and a linear motor device provided in an embodiment of the present application is shown. A controller and an operating device are used as an example for explanation. The side of the data transmission module connected to the controller includes a first port for receiving data (i.e., port 3A) and a port for outputting data (i.e., port 3B), and the side of the data transmission module connected to the data receiving end includes a second port for receiving data (i.e., port 4A) and a second port for sending data (i.e., port 4B). Among them, Figure 7 The mapping relationship between the first storage area and the second storage area in can be found in Figure 4 or Figure 5 .

[0102] The controller can send the first communication data frame to the data transmission module through the port 3A, and the data transmission module stores the data information of the first communication data frame in the first storage area (such as Figure 7 Schematically showing that the data information of the first communication data frame is stored in the storage unit corresponding to the address A1), after the first storage area and the second storage area are mapped, the data transmission module obtains the data information from the first communication data frame from the second storage area (such as Figure 7 It is schematically shown that data information from the first communication data frame is obtained from the storage unit corresponding to the address B1, and a second communication data frame is generated, and then the corresponding target port is determined to be port 4A through the target port information, so that the second communication data frame is sent to the operating device through port 4A.

[0103] The operating device can send a first communication data frame to the data transmission module through port 4B, and the data transmission module stores the data information of the first communication data frame in the first storage area (such as Figure 7 Schematically showing that the data information of the first communication data frame is stored in the storage unit corresponding to the address A3), after the first storage area and the second storage area are mapped, the data transmission module obtains the data information from the first communication data frame from the second storage area (such as Figure 7It is schematically shown that data information from the first communication data frame is obtained from the storage unit corresponding to the address B3, and a second communication data frame is generated, and then the corresponding target port is determined to be port 3B through the target port information, so that the second communication data frame is sent to the controller through port 3B.

[0104] It can be understood that the controller can send data through port 3A and receive data through port 3B at the same time, the operating device can send data through port 4A and receive data through port 4B at the same time, and the controller can send or receive data through port 3A and / or port 3B while the operating device can also send or receive data through port 4A and / or port 4B. For example, when the controller reads data through port 3B, the operating device can also read data through port 4A; when the controller writes data through port 3A, the operating device can also write data through port 4B; when the controller reads data through port 3B, the controller can write data through port 3A; when the operating device writes data through port 4B, the operating device reads data through port 4A; the controller can write data through port 3A and read data through port 3B, and the operating device can write data through port 4B and read data through port 4A in parallel.

[0105] Therefore, the data transmission module is separately configured with ports for sending data and ports for receiving data for the controller and the operating device respectively, and the controller and the operating device can perform read and write operations in parallel, which is beneficial to improving data transmission efficiency.

[0106] In a possible implementation, the data transmission method may further include the following steps:

[0107] S140: Detecting whether a first heartbeat signal from the controller is received within a first time threshold;

[0108] S150: Detecting whether a second heartbeat signal from the operating device is received within a first time threshold.

[0109] The heartbeat signal is used to determine whether the device or system is online (whether it is working normally). Detecting whether the first heartbeat signal from the controller is received within the first time threshold is to determine whether the controller is online, and detecting whether the second heartbeat signal from the operating device is received within the first time threshold is to determine whether the operating device is online. For example, if the first time threshold is 5s, the controller sends the first heartbeat signal to the data transmission module once every 5 seconds, indicating that the controller is online, that is, working normally; the operating device sends the second heartbeat signal to the data transmission module once every 5 seconds, indicating that the operating device is online, that is, working normally.

[0110] When it is determined that the controller and the operating device are both online, the data transmission module executes the above-mentioned related steps (such as the above-mentioned steps S110-S130) to ensure effective data interaction between the controller and the operating device, thereby avoiding unnecessary operations when either the controller or the operating device is offline, which is beneficial to reduce the risk of data loss and improve the reliability of data transmission.

[0111] The following is an embodiment of a linear motor device provided in this application specification.

[0112] Figure 8 A structural block diagram of a linear motor device provided in an embodiment of the present application is shown. Figure 8 As shown, a linear motor device 300 provided in an embodiment of the present application includes: a controller 101, a data transmission module 102 and a conveyor line body 103. An operating device 200 is arranged around the conveyor line body 103, the data transmission module 102 is electrically connected to the controller 101 and the operating device 200 respectively, the controller 101 is electrically connected to the conveyor line body 103, and the controller 101 and the operating device 200 use different types of communication protocols.

[0113] In an exemplary embodiment, the controller 101 is used to control the conveyor line to transport items; the data transmission module 102 is used to receive a first communication data frame sent by a data sending end, convert the first communication data frame into a second communication data frame based on a protocol mapping table, and send the second communication data frame to a data receiving end.

[0114] The data transmitting end is one of the controller 101 and the operating device 200, and the data receiving end is the other of the controller 101 and the operating device 200. In other words, the data transmitting end may be the controller, and the data receiving end may be the operating device 200; or, the data transmitting end may be the operating device 200, and the data receiving end may be the controller 101.

[0115] The data structure of the communication data frame may include the following information: frame header, address, data and frame tail. In the case where the data sending end is a controller and the data receiving end is an operating device, the data information of the first communication data frame may include: at least one of the following data: the state data of the linear motor device fed back by the controller (such as data on the start, stop, power-on, power-off, fault, etc. of the linear motor device), and the sensor data received by the controller (such as the real-time position data of the moving part, and the arrival data generated when the moving part reaches the specified position). In the case where the data sending end is an operating device and the data receiving end is a controller, the data information of the first communication data frame may include: at least one of the following data: the state data fed back by the operating device (such as data on the start, stop, fault, etc. of the operating device), the operation process data, the operation result data, etc.

[0116] The protocol mapping table is at least used to indicate the mapping relationship between the communication protocol type adopted by the controller and the communication protocol type adopted by the operating device. Specifically, the protocol mapping table can be used to indicate the mapping relationship between different types of communication protocols adopted by the controller as a data sending end and the operating device as a data receiving end, and / or the protocol mapping table can be used to indicate the mapping relationship between different types of communication protocols adopted by the controller as a data receiving end and the operating device as a data sending end.

[0117] For the case where the data transmitter is a controller and the data receiver is an operating device, refer to Figure 1 The controller 101 sends the first communication data frame K1 to the data transmission module 102 according to the first communication protocol. The data transmission module 102 determines the mapping relationship between the first communication protocol adopted by the controller 101 as the data sending end and the second communication protocol adopted by the operating device 200 as the data receiving end based on the protocol mapping table, and converts the first communication data frame K1 of the controller 101 into a second communication data frame K2 based on the mapping relationship indicated by the protocol mapping table. The second communication data frame K2 has the data transmission format of the second communication protocol adopted by the operating device 200. The data transmission module 102 sends the second communication data frame K2 to the operating device 200 according to the second communication protocol. The second communication data frame K2 can be recognized by the operating device 200, thereby establishing a communication connection between the controller 101 and the operating device 200, so that the operating device 200 obtains data related to the controller 101.

[0118] For the case where the data sending end is the operating device and the data receiving end is the controller, refer to Figure 2 The operating device 200 sends the first communication data frame K3 to the data transmission module 102 according to the first communication protocol. The data transmission module 102 determines the mapping relationship between the first communication protocol adopted by the operating device 200 as the data sending end and the second communication protocol adopted by the controller 101 as the data receiving end based on the protocol mapping table, and converts the first communication data frame K3 of the operating device 200 into a second communication data frame K4 based on the mapping relationship indicated by the protocol mapping table. The second communication data frame K4 has the data transmission format of the second communication protocol adopted by the controller 101. The data transmission module 102 sends the second communication data frame K4 to the controller 101 according to the second communication protocol. The second communication data frame K4 can be recognized by the controller 101, thereby establishing a communication connection between the operating device 200 and the controller 101, so that the controller 101 obtains data related to the operating device 200.

[0119] It should be noted that the “first communication data frame”, “second communication data frame”, “first communication protocol”, “second communication protocol”, etc. described in the embodiments of the present application are based on the data transmitting end and the data receiving end. Therefore, when the controller or operating device of the linear motor device serves as the data transmitting end, the corresponding descriptions are “first communication data frame”, “first communication protocol”, etc., and when the controller or operating device of the linear motor device serves as the data receiving end, the corresponding descriptions are “second communication data frame”, “second communication protocol”, etc. In other words, depending on whether the controller of the linear motor device serves as the data transmitting end or the data receiving end, it may correspond to the descriptions of “first communication data frame”, “first communication protocol”, etc. or “second communication data frame”, “second communication protocol”, etc., and depending on whether the operating device serves as the data transmitting end or the data receiving end, it may correspond to the descriptions of “first communication data frame”, “first communication protocol”, etc. or “second communication data frame”, “second communication protocol”, etc.

[0120] The embodiment of the present application uses a data transmission module with a protocol conversion function. After receiving a first communication data frame sent by one type of controller and operating device, the first communication data frame can be converted into a second communication data frame based on a protocol mapping table, thereby realizing the conversion of data transmission formats between different types of protocols, and then the second communication data frame is sent to another type of controller and operating device. In this way, the data transmission format of the data frame received from the controller can be converted into a data transmission format that can be recognized by the operating device, and / or the data transmission format of the data frame received from the operating device can be converted into a data transmission format that can be recognized by the controller, so that a communication connection can be established between controllers and operating devices using different types of communication protocols, thereby enhancing the scalability of the linear motor device.

[0121] It can be understood that since the solution provided in the embodiment of the present application can enhance the scalability of the linear motor equipment, for scenarios with a wide variety of operating equipment types (such as large-scale logistics warehousing, high-end manufacturing scenarios, etc.), it can effectively improve the collaborative working ability between the linear motor equipment and the operating equipment, which is conducive to improving production efficiency.

[0122] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0123] Fig. 9 A schematic diagram of the structure of a data transmission module provided in an embodiment of the present application is shown. Fig. 9 As shown, the data transmission module 900 is located in the linear motor, and the data transmission module 900 includes:

[0124] The receiving module 910 is used to receive a first communication data frame sent by a data sending end; wherein the data sending end is a type of controller of an operating device and a linear motor device;

[0125] A conversion module 920, configured to convert the first communication data frame into a second communication data frame based on a protocol mapping table; wherein the protocol mapping table is at least used to indicate a mapping relationship between a communication protocol type adopted by the controller and a communication protocol type adopted by the operating device;

[0126] The sending module 930 is used to send the second communication data frame to a data receiving end, wherein the data sending end is the other type of the controller and the operating device.

[0127] In one possible implementation, the conversion module 920 is specifically used to map the data stored in the first storage area corresponding to the data sending end to the second storage area corresponding to the data receiving end based on the protocol mapping table to generate the second communication data frame, wherein the first storage area is used to store the data in the first communication data frame.

[0128] In one possible implementation, the data transmission module 900 is a programmable logic controller, and the conversion module 920 is further used to determine the starting position and number of the first soft element corresponding to the data sending end and the starting position and number of the second soft element corresponding to the data receiving end based on the protocol mapping table, and map the data stored in the first soft element to the second soft element.

[0129] In one possible implementation, the conversion module 920 is further specifically used to read the data information in the second storage area to generate the second communication data frame if the field storage order adopted by the communication protocol corresponding to the data sending end and the data receiving end is the same; if the field storage order adopted by the communication protocol corresponding to the data sending end and the data receiving end is different, adjust the order of at least part of the fields of the data in the second storage area, and read the data in the second storage area after the order is adjusted to generate the second communication data frame.

[0130] In a possible implementation, the data transmission module 900 further includes:

[0131] The protocol type identification unit is configured to perform at least one of the following operations:

[0132] Determining the type of communication protocol adopted by the data receiving end based on the target address information, wherein the target address information is determined based on the first communication data frame or according to a configuration operation;

[0133] Determining a communication protocol type corresponding to the first communication data frame based on a port identifier for receiving the first communication data frame;

[0134] Identify the communication protocol type corresponding to the first communication data frame.

[0135] In a possible implementation, the sending module 930 is specifically used to send the second communication data frame to the data receiving end through the target port corresponding to the target port information; wherein the target port information is determined by the target address information or according to a configuration operation.

[0136] In a possible implementation, the data transmission module 900 further includes:

[0137] The online detection unit is used to detect whether a first heartbeat signal from the controller is received within a first time threshold; and detect whether a second heartbeat signal from the operating device is received within the first time threshold.

[0138] In one possible implementation, the controller and the operating device respectively adopt at least one different communication protocol among the Ethernet control automation technology protocol, Ethernet protocol, user datagram protocol, control and communication link protocol, serial communication protocol, transmission control protocol, process field network protocol and industrial Ethernet protocol.

[0139] It should be noted that the data transmission module provided in the above embodiment only uses the division of the above functional modules as an example when executing the data transmission method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the data transmission module provided in the above embodiment belongs to the same concept as the data transmission method embodiment. Therefore, for details not disclosed in the device embodiment of the present application, please refer to the above-mentioned data transmission method embodiment of the present application, which will not be repeated here.

[0140] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0141] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. Fig.10 As shown, the electronic device 1000 includes: a memory 1001 and a processor 1002, wherein the memory 1001 stores an executable program code 10011, and the processor 1002 is used to call and execute the executable program code 10011 to perform a data transmission method.

[0142] In this embodiment, the electronic device can be divided into functional modules according to the above method example. For example, each functional module can be corresponded to, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0143] In the case of dividing each functional module according to each function, the electronic device may include: a receiving module, a conversion module, a sending module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, which will not be repeated here.

[0144] The electronic device provided in this embodiment is used to execute the above-mentioned data transmission method, and thus can achieve the same effect as the above-mentioned implementation method.

[0145] In the case of an integrated unit, the electronic device may include a processing module and a storage module. The processing module may be used to control and manage the actions of the electronic device. The storage module may be used to support the electronic device in executing related program codes and data.

[0146] The processing module may be a processor or a controller, which may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module may be a memory.

[0147] This embodiment further provides a computer-readable storage medium, in which a computer program code is stored. When the computer program code is executed on a computer, the computer executes the above-mentioned related method steps to implement a data transmission method in the above-mentioned embodiment.

[0148] This embodiment further provides a computer program product. When the computer program product runs on a computer, the computer executes the above-mentioned related steps to implement a data transmission method in the above-mentioned embodiment.

[0149] In addition, the electronic device provided in the embodiments of the present application may specifically be a chip, a component or a module, and the electronic device may include a connected processor and a memory; wherein the memory is used to store instructions, and when the electronic device is running, the processor may call and execute instructions so that the chip executes a data transmission method in the above-mentioned embodiments.

[0150] Among them, the electronic device, computer-readable storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding data transmission method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding data transmission method provided above, and will not be repeated here.

[0151] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0152] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0153] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data transmission method, characterized in that: A data transmission module applied to a linear motor device, wherein the linear motor device further comprises a controller, wherein the data transmission module is electrically connected to the controller and an operating device respectively, and wherein the controller and the operating device adopt different types of communication protocols; The data transmission method comprises: receiving a first communication data frame sent by a data sending end, wherein the data sending end is one of the controller and the operating device; Based on a protocol mapping table, converting the first communication data frame into a second communication data frame; wherein the protocol mapping table is at least used to indicate a mapping relationship between a communication protocol type adopted by the controller and a communication protocol type adopted by the operating device; The second communication data frame is sent to a data receiving end, wherein the data receiving end is the other type of the controller and the operating device.

2. The data transmission method according to claim 1, characterized in that: The converting the first communication data frame into a second communication data frame based on the protocol mapping table includes: Based on the protocol mapping table, the data stored in the first storage area corresponding to the data sending end is mapped to the second storage area corresponding to the data receiving end to generate the second communication data frame, wherein the first storage area is used to store the data in the first communication data frame.

3. The data transmission method according to claim 2, characterized in that: The data transmission module includes a programmable logic controller; before mapping the data information stored in the first storage area corresponding to the data transmitting end to the second storage area corresponding to the data receiving end based on the protocol mapping table, it also includes: Based on the starting position and number of the first soft element corresponding to the data sending end and the starting position and number of the second soft element corresponding to the data receiving end indicated by the protocol mapping table, the data stored in the first soft element is mapped to the second soft element.

4. The data transmission method according to claim 2, characterized in that: The converting the first communication data frame into a second communication data frame based on the protocol mapping table further includes: If the communication protocols corresponding to the data transmitting end and the data receiving end adopt the same field storage order, read the data information in the second storage area to generate the second communication data frame; If the field storage orders adopted by the communication protocols corresponding to the data sending end and the data receiving end are different, after determining to adjust the field order based on the mapping relationship between the first storage area and the second storage area, at least part of the fields of the data information in the second storage area are sequentially adjusted, and the data in the second storage area after the sequence adjustment is read to generate the second communication data frame.

5. The data transmission method according to claim 1, characterized in that: Before converting the first communication data frame into the second communication data frame based on the protocol mapping table, the data transmission method further includes at least one of the following: Determining the type of communication protocol adopted by the data receiving end based on the target address information, wherein the target address information is determined based on the first communication data frame or according to a configuration operation; Determining a communication protocol type corresponding to the first communication data frame based on a port identifier for receiving the first communication data frame; Identify the communication protocol type corresponding to the first communication data frame.

6. The data transmission method according to claim 5, characterized in that: The sending of the second communication data frame to the data receiving end includes: The second communication data frame is sent to the data receiving end through the target port corresponding to the target port information; wherein the target port information is determined by the target address information or according to a configuration operation.

7. The data transmission method according to claim 1, characterized in that: The data transmission method further comprises: Detecting whether a first heartbeat signal from the controller is received within a first time threshold; Whether a second heartbeat signal from the operating device is received within the first time threshold is detected.

8. The data transmission method according to claim 1, characterized in that: The controller and the operating device respectively adopt at least one different communication protocol from the group consisting of Ethernet control automation technology protocol, Ethernet protocol, user datagram protocol, control and communication link protocol, serial communication protocol, transmission control protocol, process field network protocol and industrial Ethernet protocol.

9. A data transmission module, characterized in that: The data transmission module is located in the linear motor, and the data transmission module includes: A receiving module, used for receiving a first communication data frame sent by a data sending end; wherein the data sending end is a type of controller of an operating device and a linear motor device; A conversion module, configured to convert the first communication data frame into a second communication data frame based on a protocol mapping table; wherein the protocol mapping table is at least used to indicate a mapping relationship between a communication protocol type adopted by the controller and a communication protocol type adopted by the operating device; A sending module is used to send the second communication data frame to a data receiving end, wherein the data sending end is the other type of the controller and the operating device.

10. A linear motor device, characterized in that: The linear motor device comprises: a conveyor line body, a controller and a data transmission module, an operating device is arranged around the conveyor line body, the data transmission module is electrically connected to the controller and the operating device respectively, and the controller and the operating device adopt different types of communication protocols; The controller is used to control the conveyor line to transport items; The data transmission module is used to receive a first communication data frame sent by a data sending end, convert the first communication data frame into a second communication data frame based on a protocol mapping table, and send the second communication data frame to a data receiving end; Among them, the data sending end is one type of the controller and the operating device, the data sending end is the other type of the controller and the operating device, and the protocol mapping table is at least used to indicate the mapping relationship between the communication protocol type adopted by the controller and the communication protocol type adopted by the operating device.

11. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the electronic device executes the data transmission method as described in any one of claims 1 to 8.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the data transmission method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Communication protocol conversion device and method

    CN112953880A

  • Converged communication management system and method suitable for limited space operation

    CN115314567A

  • Method for realizing cross-modal data protocol conversion on FPGA (Field Programmable Gate Array) and FPGA

    CN118069653A

  • Intelligent gateway method compatible with multiple protocols, server, medium and program product

    CN118869556A

  • Joint simulation method, system and equipment for two types of heterogeneous systems and medium

    CN118965799A

Cited By

  • Multi-protocol conversion gateway data interaction method, system and device and storage medium

    CN121173882A

  • Method, system and device for data interaction of multi-protocol conversion gateway and storage medium

    CN121173882B