Communication system control method, system and device, and storage medium

By generating configuration data configuration interface and mapping relationships, the visual configuration of CANopen communication is realized, which solves the problems of difficult configuration and poor user experience in the existing technology, and improves user operation efficiency and data interaction convenience.

CN120342801AInactive Publication Date: 2025-07-18BEIJING HELI GUOFANG TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510646208.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-19
Publication Date
2025-07-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing CANopen communication configuration is difficult and the user experience is poor, which makes slave control difficult.

Method used

A control method for a communication system is provided, by generating a configuration data configuration interface, generating configuration configuration data items in response to user operations, and using a controller to determine the mapping relationship between the user address space and address space of the slave device, to realize the visual configuration of PDO and SDO.

Benefits of technology

It reduces the difficulty of CANopen communication configuration, improves user experience, simplifies operational processes, and improves user operation efficiency and convenience of data interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120342801A_ABST
    Figure CN120342801A_ABST
Patent Text Reader

Abstract

The invention provides a communication system control method, system and device and a storage medium, and the method comprises the steps: enabling a slave station device to access a CAN communication link of a master station device according to the obtained device information of the CANopen slave station device and the device information of the master station device; generating a configuration data configuration interface according to the equipment information of the slave station equipment, and in response to an operation triggered by a user through the interface, generating a PDO and / or SDO configuration data item of the slave station equipment; the configuration data item and the equipment information of the master station equipment are sent to the controller, so that the controller determines the mapping relation between the user address space and the CANopen address space of the slave station equipment according to the configuration data item and the equipment information of the master station equipment, and the mapping relation and the configuration data item are sent to the master station equipment by the controller. The method and the device are used when the master station device and the slave station device perform data interaction, so that visual PDO and SDO configuration is realized, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of communication technologies, and particularly to a control method, system, device, and storage medium for a communication system. Background Art

[0002] CANopen is a high-level communication protocol based on the Controller Area Network (CAN), including a communication sub-protocol and a device sub-protocol. CANopen has a high degree of freedom and is thus widely used. CANopen has been successfully applied not only in traditional machine tool controllers but also in other fields such as medical, marine, railway, military, and solar energy. In addition, CANopen can also be applied to fields such as buildings, laboratories, process, and production automation.

[0003] However, in the existing CANopen communication technology, the configuration is difficult, resulting in a poor user experience and a greater difficulty for users to control slave stations. Summary of the Invention

[0004] Embodiments of this application provide a control method, system, device, and storage medium for a communication system, which can reduce the configuration difficulty in the CANopen communication process, improve the user experience, and reduce the difficulty for users to control slave stations.

[0005] In a first aspect, an embodiment of this application provides a control method for a communication system, which is applied to a host computer. The method includes: According to the obtained device information of the CANopen slave device and the device information of the CANopen master device, connect the CANopen slave device to the CAN communication link of the CANopen master device; Generate a configuration data configuration interface according to the device information of the CANopen slave device. In response to an operation triggered by the user through the configuration data configuration interface, generate configuration data items for the CANopen slave device. The configuration data items for the CANopen slave device include one or more of the configuration data items for Process Data Objects (PDOs) and the configuration data items for Service Data Objects (SDOs); Send the configuration data items for the CANopen slave device and the device information of the CANopen master device to the controller, so that the controller determines the mapping relationship between the user address space and the CANopen address space of the CANopen slave device according to the configuration data items for the CANopen slave device and the device information of the CANopen master device. The mapping relationship and the configuration data items for the CANopen slave device are sent by the controller to the CANopen master device for use when the CANopen master device interacts with the CANopen slave device.

[0006] In a possible implementation, the method further includes: generating modified data corresponding to the CANopen slave device in response to an operation triggered by the user through the LSS setting interface; Sending the modified data corresponding to the CANopen slave device to the controller, so that the controller sends the modified data corresponding to the CANopen slave device to the CANopen master device for use when the CANopen master device and the CANopen slave device perform data interaction.

[0007] In a possible implementation, the LSS setting interface includes a parameter type selection area and a parameter setting area; Correspondingly, generating the modified data corresponding to the CANopen slave device in response to an operation triggered by the user through the LSS setting interface includes: generating the modified data corresponding to the CANopen slave device according to the parameter type to be modified input by the user in the parameter type selection area and the parameter value input by the user in the parameter setting area.

[0008] In a possible implementation, the parameter type to be modified is the slave ID number; Correspondingly, the parameter value includes the current slave ID number of the CANopen slave device and the slave ID number to be set for the CANopen slave device.

[0009] In a possible implementation, the parameter type to be modified is the slave baud rate; Correspondingly, the parameter value includes the baud rate to be set for the CANopen slave device.

[0010] In a possible implementation, the LSS setting interface further includes a CANopen slave device selection area; Correspondingly, the parameter value further includes the channel number of the communication link to which the CANopen slave device is connected.

[0011] In a possible implementation, the LSS setting interface further includes a response display area; The method further includes: displaying the modified data received by the CANopen slave device in the response display area in response to the response information sent by the CANopen slave device according to the received modified data.

[0012] In a possible implementation, the LSS setting interface further includes an alarm area; The method further includes: judging whether the operation triggered by the user through the LSS setting interface is successfully executed according to the sent modified data corresponding to the CANopen slave device and the received modified data received by the CANopen slave device, and outputting an alarm message in the alarm area according to the judgment result.

