IO module range visualization configuration method and system based on CAN bus
Through the IO module range visual configuration method based on EDS file format and SDO communication mechanism, the problems of configuration process abnormalities and data writing uncertainty in the existing technology are solved, and the user-friendly configuration interface and data consistency are realized, which is suitable for multiple Industrial automation scenario.
Patent Information
- Application Number
- CN202411038878.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-07-31
AI Technical Summary
The existing CAN bus-based range configuration method lacks visual configuration capabilities, cannot ensure the success and correctness of data writing, and there is no fallback mechanism, which makes it difficult to locate and recover problems when configuration process is abnormal.
Adopt the IO module range visual configuration method based on EDS file format, and displays communication data in real time through the SDO communication mechanism. A new SDO read and write protocol is added to ensure data accuracy and consistency, and automatically read back and comparison after writing is completed to provide users with Friendly configuration interface and flexible data management.
Improves the ease of use and visualization of configuration, ensures the correctness and consistency of data writing, provides real-time feedback and exception handling mechanisms, reduces downtime, and is suitable for a variety of IO module range types.
Smart Images

Figure CN118612095B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial control automation, and in particular to a method and system for visually configuring an IO module range based on a CAN bus. Background Art
[0002] Most of the existing range configuration methods based on CAN bus are implemented through CAN test software such as CANTest, which sends the configuration data to the receiver, which automatically receives and stores it. However, this method has the following problems: 1. It does not have visual configuration capabilities. When the configuration process is abnormal, such as the receiving device crashes, there is no problem location capability; 2. It cannot ensure whether the sent data is successfully written and whether the written data is correct. 3. The receiver is forced to save all data that is allowed to be saved, and there is no fallback mechanism. Summary of the invention
[0003] The purpose of the present invention is to provide a method and system for visual configuration of IO module range based on CAN bus, which provides the ability to troubleshoot problems when an abnormality occurs in the configuration process, can ensure the correctness and consistency of the sent data, and users can freely save and write data. The above functions significantly improve the ease of use and visualization of the configuration.
[0004] The present invention provides a CAN bus-based IO module range visualization configuration method, comprising:
[0005] Write the configuration file according to the EDS file format and initialize the IO module range;
[0006] Read multiple versions of EDS file data and display them in different pages, obtain all range information and display them on the interface through the communication mechanism of service data object SDO;
[0007] Determine whether to wait for the user operation to be executed, trigger the corresponding instruction according to the user operation, obtain the selected SDO item information in sequence, compose the SDO message and send it to the IO module, and determine the completion of writing / reading the corresponding range to save the SDO message by receiving feedback;
[0008] When an abnormal situation occurs during the configuration process, the communication data is displayed in real time on the configuration interface to locate and debug the abnormality, and it is determined whether the communication data can accurately execute the corresponding user operation. The newly added SDO read and write protocol ensures that the corresponding operation instructions are correctly received;
[0009] A write instruction is sent to the IO module through the host computer. When the communication data is written successfully, it is determined whether it is a read operation after successful writing. When performing a read operation after successful writing, SDO is automatically written in batches and a read-back comparison is performed to ensure write consistency; wherein, the user operation includes write, read and save operations.
[0010] Preferably, the step of determining the completion of writing / reading the corresponding range to save the SDO message by receiving feedback further comprises:
[0011] Get the read value of the message, select the calculation formula according to the data type, and display the calculated value;
[0012] The written value is obtained and calculated according to the data type selection formula, and then a message is formed and sent, thereby converting the read value and the written value of the message;
[0013] If no reply is received within the preset time after the SDO message is sent, the retransmission mechanism is triggered, and the current behavior is terminated after the retransmission operation reaches the set number of times;
[0014] After writing is completed, the readback operation is triggered, the written range is read and displayed in the read value column, and compared with the written value of the corresponding row, and the different rows are highlighted.
[0015] Preferably, determining the completion of writing / reading the corresponding range to save the SDO message by receiving feedback includes:
[0016] When waiting for a write instruction, the write operation is triggered to confirm whether the target range receives a reply when executing the write operation. At the same time, when waiting for a read instruction, the read operation is triggered to confirm whether the target range receives a reply when executing the read operation.
[0017] When a reply notification is received, it indicates that the target range has completed the writing operation or the reading operation;
[0018] Jump from the selected SDO entry information in sequence to the next selected SDO and perform the same operation until the end;
[0019] When waiting for the save instruction, the save operation is triggered and a fixed SDO message is sent directly. The save is completed when a reply is received.
[0020] Preferably, the determining whether the communication data can accurately execute the corresponding user operation further includes:
[0021] When the communication data is written abnormally, a new SDO read and write protocol is added;
[0022] After the host computer sends a write instruction to the IO module, the received communication data is checked for legitimacy and the verification result is returned.
[0023] Preferably, when performing a read operation after a successful write, automatically writing SDO in batches and performing a readback comparison to ensure write consistency includes:
[0024] Send a read command to perform a readback operation;
[0025] After receiving the read command through the IO module, the current read value is returned, and the return value is received through the host computer;
[0026] Compare the read value with the written value and locate and highlight the differences.
[0027] Preferably, the range visualization configuration displays the real-time communication data of the CAN bus through the first text box, displays the range configuration process through the second text box, and completes the reading, writing and saving of the range data by triggering the read / write / save instructions.
[0028] Preferably, the EDS file format is divided according to SDO entries, and the parameters of each SDO entry include SDO object index, SDO object sub-index, CAN-ID, write value, default value, data type and access type.
[0029] Preferably, the types of the IO module ranges include DI range, DO range, AI range, AO range, PI range and RI range.
[0030] The present invention also provides a CAN bus-based IO module range visualization configuration system, which implements the CAN bus-based IO module range visualization configuration method as described in an embodiment of the present invention, including:
[0031] The initialization module is used to write the configuration file according to the EDS file format and initialize the IO module range;
[0032] The interface display module is used to read multiple versions of EDS file data and display them in different pages, obtain all range information and display them on the interface through the communication mechanism of the service data object SDO;
[0033] The instruction trigger module is used to determine whether to wait for the user operation to be executed, trigger the corresponding instruction according to the user operation, obtain the selected SDO item information in sequence, compose the SDO message and send it to the IO module, and determine the completion of writing / reading the corresponding range to save the SDO message by receiving feedback;
[0034] The exception handling module is used to display the communication data in real time through the configuration interface to locate and debug the exception when an abnormal situation occurs during the configuration process, and to determine whether the communication data can accurately execute the corresponding user operation. The newly added SDO read and write protocol ensures that the corresponding operation instructions are correctly received; the write instruction is sent to the IO module through the host computer, and when the communication data is successfully written, it is determined whether it is a read operation after the write is successful. When executing the read operation after the write is successful, the SDO is automatically written in batches and a read-back comparison is performed to ensure the write consistency; wherein, the user operation includes write, read and save operations.
[0035] Preferably, the instruction triggering module further comprises:
[0036] The data conversion module is used to obtain the read value of the message, calculate according to the data type selection formula, and display the calculated value; obtain the write value and calculate according to the data type selection formula, compose the message and send it, so as to convert the read value and write value of the message;
[0037] The retransmission abort module is used to trigger the retransmission mechanism if no reply is received within a preset time after the SDO message is sent. The current behavior is aborted after the retransmission operation reaches the set number of times;
[0038] The comparison positioning module is used to trigger the readback operation after the writing is completed. The written range is read and displayed in the read value column, compared with the written value of the corresponding row, and the different rows are highlighted.
[0039] With respect to the prior art, the present invention has the following beneficial effects:
[0040] The present invention provides a method for visually configuring the range of an IO module based on a CAN bus. When an abnormality occurs in the configuration process, the interface displays the communication data in real time and provides the ability to troubleshoot problems. In order to solve the problem that data cannot be accurately written, a new SDO read-write protocol is added. After the host computer sends a write instruction to the IO module, the IO module needs to verify the legitimacy of the received data and return the verification result. For the successfully written data, a read instruction is sent to read back. After receiving the read instruction, the IO module returns the current value. The host computer receives the return value and compares it with the written value, highlighting the difference. In order to solve the problem of no fallback mechanism, a new SDO save protocol is added. The IO module will save the written data only after the host computer sends the SDO save instruction. The above functions significantly improve the ease of use and visualization of the configuration. The specific advantages are as follows:
[0041] 1. User-friendly configuration interface: By reading multiple versions of EDS file data and displaying them in different pages, users can easily select and view different range information, thereby improving the intuitiveness and ease of use of the configuration process.
[0042] 2. Efficient communication mechanism: Using the service data object (SDO) communication mechanism can ensure accurate data transmission and effective configuration of devices. The point-to-point nature of SDO communication ensures the reliability and efficiency of data exchange.
[0043] 3. Real-time feedback and exception handling: By displaying communication data in real time, users can quickly locate and debug abnormal situations during the configuration process. This method improves the efficiency of problem solving and reduces downtime.
[0044] 4. Data conversion and consistency check: The read and written values of the message are calculated and converted according to the data type, ensuring the accuracy and consistency of the data. Automatic batch writing to SDO and readback comparison further ensures the consistency of the configuration.
[0045] 5. Resend mechanism and read back after writing: If no reply is received within the preset time after the SDO message is sent, the resend mechanism will be triggered, which increases the reliability of communication. After writing is completed, the read back operation is automatically triggered and compared with the written value, highlighting the difference, which helps to find and correct errors in time.
[0046] 6. Systematic configuration process: By providing initialization module, interface display module, command trigger module and exception handling module, the configuration process is systematically managed. From initialization to data display, to execution of user commands and exception handling, each step is optimized and integrated.
[0047] 7. Flexible range type support: Supports multiple IO module range types, such as DI range, DO range, AI range, AO range, PI range and RI range, making this method suitable for a wide range of industrial automation scenarios.
[0048] 8. Enhanced write operation reliability: When communication data is written successfully, the system will automatically perform a read operation after the write is successful, ensuring the correctness and reliability of the written data. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a schematic diagram of the steps of the CAN bus-based IO module range visualization configuration method described in Example 1 of the present invention;
[0050] Figure 2 This is a schematic diagram of the visual configuration of the module range in the first embodiment of the present invention;
[0051] Figure 3 This is a flow chart of range configuration according to an embodiment of the present invention. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0053] Embodiment 1
[0054] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0055] It should be noted that the concepts such as "once" and "second" mentioned in the present application are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0056] It should be noted that the modifications of "one" and "plurality" mentioned in the disclosure of this application are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0057] like Figure 1-3 As shown, the present invention provides a method for visually configuring the range of an IO module based on a CAN bus, comprising:
[0058] S1: Write a configuration file in the EDS file format and initialize the IO module range; the range visualization configuration displays the real-time communication data of the CAN bus through the first text box, displays the range configuration process through the second text box, and completes the reading, writing, and saving of the range data by triggering the read / write / save instructions. The range in this embodiment can be any range controlled by SDO of the CANopen protocol, where CAN (Controller Area Network) refers to the controller area network, SDO (Service Data Object) refers to the service data object, IO (Input / Output) refers to input / output, and EDS (Electronic Data Sheet) format refers to an electronic data sheet.
[0059] S2: Read multiple versions of EDS file data and display them in different pages, obtain all range information and display them on the interface through the communication mechanism of service data object SDO. The CAN bus real-time data display and range configuration process display can be a text box, table, or provide a data output interface to display on other platforms;
[0060] S3: Determine whether to wait for the user operation to be executed, trigger the corresponding instruction according to the user operation, obtain the selected SDO entry information in order, compose the SDO message and send it to the IO module, and determine the completion of the corresponding range writing / reading to save the SDO message by receiving feedback. The selection of SDO batch writing can be any of the following: check, highlight, numerical range, etc. Specifically, when waiting for the write instruction, the write operation is triggered to confirm whether a reply is received when the target range executes the write operation. At the same time, when waiting for the read instruction, the read operation is triggered to confirm whether a reply is received when the target range executes the read operation. When a reply notification is received, it indicates that the target range has completed the write operation or the read operation. Jump from the selected SDO entry information obtained in order to the next selected SDO to perform the same operation until the end; when waiting for the save instruction, the save operation is triggered to directly send a fixed SDO message, and the save is completed when a reply is received;
[0061] S4: When an abnormality occurs during the configuration process, the communication data is displayed in real time through the configuration interface to locate and debug the abnormality, and it is determined whether the communication data can accurately execute the corresponding user operation. The SDO read and write protocol is added to ensure that the corresponding operation instructions are correctly received; when the communication data is written abnormally, the SDO read and write protocol is added; after the upper computer sends the write instruction to the IO module, the received communication data is checked for legitimacy and the verification result is returned. When an abnormality occurs in the configuration process, the ability to troubleshoot is provided. The correctness and consistency of the data sent can be guaranteed. Users can freely save the written data. The above functions have significantly improved the ease of use and visualization of the configuration.
[0062] S5: Send a write instruction to the IO module through the host computer. When the communication data is written successfully, determine whether it is a read operation after the write is successful. When performing the read operation after the write is successful, automatically write SDO in batches and perform a read-back comparison to ensure the write consistency; wherein the user operation includes write, read and save operations. Among them, automatically writing SDO in batches and performing a read-back comparison to ensure the write consistency further includes: sending a read instruction to perform a read-back operation; returning the current read value after receiving the read instruction through the IO module, and receiving the return value through the host computer; comparing the read value with the write value, obtaining the comparison result and locating and highlighting the difference.
[0063] The IO module range used in this embodiment includes multiple range types, and the module range can be the following types: DI range, DO range, AI range, AO range, PI range, RI range, etc., among which DI (Digital Input) range is a digital input range, DO (Digital Output) range is a digital output range, AI (Analog Input) range is an analog input range, AO (Analog Output) range is an analog output range, PI (Pulse Input) range is a pulse input range, and RI (Radio Input) range is a wireless input range. The visualization configuration method includes module range visualization and range configuration visualization; the module range visualization displays all modules that currently support range configuration in the form of a page through an EDS format configuration file, and the page displays all readable ranges of the current module and their ID, data type, numerical value and other parameter values in a table form. The range configuration is visualized, with CAN bus real-time communication data displayed through text box 1, and the range configuration process displayed through text box 2. The reading, writing, and saving of range data are completed through the read / write / save button. Based on the method in the embodiment of the present invention, for an IO module with range configuration requirements, the user writes a configuration file in the EDS format to complete the initialization of the range; during the configuration process, by checking the range to be read / written, click the read / write button to complete the configuration of the selected item; after the configuration is completed, click the save button to complete the configuration save. For failures in any link, the cause of failure can be found through the data in the process text box and the CAN bus real-time communication data table.
[0064] Those skilled in the art can understand that the basic steps of the CAN bus-based IO module range visualization configuration method proposed in the embodiment of the present invention are:
[0065] (1) Customized EDS file format must meet basic requirements: 1. Divided by SDO items. 2. Each SDO must contain the following parameters: SDO object index, SDO object sub-index, CAN-ID, uservalue (write value), defaultvalue (default value), datatype (data type), AccessType (access type).
[0066] (2) Read and display the EDS file in the specified format. Obtain all range information from the EDS and display it line by line in the range table. The column data contains all the parameters in (1), as well as the write check box, read check box, and read value. The EDS name is used as the name of the current page. The user can switch between multiple pages and select different SDOs for operation. This method can read multiple versions of EDS and display them in different pages according to user needs, which can be used for version control and switching.
[0067] (3) Sending the range configuration message. Add three buttons, Write, Read, and Save, as trigger switches. After clicking the Write / Read button, obtain the information of the first SDO item checked in (2), compose an SDO message and send it to the module. Receiving a reply means that the range writing / reading is completed, jump to the next checked SDO and perform the same operation until the end; after clicking the Save button, directly send a fixed SDO message, and receiving a reply means that the saving is completed.
[0068] (4) Obtain the read value of the message, calculate it according to the data type selection formula, and display the calculated value; obtain the write value, calculate it according to the data type selection formula, compose a message and send it, thereby converting the read value and write value of the message;
[0069] (5) If no reply is received within the preset time after the SDO message is sent, the retransmission mechanism is triggered. After the retransmission operation reaches the set number of times, the current behavior is terminated;
[0070] (6) After writing is completed, the readback operation is triggered, the written range is read and displayed in the read value column, and compared with the written value of the corresponding row, and the different rows are highlighted. The above method supports automatic batch writing of SDO and readback comparison to ensure writing consistency; the write error row is highlighted for quick positioning;
[0071] (7) The real-time data of the CAN bus is displayed in the first text box 1, and the range configuration process is displayed in the second text box 2. When the configuration fails, the alarm information and the real-time data of the bus can be viewed in the process to locate the problem. The above method displays the real-time communication data of the CAN bus and the range configuration process, which is used for error location and debugging; it supports the retransmission function of batch reading and writing when no response is received after timeout, reducing the impact of CAN bus instability.
[0072] Based on the same inventive concept, an embodiment of the present invention further provides a CAN bus-based IO module range visualization configuration device, which implements the CAN bus-based IO module range visualization configuration method as described in the above embodiment, including:
[0073] The initialization module is used to write the configuration file according to the EDS file format and initialize the IO module range;
[0074] The interface display module is used to read multiple versions of EDS file data and display them in different pages, obtain all range information and display them on the interface through the communication mechanism of the service data object SDO;
[0075] The instruction trigger module is used to determine whether to wait for the user operation to be executed, trigger the corresponding instruction according to the user operation, obtain the selected SDO item information in sequence, compose the SDO message and send it to the IO module, and determine the completion of writing / reading the corresponding range to save the SDO message by receiving feedback;
[0076] The exception handling module is used to display the communication data in real time through the configuration interface to locate and debug the exception when an abnormal situation occurs during the configuration process, and to determine whether the communication data can accurately execute the corresponding user operation. The newly added SDO read and write protocol ensures that the corresponding operation instructions are correctly received; the write instruction is sent to the IO module through the host computer, and when the communication data is successfully written, it is determined whether it is a read operation after the write is successful. When executing the read operation after the write is successful, the SDO is automatically written in batches and a read-back comparison is performed to ensure the write consistency; wherein, the user operation includes write, read and save operations.
[0077] Specifically, the instruction triggering module further includes:
[0078] The data conversion module is used to obtain the read value of the message, calculate according to the data type selection formula, and display the calculated value; obtain the write value and calculate according to the data type selection formula, compose the message and send it, so as to convert the read value and write value of the message;
[0079] The retransmission abort module is used to trigger the retransmission mechanism if no reply is received within a preset time after the SDO message is sent. The current behavior is aborted after the retransmission operation reaches the set number of times;
[0080] The comparison positioning module is used to trigger the readback operation after the writing is completed. The written range is read and displayed in the read value column, compared with the written value of the corresponding row, and the different rows are highlighted.
[0081] The principle content and implementation method of the above modules are as described in Example 1 and will not be repeated here.
[0082] In some embodiments of the present application, an electronic device is also provided. The electronic device includes a memory and a processor, wherein the memory is used to store a processing program, and the processor executes the processing program according to instructions. When the processor executes the processing program, the CAN bus-based IO module range visualization configuration method in the above-mentioned embodiment is implemented.
[0083] In some embodiments of the present application, a readable storage medium is further provided, which may be a non-volatile readable storage medium or a volatile readable storage medium. The readable storage medium stores instructions, and when the instructions are executed on a computer, an electronic device including the readable storage medium executes the aforementioned CAN bus-based IO module range visualization configuration method.
[0084] It is understandable that, for the aforementioned CAN bus-based IO module range visualization configuration method, if it is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention is essentially or part of the contribution to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0085] Computer readable storage media may include data signals propagated in baseband or as part of a carrier wave, wherein readable program codes are carried. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program codes contained on the readable storage medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0086] The program code involved in executing the technical solution disclosed in the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also conventional procedural programming languages such as C language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on the remote computing device, or completely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for visual configuration of IO module range based on CAN bus, characterized in that: include: Writing a configuration file in the EDS file format to perform visual configuration initialization on the IO module range, wherein the visual configuration initialization includes customizing the EDS file format and dividing the EDS file format according to SDO items; Read multiple versions of EDS file data and display them in different pages, obtain all range information and display them on the interface through the communication mechanism of service data object SDO; Determine whether to wait for the user operation to be executed, trigger the corresponding instruction according to the user operation, obtain the selected SDO item information in sequence, compose the SDO message and send it to the IO module, and determine whether the corresponding range parameter has completed the write / read operation by receiving the feedback SDO message; When an abnormal situation occurs during the configuration process, the communication data is displayed in real time on the configuration interface to locate and debug the abnormality, determine whether the communication data can accurately execute the corresponding user operation, and add the SDO read and write protocol to ensure that the corresponding operation instructions are correctly received; A write instruction is sent to the IO module through the configuration interface of the host computer. When the communication data is written successfully, it is determined whether it is a read-back operation after the write is successful. When performing the read-back operation after the write is successful, the write SDO is automatically selected to perform a batch write operation and perform a read-back comparison, and the current read value is compared with the local write value to ensure the write consistency; wherein, the user operation includes write, read-back / read and save operations.
2. The CAN bus-based IO module range visualization configuration method according to claim 1, characterized in that: The step of determining whether the writing / reading operation of the corresponding range parameter is completed by receiving the feedback SDO message further includes: Get the read value of the message, select the calculation formula according to the data type, and display the calculated value; The written value is obtained and calculated according to the data type selection formula, and then a message is formed and sent, thereby converting the read value and the written value of the message; If no reply is received within the preset time after the SDO message is sent, the retransmission mechanism is triggered, and the current behavior is terminated after the retransmission operation reaches the set number of times; After writing is completed, the readback operation is triggered, the written range is read and displayed in the read value column, and compared with the written value of the corresponding row, and the different rows are highlighted.
3. The CAN bus-based IO module range visualization configuration method according to claim 1, characterized in that: The step of determining whether the writing / reading operation of the corresponding range parameter is completed by receiving the feedback SDO message includes: When waiting for a write instruction, the write operation is triggered to confirm whether the target range receives a reply when executing the write operation. At the same time, when waiting for a read instruction, the read operation is triggered to confirm whether the target range receives a reply when executing the read operation. When a reply notification is received, it indicates that the target range has completed the writing operation or the reading operation; Jump from the selected SDO entry information in sequence to the next selected SDO and perform the same operation until the end; When waiting for the save instruction, the save operation is triggered and a fixed SDO message is sent directly. The save is completed when a reply is received.
4. The CAN bus-based IO module range visualization configuration method according to claim 1, characterized in that: The determining whether the communication data can accurately execute the corresponding user operation further includes: When the communication data is written abnormally, a new SDO read and write protocol is added; After the host computer sends a write instruction to the IO module, the received communication data is checked for legitimacy and the verification result is returned.
5. The CAN bus-based IO module range visualization configuration method according to claim 1, characterized in that: When performing a readback operation after a successful write, automatically selecting a write SDO to perform a batch write operation and performing a readback comparison includes: Send a read command to perform a readback operation; After receiving the read command through the IO module, the current read value is returned, and the return value is received through the host computer; Compare the read value with the written value and locate and highlight the differences.
6. The CAN bus-based IO module range visualization configuration method according to claim 1, characterized in that: The range visualization configuration displays the real-time communication data of the CAN bus through the first text box, displays the range configuration process through the second text box, and completes the reading, writing, and saving of the range data by triggering the read / write / save instructions.
7. The CAN bus-based IO module range visualization configuration method according to claim 1, characterized in that: The EDS file format is divided according to SDO entries, and the parameters of each SDO entry include SDO object index, SDO object sub-index, CAN-ID, write value, default value, data type and access type.
8. The CAN bus-based IO module range visualization configuration method according to claim 1, characterized in that: The types of IO module ranges include DI range, DO range, AI range, AO range, PI range and RI range.
9. A CAN bus-based IO module range visualization configuration system, characterized in that: Implementing the CAN bus-based IO module range visualization configuration method as described in any one of claims 1 to 8, comprising: An initialization module, used for writing a configuration file in accordance with an EDS file format to initialize the IO module range, wherein the visual configuration initialization includes customizing the EDS file format and dividing the EDS file format according to SDO entries; The interface display module is used to read multiple versions of EDS file data and display them in different pages, obtain all range information and display them on the interface through the communication mechanism of the service data object SDO; The instruction trigger module is used to determine whether to wait for the user operation to be executed, trigger the corresponding instruction according to the user operation, obtain the selected SDO item information in sequence, compose the SDO message and send it to the IO module, and determine whether the corresponding range parameter has completed the write / read operation by receiving the feedback SDO message; The exception handling module is used to display the communication data in real time through the configuration interface to locate and debug the exception when an abnormal situation occurs during the configuration process, determine whether the communication data can accurately execute the corresponding user operation, and add the SDO read and write protocol to ensure that the corresponding operation instructions are correctly received; send a write instruction to the IO module through the configuration interface of the upper computer, and when the communication data is successfully written, determine whether it is a read-back operation after the write is successful. When executing the read-back operation after the write is successful, automatically select the write SDO to execute a batch write operation and perform a read-back comparison, and compare the current read value with the local write value to ensure the write consistency; wherein, the user operation includes write, read and save operations.
10. The CAN bus-based IO module range visualization configuration system according to claim 9, characterized in that: The instruction triggering module further comprises: The data conversion module is used to obtain the read value of the message, calculate according to the data type selection formula, and display the calculated value; obtain the write value and calculate according to the data type selection formula, compose the message and send it, so as to convert the read value and write value of the message; The retransmission abort module is used to trigger the retransmission mechanism if no reply is received within a preset time after the SDO message is sent. The current behavior is aborted after the retransmission operation reaches the set number of times; The comparison positioning module is used to trigger the readback operation after the writing is completed. The written range is read and displayed in the read value column, compared with the written value of the corresponding row, and the different rows are highlighted.
Citation Information
Patent Citations
Communication method of power distribution automation equipment
CN104993583A
Network debugging method, system and equipment thereof
CN107453954A
Bridging ROS system and CANopen network real-time communication method
CN109639548A
Vehicle-mounted signal control system
CN109862054A
Equipment parameter information diagnosis system and method based on CANopen
CN111200546A