[0013] In a possible implementation, the configuration data configuration interface includes a PDO configuration interface and an SDO configuration interface; In response to an operation triggered by the user through the configuration data configuration interface, configuration configuration data of the CANopen slave device is generated, including: in response to an operation triggered by the user in the PDO configuration interface, configuration configuration data of the PDO of the CANopen slave device is generated; in response to an operation triggered by the user in the SDO configuration interface, configuration configuration data of the SDO of the CANopen slave device is generated.

[0014] In a possible implementation, the SDO configuration interface includes one or more of a read SDO configuration sub-interface, a write SDO configuration sub-interface, and a parameter SDO configuration sub-interface; In response to an operation triggered by the user in the SDO configuration interface, configuration configuration data of the SDO of the CANopen slave device is generated, including: In response to an operation triggered by the user in the read SDO configuration sub-interface, configuration configuration data of the read SDO of the CANopen slave device is generated, and / or, In response to an operation triggered by the user in the write SDO configuration sub-interface, configuration configuration data of the write SDO of the CANopen slave device is generated, and / or, In response to an operation triggered by the user in the parameter SDO configuration sub-interface, configuration configuration data of the parameter SDO of the CANopen slave device is generated.

[0015] In a second aspect, an embodiment of the present application further provides a control method for a communication system, which is applied to a controller. The method includes: According to the configuration configuration data items of the CANopen slave device and the device information of the CANopen master device sent by the host computer, determine the mapping relationship between the user address space and the CANopen address space of the CANopen slave device; Send the mapping relationship and the configuration configuration data items of the CANopen slave device to the CANopen master device, so that the CANopen master device performs data interaction with the CANopen slave device based on the mapping relationship and the configuration configuration data items of the CANopen slave device.

[0016] In a third aspect, the present application further provides a communication system, including a host computer, a controller, and a CANopen master device; The master computer is used to connect the CANopen slave device to the CAN communication link of the CANopen master device according to the obtained device information of the CANopen slave device and the device information of the CANopen master device; generate a configuration data configuration interface according to the device information of the CANopen slave device, and in response to an operation triggered by the user through the configuration data configuration interface, generate configuration configuration data items of the CANopen slave device. The configuration configuration data items of the CANopen slave device include one or more of the configuration configuration data items of the process data object PDO and the configuration configuration data items of the maintenance data object SDO; send the configuration configuration data items of the CANopen slave device and the device information of the CANopen master device to the controller; The controller is used to determine the mapping relationship between the user address space and the CANopen address space of the CANopen slave device according to the configuration configuration data items of the CANopen slave device and the device information of the CANopen master device, and send the mapping relationship and the configuration configuration data items of the CANopen slave device to the CANopen master device; The CANopen master device is used to perform data interaction with the CANopen slave device based on the mapping relationship and the configuration configuration data items of the CANopen slave device.

[0017] The control method, system, device and storage medium of the communication system provided by the embodiments of the present application include connecting the CANopen slave device to the CAN communication link of the CANopen master device according to the obtained device information of the CANopen slave device and the device information of the CANopen master device; generating a configuration data configuration interface according to the device information of the CANopen slave device, and in response to an operation triggered by the user through the configuration data configuration interface, generating configuration configuration data items of the CANopen slave device. The configuration configuration data items of the CANopen slave device include one or more of the configuration configuration data items of the PDO and the configuration configuration data items of the SDO; sending the configuration configuration data items of the CANopen slave device and the device information of the CANopen master device to the controller, so that the controller determines the mapping relationship between the user address space and the CANopen address space of the CANopen slave device according to the configuration configuration data items of the CANopen slave device and the device information of the CANopen master device. The mapping relationship and the configuration configuration data items of the CANopen slave device are sent by the controller to the CANopen master device for use when the CANopen master device performs data interaction with the CANopen slave device. Based on the configuration data configuration interface, the method realizes the visual configuration of PDO and SDO, is simple and convenient to operate, can effectively reduce the operation difficulty, and improves the user experience.

[0018] Other features and advantages of the present application will be set forth in the following description, and in part will be obvious from the description, or can be learned by implementing the present application. Other advantages of the present application can be realized and obtained by the solutions described in the description and the drawings. Description of the Drawings

[0019] The drawings are used to provide an understanding of the technical solutions of the present application, and constitute a part of the description. Together with the embodiments of the present application, they are used to explain the technical solutions of the present application, and do not constitute a limitation to the technical solutions of the present application.

[0020] Figure 1 Schematic diagram of an application scenario of a control method for a communication system provided by an embodiment of the present application; Figure 2 Schematic flow chart of a control method for a communication system provided by an embodiment of the present application; Figure 3 Schematic diagram of a PDO configuration interface provided by an embodiment of the present application; Figure 4 Schematic diagram of a write SDO configuration interface provided by an embodiment of the present application; Figure 5 Schematic diagram of a read SDO configuration interface provided by an embodiment of the present application; Figure 6 Schematic diagram of a parameter SDO configuration interface provided by an embodiment of the present application; Figure 7 Schematic diagram of an LSS setting interface provided by an embodiment of the present application; Figure 8 Schematic flow chart of another control method for a communication system provided by an embodiment of the present application; Figure 9 Schematic diagram of a working process of a communication system provided by an embodiment of the present application. Detailed Embodiments

[0021] The present application describes multiple embodiments, but the description is exemplary, not restrictive, and it is obvious to those of ordinary skill in the art that there can be more embodiments and implementation solutions within the scope of the embodiments described in the present application. Although many possible feature combinations are shown in the drawings and discussed in the detailed embodiments, many other combination ways of the disclosed features are also possible. Unless specifically restricted, any feature or element of any embodiment can be combined with any other feature or element in any other embodiment, or can replace any other feature or element in any other embodiment.

[0022] This application includes and contemplates combinations with features and elements known to those of ordinary skill in the art. The disclosed embodiments, features, and elements of this application may also be combined with any conventional features or elements to form a unique inventive solution. Any feature or element of any embodiment may also be combined with features or elements from other inventive solutions to form another unique inventive solution. Therefore, it should be understood that any feature shown and / or discussed in this application may be implemented alone or in any suitable combination. Accordingly, the embodiments are not limited except as defined by the appended claims and their equivalents. In addition, various modifications and changes may be made within the scope of the appended claims.

[0023] In addition, in describing representative embodiments, the specification may have presented the method and / or process as a particular sequence of steps. However, to the extent that the method or process does not depend on a particular order of the steps herein, the method or process should not be limited to the particular order of steps. As will be understood by those of ordinary skill in the art, other sequences of steps are possible. Therefore, the particular order of steps set forth in the specification should not be construed as a limitation on the claims. In addition, the claims directed to the method and / or process should not be limited to performing their steps in the order written, as those skilled in the art can readily understand that such order can vary and still remain within the spirit and scope of the embodiments of this application.

[0024] In an existing implementation method of CANopen communication, the host computer downloads configuration information into a Programmable Logic Controller (PLC), and the PLC transmits the configuration information to the CANopen master device communication module through a Bus Low Voltage Differential Signaling (BLVDS) bus. This method solves the problem of incompatibility between the BLVDS bus and CANopen slave devices, and realizes the communication and control of various CANopen slave devices through the BLVDS bus. This method realizes the process data object (PDO) data communication between the CANopen master device and the slave, and parameter configuration with the service data object (SDO), but does not realize the periodic data reading and writing of the SDO and the online setting of the node ID and baud rate of the slave device by the LSS.

[0025] In another existing implementation method of CANopen communication, the motor driver includes a power circuit board and a control circuit board connected to each other. The control circuit board includes a CAN peripheral interface and a dual-core microcontroller (MCU) chip connected to each other. The dual-core MCU chip includes an Arm core and a Digital Signal Processor (DSP) core connected to each other. The Arm core is connected to the CAN peripheral interface, and a Random Access Memory (RAM) chip for storing a batch of SDO request queues is built in the Arm core. This utility model has the advantages of simple structure and the ability to store SDO request queues to avoid loss of SDO requests. However, this method only implements a CANopen slave device, and does not implement PDO process data communication nor CANopen master device communication.

[0026] There is also a method in the prior art for transmitting data between a first automation device such as a Personal Computer (PC) or a central control device and at least one second automation device such as a field device via a CANopen bus in the case of using service data objects as SDO services. This method realizes the transmission of SDO data of the CANopen protocol between automation devices, but there is no visual configuration interface for SDO and the function is single.

[0027] To solve the problems existing in the prior art, an embodiment of the present application provides a control method for a communication system, which is applied to a Figure 1 scene as shown. In this scene, it includes a host computer, a controller, a CANopen master device, and at least one CANopen slave device, where a Human Interface (UI) is set on the host computer.

[0028] Figure 2 It is a schematic flowchart of a control method for a communication system provided by an embodiment of the present application. This method is applied to the Figure 1 host computer in the scene shown, and this method includes: S201. According to the obtained device information of the CANopen slave device and the device information of the CANopen master device, connect the CANopen slave device to the CAN communication link of the CANopen master device.

[0029] Optionally, the device information of the CANopen slave device includes a description file (Electronic Data Sheet, EDS) of the CANopen slave device, and the EDS includes detailed information of object dictionaries such as PDO and SDO.

[0030] The device information of the CANopen master device includes parameters such as baud rate, synchronization period, and heartbeat period.

[0031] The CANopen master device includes at least one CAN communication link, and the CAN communication link can be a high-speed CAN or a low-speed CAN. Exemplarily, the baud rate range of the low-speed CAN is 10~125 Kbps, and the available values are: 10 kbps, 20 kbps, 50 kbps, 100 kbps, 125 kbps; the baud rate range of the high-speed CAN is 125 Kbps~1 Mbps, and the available values are: 125 kbps, 250 kbps, 500 kbps, 800 kbps, 1000 kbps.

[0032] Optionally, before step S201, it also includes obtaining the device information of the CANopen slave device and the device information of the CANopen master device.

[0033] Exemplarily, the user can input the device information of the CANopen slave device and / or the device information of the CANopen master device through the human-machine interaction interface, or import the device information of the CANopen slave device and / or the device information of the CANopen master device in the storage medium or other devices into the upper computer through the interaction interface.

[0034] S202. Generate a configuration data configuration interface according to the device information of the CANopen slave device, and generate a configuration configuration data item of the CANopen slave device in response to an operation triggered by the user through the configuration data configuration interface.

[0035] Among them, the configuration configuration data item of the CANopen slave device includes one or more of the configuration configuration data items of PDO and the configuration configuration data items of SDO.

[0036] The configuration data configuration interface is a human-machine interaction interface, and the user can trigger operations in ways such as clicking, sliding, and clicking and sliding combinations; the user can trigger operations through external devices such as a mouse and a keyboard, or can also trigger operations by touching; the user can also trigger operations by voice input, and there is no specific limitation. Exemplarily, the configuration data configuration interface is implemented by configuration software such as bytemind, and the user can directly input PDO or SDO in the EDS of the CANopen slave device to be configured, or can also select PDO or SDO in the EDS of the CANopen slave device to be configured by checking.

[0037] Among them, the configuration data configuration interface generated according to the device information of the CANopen slave device can be a configuration data configuration interface directly displaying the device information of the CANopen slave device. Then, the user can generate the configuration data items of the CANopen slave device by performing selection operations such as ticking on the configuration data configuration interface. Through this method, the user can intuitively perceive the device information of the current CANopen slave device, reducing the user operation difficulty and improving the user operation efficiency. The configuration data configuration interface generated according to the device information of the CANopen slave device can also be using the device information of the CANopen slave device as the database corresponding to a certain control on the configuration data configuration interface. Then, the user can call the device information of the CANopen slave device by clicking on the corresponding control, perform selection operations such as ticking on the called device information of the CANopen slave device, and generate the configuration data items of the CANopen slave device. Through this method, the interface display content can be simplified and the user visual experience can be improved. It can be understood that these two implementation methods can also exist simultaneously, without restrictions on comparison. Through this method, the user needs can be met to a greater extent and the user experience can be improved.

[0038] In a possible implementation, the configuration data configuration interface includes a PDO configuration interface and an SDO configuration interface.

[0039] Correspondingly, generating a configuration data configuration interface according to the device information of the CANopen slave device includes: generating a PDO configuration interface according to the information related to PDO in the device information of the CANopen slave device; generating an SDO configuration interface according to the information related to SDO in the device information of the CANopen slave device.

[0040] Correspondingly, in response to the operation triggered by the user through the configuration data configuration interface, generating the configuration data items of the CANopen slave device includes: in response to the operation triggered by the user on the PDO configuration interface, generating the configuration data items of the PDO of the CANopen slave device; in response to the operation triggered by the user on the SDO configuration interface, generating the configuration data items of the SDO of the CANopen slave device.

[0041] The configuration data items of the PDO can include the configuration data items of the Transmit Process Data Object (TPDO) and the configuration data items of the Receive Process Data Object (RPDO).

[0042] Optionally, the PDO configuration interface may include a TPDO configuration area and / or an RPDO configuration area, which may be specifically determined according to the actual situation of the CANopen slave device. The user can determine the configuration data items of the TPDO by operating the TPDO configuration area according to the actual situation of the CANopen slave device, and / or determine the configuration data items of the RPDO by operating the RPDO configuration area.

[0043] Figure 3 FIG. 4 is a schematic diagram of a PDO configuration interface provided by an embodiment of the present application. Figure 3 The shown PDO configuration interface directly displays the device information of the CANopen slave device, such as Figure 3 As shown, both the TPDO configuration area and the RPDO configuration area include "Name", "Index", "Sub-Index", and "Bit Length". Figure 3 The device information of the shown CANopen slave device only includes data related to the RPDO. In Figure 3 the shown RPDO configuration area, the user checks two RPDOs, namely "ReceivePDO1" and "Receive PDO2", and then configures "Receive PDO1" and "Receive PDO2" to generate the configuration data items of the RPDO. Among them, the address of "Receive PDO1" in the object dictionary is "0x1400"; the address of "Receive PDO2" in the object dictionary is "0x1401". It can be understood that when the device information of the CANopen slave device includes data related to the TPDO, the data related to the TPDO in the device information of the CANopen slave device will be displayed in the TPDO configuration area.

[0044] Through the visual and simple PDO configuration interface, the user can easily learn about the PDOs available for configuration. By simple selection operations, the user can determine the configuration data items of the PDO, and then the user can read and write the PDO data of the CANopen slave periodically, which is convenient for the user to collect the process data of the CANopen slave with high real-time requirements. This method can simplify the user operation process and improve the user experience.

[0045] The configuration data items of the SDO may include the configuration data items for writing the SDO and the configuration data items for reading the SDO.

[0046] Optionally, the SDO configuration interface may include a write SDO configuration interface and / or a read SDO configuration interface. The user determines the configuration data items for writing the SDO by operating the write SDO configuration interface and determines the configuration data items for reading the SDO by operating the read SDO configuration interface.

[0047] Optionally, to further enhance the user experience, the SDO configuration interface may further include a parameter SDO configuration interface. Figure 4 FIG. is a schematic diagram of a write SDO configuration interface provided by an embodiment of the present application. Figure 5 FIG. is a schematic diagram of a read SDO configuration interface provided by an embodiment of the present application. Figure 6 FIG. is a schematic diagram of a parameter SDO configuration interface provided by an embodiment of the present application. Figure 4 、 Figure 5 and Figure 6 The configuration interfaces shown are databases corresponding to the "Add" control on the configuration data interface with the device information of the CANopen slave device. The user clicks "Add" to call the SDO-related data in the device information of the CANopen slave device, and then selects the required data from the called data by clicking and checking.

[0048] It can be understood that the operations triggered by the user through the write SDO configuration interface, the read SDO configuration interface, and the parameter SDO configuration interface can call the same database, such as a database including all SDO-related data in the device information of the CANopen slave device. The operations triggered by the user through the write SDO configuration interface, the read SDO configuration interface, and the parameter SDO configuration interface can also call different databases. For example, the user calls a database including only the writable SDO in the device information of the CANopen slave device through the write SDO configuration interface; the operations triggered by the user through the read SDO configuration interface and the parameter SDO configuration interface call a database including only the readable SDO in the device information of the CANopen slave device; the operation triggered by the user through the parameter SDO configuration interface calls a database including only the parameter SDO in the device information of the CANopen slave device.

[0049] Exemplarily, as Figure 4 shown, the write SDO configuration interface includes an operation area and a display area; the operation area includes multiple controls, namely "Add", "Delete", "Move Up", and "Move Down"; the user can realize the addition, deletion of the writable SDO to be configured, or adjust its display order in the display area by operating the corresponding controls in the operation area. The display area includes multiple data items, namely "Serial Number", "Index", "Sub-Index", "Name", "Data Type", and "M Area Byte Offset", where the M area corresponds to the M area in the user address space. In Figure 4 the write SDO configuration interface shown, the user configures the writable SDO with indexes from 0x2405 to 0x2408.

[0050] Exemplarily, as Figure 5As shown in the figure, the read SDO configuration interface includes an operation area and a display area; the operation area includes multiple controls, namely "Add", "Delete", "Move Up", and "Move Down"; by operating the corresponding controls in the operation area, the user can add or delete the read SDOs to be configured, or adjust their display order in the display area. The display area includes multiple data items, namely "Serial Number", "Index", "Sub-Index", "Name", "Data Type", and "M Area Byte Offset". In Figure 5 the read SDO configuration interface shown, the user configures read SDOs with indexes from 0x2401 to 0x2404.

[0051] Exemplarily, as Figure 6 shown, the parameter SDO configuration interface includes an operation area and a display area; the operation area includes multiple controls, namely "Add", "Delete", "Move Up", and "Move Down"; by operating the corresponding controls in the operation area, the user can add or delete the parameter SDOs to be configured, or adjust their display order in the display area. The display area includes multiple data items, namely "Serial Number", "Index", "Sub-Index", "Name", "Set Value", and "Data Type". In Figure 6 the parameter SDO configuration interface shown, the user configures the initialization parameter SDO with an index of 0x2400.

[0052] In the prior art, users usually need to generate the configuration of SDOs by writing code. This method is not only cumbersome to operate but also requires users to have a certain programming ability. In this application, users only need to operate the visual and simple SDO configuration interface to determine the configuration data items of SDOs, and then realize the periodic reading and writing of SDO data of CANopen slave devices. This method not only has no limit on the number of read and written SDOs but also facilitates users to monitor a large amount of maintenance data of CANopen slave devices.

[0053] S203. Send the configuration data items of the CANopen slave device and the device information of the CANopen master device to the controller, so that the controller determines the mapping relationship between the user address space and the CANopen address space of the CANopen slave device according to the configuration data items of the CANopen slave device and the device information of the CANopen master device. The mapping relationship and the configuration data items of the CANopen slave device are sent by the controller to the CANopen master device for use when the CANopen master device interacts with the CANopen slave device for data.

[0054] The control method of the communication system provided by this application includes connecting the CANopen slave device to the CAN communication link of the CANopen master device according to the obtained device information of the CANopen slave device and the device information of the CANopen master device; generating a configuration data configuration interface according to the device information of the CANopen slave device, and generating a configuration configuration data item of the CANopen slave device in response to an operation triggered by the user through the configuration data configuration interface. The configuration configuration data item of the CANopen slave device includes one or more of the configuration configuration data items of the PDO and the configuration configuration data items of the SDO; sending the configuration configuration data item of the CANopen slave device and the device information of the CANopen master device to the controller, so that the controller determines the mapping relationship between the user address space and the CANopen address space of the CANopen slave device according to the configuration configuration data item of the CANopen slave device and the device information of the CANopen master device. The mapping relationship and the configuration configuration data item of the CANopen slave device are sent by the controller to the CANopen master device for use when the CANopen master device interacts with the CANopen slave device. Based on the configuration data configuration interface, this method realizes the visual configuration of the PDO and the SDO, is simple and convenient to operate, can effectively reduce the operation difficulty, and improves the user experience.

[0055] Further, the method further includes: generating modified data corresponding to the CANopen slave device in response to an operation triggered by the user through the Layer Setting Services (LSS) setting interface; sending the modified data corresponding to the CANopen slave device to the controller, so that the controller sends the modified data corresponding to the CANopen slave device to the CANopen master device for use when the CANopen master device interacts with the CANopen slave device.

[0056] The LSS setting interface is a human-computer interaction interface. The user can directly trigger operations by clicking, swiping, clicking and swiping combinations, etc.; the user can trigger operations through external devices such as a mouse and a keyboard, or can also trigger operations by touching; the user can also trigger operations by voice input, and there is no specific limitation.

[0057] Optionally, the LSS setting interface includes a parameter type selection area and a parameter setting area.

[0058] Correspondingly, in response to an operation triggered by a user through the Layer Setting Service (LSS) setting interface, modification data for CANopen slave device parameters is generated, including: modification data corresponding to the CANopen slave device is generated according to the parameter type to be modified input by the user in the parameter type selection area and the parameter value input by the user in the parameter setting area.

[0059] Figure 7 FIG. is a schematic diagram of an LSS setting interface provided by an embodiment of the present application. As Figure 7 shown, the LSS setting interface includes a parameter type selection area and a parameter setting area. The user can input the parameter type to be modified in the parameter type selection area and input the corresponding parameter value in the parameter setting area to generate modification data corresponding to the CANopen slave device.

[0060] Based on the characteristics of CANopen, optionally, generating modification data corresponding to the CANopen slave device according to the parameter type to be modified input by the user in the parameter type selection area and the parameter value input by the user in the parameter setting area includes: generating modification data corresponding to the CANopen slave device according to the parameter type to be modified input by the user in the parameter type selection area, the parameter value input by the user in the parameter setting area, and the attribute information of the CANopen master device.

[0061] Exemplarily, referring to Figure 7 , the attribute information of the CANopen master device may include "point name", and further may include "point description", "area", and "station number". Among them, "point name" indicates which CANopen slave device corresponding to which CANopen master corresponding to which controller is specified to be set in the current LSS setting interface, and is used to indicate the setting object for the user; "point description" is a simple description of the meaning of the point name; "area" refers to the area where the controller is located, such as a certain factory; "station number" refers to the number of the controller. The attribute information of the CANopen master device can be input by the user through the LSS setting interface or can be inherent configuration information.

[0062] Optionally, the parameter type to be modified is the slave identity (ID) number.

[0063] Correspondingly, the parameter value includes the current slave ID number of the CANopen slave device and the slave ID number to be set for the CANopen slave device.

[0064] In the prior art, a user needs to modify the slave ID number of a CANopen slave device on the CANopen slave device. When the CANopen slave device is in a special situation such as a harsh environment, which causes the user to be unable to obtain the CANopen slave device in a timely manner, the user will be unable to modify the slave ID number of the CANopen slave device. By using the method provided in this application, the user can operate the visual LSS setting interface to modify the slave ID number of the CANopen slave device online, achieving remote modification, thereby reducing the modification difficulty, improving the modification efficiency and the user experience.

[0065] Exemplarily, referring to Figure 7 ,"Original slave address" corresponds to the current slave ID number of the CANopen slave device, and "Target slave address" corresponds to the slave ID number to be set for the CANopen slave device. The user can set the current slave ID number of the CANopen slave device by modifying the "Original slave address", and set the slave ID number to be set for the CANopen slave device by modifying the "Target slave address".

[0066] Optionally, the parameter type to be modified is the slave baud rate.

[0067] Correspondingly, the parameter value includes the baud rate to be set for the CANopen slave device.

[0068] Exemplarily, referring to Figure 7 the user can set the baud rate to be set for the CANopen slave device by modifying the target baud rate.

[0069] Exemplarily, referring to Figure 7 the control word device code corresponds to the parameter type selection area, and the user can select the parameter type to be modified as the slave ID number or the slave baud rate by modifying the control word device code.

[0070] In the prior art, a user needs to modify the baud rate of a CANopen slave device on the CANopen slave device. When the CANopen slave device is in a special situation such as a harsh environment, which causes the user to be unable to obtain the CANopen slave device in a timely manner, by using the method provided in this application, the user can operate the visual LSS setting interface to modify the baud rate of the CANopen slave device online, achieving remote modification, thereby reducing the modification difficulty, improving the modification efficiency and the user experience.

[0071] Optionally, the LSS setting interface further includes a CANopen slave device selection area.

[0072] Correspondingly, the parameter value further includes the channel number of the communication link to which the CANopen slave device is connected.

[0073] Through this method, it is possible to modify the parameters of a single CANopen slave device.

[0074] Exemplarily, refer to Figure 7 , where the channel number corresponds to the channel number of the communication link to which the CANopen slave device is connected. The user can set the channel number of the communication link to which the CANopen slave device is connected by modifying the channel number.

[0075] Optionally, the LSS setting interface further includes a response display area.

[0076] This method further includes: in response to the response message sent by the CANopen slave device according to the received modification data, displaying the modification data received by the CANopen slave device in the response display area.

[0077] Exemplarily, refer to Figure 7 , where the command code in the response display area is used to display the type of parameter to be modified, the channel number is used to display the channel number received by the CANopen slave device, the original slave device is used to display the original slave address received by the CANopen slave device, the target slave address is used to display the target slave address received by the CANopen slave device, and the target baud rate is used to display the baud rate to be set received by the CANopen slave device.

[0078] Through this method, the data visibility can be improved, enabling the user to intuitively obtain the data and enhancing the user experience.

[0079] Optionally, the LSS setting interface further includes an alarm area; This method further includes: judging whether the operation triggered by the user through the layer setting service LSS setting interface is successfully executed according to the modification data corresponding to the sent CANopen slave device and the modification data received by the CANopen slave device, and outputting an alarm message in the alarm area according to the judgment result.

[0080] Exemplarily, refer to Figure 7 , where the error type on the LSS setting interface corresponds to the alarm area and is used to display the alarm message. Refer to Table 1 for the alarm message: Table 1 Alarm Messages and Their Meanings Through this method, the visualization of the alarm message can be achieved, enabling the user to promptly grasp the execution status of the operation instruction and enhancing the user experience.

[0081] Optionally, for the convenience of developers' maintenance and operation, the LSS setting interface may further include a display switching area.

[0082] Refer to Figure 7, the user can switch the information displayed on the LSS setting interface to the item name in the code by selecting the control "Display Item Name".

[0083] For the convenience of users, the configuration data configuration interface and the LSS setting interface may also include corresponding title bars.

[0084] Figure 8 It is a schematic flow chart of another control method for a communication system provided by an embodiment of the present application, which is applied to a controller, such as Figure 8 As shown, the method includes: S801. Determine the mapping relationship between the user address space and the CANopen address space of the CANopen slave device according to the configuration data items of the CANopen slave device and the device information of the CANopen master device sent by the host computer.

[0085] The controller includes but is not limited to PLC, programmable PC, distributed control system (DCS), and programmable logic development board.

[0086] The host computer and the controller can communicate through a data bus, and the data bus includes but is not limited to profibusdp, rs485, modubus, and backplane bus.

[0087] The user address space includes but is not limited to the I area, Q area, M area, and G area.

[0088] For the convenience of understanding, the present application also provides a mapping relationship table between the user address space and the CANopen address space of the CANopen slave device, as shown in Table 2 specifically: Table 2 Mapping Relationship Table between User Address Space and CANopen Address Space of CANopen Slave Device S802. Send the mapping relationship to the CANopen master device so that the CANopen master device can perform data interaction with the CANopen slave device based on the mapping relationship and the configuration data items of the CANopen slave device.

[0089] The present application also provides a communication system, including a host computer, a controller, and a CANopen master device.

[0090] The host computer is used to connect the CANopen slave device to the CAN communication link of the CANopen master device according to the device information of the acquired CANopen slave device and the device information of the CANopen master device; generate a configuration data configuration interface according to the device information of the CANopen slave device, and in response to an operation triggered by the user through the configuration data configuration interface, generate configuration configuration data items of the CANopen slave device. The configuration configuration data items of the CANopen slave device include one or more of the configuration configuration data items of the process data object PDO and the configuration configuration data items of the maintenance data object SDO; send the configuration configuration data items of the CANopen slave device and the device information of the CANopen master device to the controller.

[0091] The controller is used to determine the mapping relationship between the user address space and the CANopen address space of the CANopen slave device according to the configuration configuration data items of the CANopen slave device and the device information of the CANopen master device, and send the mapping relationship and the configuration configuration data items of the CANopen slave device to the CANopen master device.

[0092] Figure 9 It is a schematic diagram of the working process of a communication system provided by an embodiment of the present application. As Figure 9 shown, exemplarily, the controller analyzes the configuration configuration data items of the CANopen slave device and the device information of the CANopen master device to complete the creation of the mapping relationship between the user address space and the CANopen address space of the CANopen slave device.

[0093] The CANopen master device is used to perform data interaction with the CANopen slave device based on the mapping relationship and the configuration configuration data items of the CANopen slave device.

[0094] Exemplarily, referring to Figure 9 , the CANopen master device initializes the parameter SDO according to the transmitted configuration configuration data items of the CANopen slave device, starts the task cycle to read and write PDO and SDO, caches the data into the PDO and SDO data caches of CANopen, and transmits it to the controller through the data bus. The controller maps the CANopen data to the user address space for consumption by other modules.

[0095] Further, referring to Figure 9 , the user can set the node ID number and baud rate of the CANopen slave device under the CAN communication link of the CANopen master module through the LSS setting interface.

[0096] The present application also provides an electronic device, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus; The memory is used to store a computer program; The processor is configured to implement any of the methods provided in the above method embodiments when executing the program stored on the memory.

[0097] The present application also provides a computer-readable storage medium. A computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the methods provided in the above method embodiments is implemented.

[0098] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, and appropriate combinations thereof. In the hardware implementation, the division between the functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be executed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a transitory medium). As is well known to those of ordinary skill in the art, the term "computer storage medium" includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, a communication medium generally contains computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

[0099] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present application. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present application.

Claims

1. A control method for a communication system, characterized in that, Applied to the host computer, the method includes: According to the device information of the CANopen slave device and the device information of the CANopen master device obtained, connect the CANopen slave device to the CAN communication link of the CANopen master device; Generate a configuration data configuration interface according to the device information of the CANopen slave device, and in response to an operation triggered by the user through the configuration data configuration interface, generate configuration configuration data items of the CANopen slave device, and the configuration configuration data items of the CANopen slave device include one or more of the configuration configuration data items of the PDO and the configuration configuration data items of the SDO; Send the configuration configuration data items of the CANopen slave device and the device information of the CANopen master device to the controller, so that the controller determines the mapping relationship between the user address space and the CANopen address space of the CANopen slave device according to the configuration configuration data items of the CANopen slave device and the device information of the CANopen master device, and the mapping relationship and the configuration configuration data items of the CANopen slave device are sent by the controller to the CANopen master device for use when the CANopen master device performs data interaction with the CANopen slave device.

2. The method according to claim 1, wherein The method further includes: In response to an operation triggered by the user through the LSS setting interface, generate modification data corresponding to the CANopen slave device; Send the modification data corresponding to the CANopen slave device to the controller, so that the controller sends the modification data corresponding to the CANopen slave device to the CANopen master device for use when the CANopen master device performs data interaction with the CANopen slave device.

3. The method according to claim 2, wherein The LSS setting interface includes a parameter type selection area and a parameter setting area; The generating, in response to an operation triggered by the user through the LSS setting interface, modification data corresponding to the CANopen slave device includes: Generate the modification data corresponding to the CANopen slave device according to the parameter type to be modified input by the user in the parameter type selection area and the parameter value input by the user in the parameter setting area.

4. The method according to claim 3, characterized in that, The parameter type to be modified is the slave ID number; The parameter value includes the current slave ID number of the CANopen slave device and the slave ID number to be set for the CANopen slave device.

5. The method according to claim 3, characterized in that, The parameter type to be modified is the slave baud rate; The parameter value includes the baud rate to be set for the CANopen slave device.

6. The method according to claim 4 or 5, characterized in that, The LSS setting interface further includes a CANopen slave device selection area; The parameter value further includes the channel number of the communication link to which the CANopen slave device is connected.

7. The method according to any one of claims 3-5, characterized in that The LSS setting interface further includes a response display area; The method further includes: In response to the response information sent by the CANopen slave device according to the received modified data, display the modified data received by the CANopen slave device in the response display area.

8. The method according to any one of claims 3 to 5, characterized in that, The LSS setting interface further includes an alarm area; The method further includes: Based on the modified data corresponding to the CANopen slave device sent and the modified data received by the CANopen slave device, determine whether the operation triggered by the user through the LSS setting interface is successfully executed, and output an alarm message in the alarm area according to the determination result.

9. The method according to any one of claims 1-5, characterized in that, The configuration data configuration interface includes a PDO configuration interface and an SDO configuration interface; The generation of the configuration data of the CANopen slave device in response to the operation triggered by the user through the configuration data configuration interface includes: In response to the operation triggered by the user in the PDO configuration interface, generate the configuration data of the PDO of the CANopen slave device; In response to the operation triggered by the user in the SDO configuration interface, generate the configuration data of the SDO of the CANopen slave device.

10. The method according to claim 9, wherein The SDO configuration interface includes one or more of a read SDO configuration sub-interface, a write SDO configuration sub-interface, and a parameter SDO configuration sub-interface; The generation of the configuration data of the SDO of the CANopen slave device in response to the operation triggered by the user in the SDO configuration interface includes: In response to the operation triggered by the user in the read SDO configuration sub-interface, generate the configuration data of the read SDO of the CANopen slave device, and / or, In response to the operation triggered by the user in the write SDO configuration sub-interface, generate the configuration data of the write SDO of the CANopen slave device, and / or, In response to the operation triggered by the user in the parameter SDO configuration sub-interface, generate the configuration data of the parameter SDO of the CANopen slave device.

11. A control method for a communication system, characterized in that, Applied to a controller, the method includes: Based on the configuration data items of the CANopen slave device sent by the host computer and the device information of the CANopen master device, determine the mapping relationship between the user address space and the CANopen address space of the CANopen slave device; Send the mapping relationship and the configuration data items of the CANopen slave device to the CANopen master device, so that the CANopen master device performs data interaction with the CANopen slave device based on the mapping relationship and the configuration data items of the CANopen slave device.

12. A communication system, characterized in that, Including a host computer, a controller, and a CANopen master device; The master computer is configured to connect the CANopen slave device to the CAN communication link of the CANopen master device according to the obtained device information of the CANopen slave device and the device information of the CANopen master device; generate a configuration data configuration interface based on the device information of the CANopen slave device, and in response to an operation triggered by the user through the configuration data configuration interface, generate configuration configuration data items of the CANopen slave device, where the configuration configuration data items of the CANopen slave device include one or more of the configuration configuration data items of PDO and the configuration configuration data items of SDO; and send the configuration configuration data items of the CANopen slave device and the device information of the CANopen master device to the controller. The controller is configured to determine the mapping relationship between the user address space and the CANopen address space of the CANopen slave device according to the configuration configuration data items of the CANopen slave device and the device information of the CANopen master device, and send the mapping relationship and the configuration configuration data items of the CANopen slave device to the CANopen master device. The CANopen master device is configured to perform data interaction with the CANopen slave device based on the mapping relationship and the configuration configuration data items of the CANopen slave device.

13. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus. The memory is used to store computer programs. The processor is configured to implement the method according to any one of claims 1-11 when executing the program stored on the memory.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1-11 is implemented.

Citation Information

Patent Citations

  • Control system and method based on EtherCAT bus and used for industrial robot

    CN108942932A

  • Distributed IO module based on CANopen bus, configuration optimization method of distributed IO module, equipment and medium

    CN114924503A

  • Equipment control method and device, terminal equipment and storage medium

    CN115373354A

  • Robot control method, system and equipment and storage medium

    CN118181293A