Data interaction method and system of upper computer for driver
By using a driver-host computer data interaction method and system, the compatibility and user experience issues of the driver's host computer software were resolved, achieving efficient data interaction and functional expansion, reducing maintenance costs, and improving data interaction speed and user experience.
Patent Information
- Application Number
- CN202410908140.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-11-22
AI Technical Summary
Existing driver host computer software suffers from incompatibility with various products within the enterprise, limited communication methods, poor user experience, limited functionality, and cumbersome operation.
A method and system for data interaction between a driver and a host computer are provided, including selecting the device type and access level, selecting the communication mode, setting parameters, performing data interaction through Modbus communication system diagnosis and custom Modbus messages, and realizing data interaction between the driver slave computer and the host computer through a visualization module, a data processing module, and a communication module.
It improves user experience, reduces development and maintenance costs, increases data interaction speed and timeliness, supports function expansion and multi-threaded parallel processing, and provides a user-friendly data display method.
Smart Images

Figure CN119003423A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a host computer data interaction method and system for a driver. Background Art
[0002] As an important part of industrial production, the drive system plays a vital role in various equipment and systems. The drive controls the movement of motors or other actuators to achieve precise control and regulation of equipment, thereby providing efficient and accurate power support for industrial production.
[0003] During the driver development and on-site debugging process, a visual interface is required to perform command control, data analysis and status monitoring on the driver. PC-based host software has become one of the main tools due to its efficiency and convenience. Most of the host software currently available on the market has the following problems: incompatibility of products within the enterprise, single communication method, poor user experience, limited functions, and cumbersome operation. Summary of the invention
[0004] The purpose of the present invention is to provide a method for interacting with a host computer for a driver to solve the problems raised in the above background technology. To achieve the above purpose, the present invention provides the following technical solutions:
[0005] A method for interacting with a host computer data for a driver comprises the following steps:
[0006] S101. Select the device type and access level in the project start dialog box. Select inverter or server as the device type according to the type of drive. Select "User" or "Manufacturer" as the access level. When selecting "Manufacturer", enter the manufacturer password.
[0007] S102, select the communication mode, that is, select RS485 or USB connection mode; set corresponding parameters according to the selected communication mode;
[0008] S103, open the serial port, and determine whether the serial port opening is successful. If the opening fails, the communication fails and enters S108; if the opening is successful, enter S104 to test whether the communication is normal;
[0009] Specifically, opening the serial port is performed through the parameters set in S102;
[0010] S104, send a Modbus communication system diagnosis (08) message to the lower computer. If the test communication is normal, enter S105; if the test communication fails, poll the baud rate according to the baud rate list. If the polling of the baud rate is successful, enter S105; if the polling of the baud rate fails, that is, the test still fails after the baud rate list is traversed, the communication fails, and enter S108;
[0011] S105, judging according to the communication mode set in S102, if it is RS485, proceed to S106; if it is USB, proceed to S107;
[0012] S106, obtaining the actual baud rate of the lower computer and comparing it with the expected baud rate set in S102;
[0013] If the two are consistent, the communication is successful and the process goes to S107; if the two are inconsistent, a write single register (06) message is sent to the driver lower computer to change the baud rate of the driver lower computer to the expected baud rate and the process goes to S107;
[0014] S107, communication is successful, enter S109;
[0015] S108, communication fails, enter S110;
[0016] S109, sending a read single register (03) message to the driver slave computer to read the version information and access rights of the driver slave computer; if the access level is selected as "manufacturer authority" and the password is entered in S101, sending a write single register (06) message to the driver slave computer to write the manufacturer password to the driver slave computer;
[0017] S110, load the device function code table excel file, initialize the data of each function code of the driver lower computer stored in this upper computer software, if the communication is successful, enter S111; if the communication fails, the upper computer software runs in "offline mode";
[0018] S111, sending a custom Modbus read function code group capacity (67) message to the driver slave computer, sending a custom Modbus read function code attribute (6A) message, sending a read single register (03) message, and updating the capacity of each function code group of the driver slave computer, the attribute of each function code and the current value data stored in this host computer software.
[0019] In S102, if RS485 is selected, serial port parameters such as serial port number, expected baud rate, data bit, check bit, stop bit, etc. are set; if USB is selected, only one parameter, namely the serial port number, needs to be set.
[0020] The present invention also provides a host computer data interaction system for a driver, which is used to execute the host computer data interaction method described above, including a visualization module, a data processing module, and a communication module, wherein:
[0021] The visualization module includes a parameter editor, an oscilloscope, a monitoring console, a parameter macro, a fault record and a status bar with multiple UI interface windows;
[0022] The data processing module includes a task queue module, a task scheduling thread module, and a data update function module. The data processing module is mainly responsible for managing various tasks to be executed and updating the driver function code data;
[0023] The communication module is mainly responsible for the communication between the host computer software and the driver slave computer, and sends and receives Modbus messages through the serial port to achieve data exchange.
[0024] The task queue module is used to store instantiated objects of custom task classes;
[0025] The main information contained in the custom task class includes the task ID of the task object, the execution priority of the task object, and the Modbus message corresponding to the task object; the task ID is a hexadecimal integer represented by a macro definition; when the user performs user operations in the various interfaces of the visualization module, the custom task class object will be instantiated, and the task queue will enqueue them according to the execution priority of each task object.
[0026] The task scheduling thread module is used to send out a scheduling signal including the task Modbus message and the expected return message length data; the signal is bound to the serial port communication function in the communication module; and the task will be removed from the task queue after execution.
[0027] The data update function module processes the Modbus return message of the connected driver slave computer after the task scheduling thread completes executing a task, i.e., updates the data of the corresponding function code of the driver slave computer stored in the host computer software. After the data update is completed, the UI interface displaying the data is updated.
[0028] The communication module includes a serial port connection function module, a Modbus thread module, and a serial port communication function module.
[0029] The serial port connection function module is called when the host computer software attempts to communicate with the driver host computer;
[0030] The Modbus thread module receives the scheduling signal sent by the task scheduling thread, and the serial port communication function bound thereto sends the Modbus message contained in the scheduling signal to the driver lower computer through the serial port;
[0031] After sending the Modbus message contained in the scheduling signal to the driver lower computer, the serial port communication function module will obtain the return message of the driver lower computer through the serial port within a certain limited time. If the number of readable bytes in the serial port is equal to the data of the expected return message length contained in the scheduling signal value, all byte data in the serial port will be obtained and returned to the task scheduling thread.
[0032] The beneficial effects of the present invention are: the method of the present invention is adapted to a specific driver lower computer, thereby improving user experience and reducing development and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0034] Figure 1 It is a schematic diagram of the process of connecting the driver lower computer of the present invention;
[0035] Figure 2 It is a schematic diagram of each module architecture of the present invention;
[0036] Figure 3 It is a schematic diagram of data flow between modules of the present invention;
[0037] Figure 4 It is the message format of custom Modbus protocol function code 67-reading function code group capacity;
[0038] Figure 5 Customize the message format of Modbus protocol function code 6A-read function code attributes;
[0039] Figure 6 This is a schematic diagram of data exchange between the upper computer software and the driver lower computer through different communication modes.
[0040] It should be noted that the drawings are not necessarily drawn to scale, but are merely shown in a schematic manner that does not affect the reader's understanding. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0042] In the present invention, the directions or positional relationships indicated by the terms "upper", "lower", "left", "right", "front", "back", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal" and the like are based on the directions or positional relationships shown in the drawings. These terms are mainly used to better describe the present invention and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific direction, or to be constructed and operated in a specific direction.
[0043] In addition, some of the above terms may be used to express other meanings in addition to indicating orientation or positional relationship. For example, the term "on" may also be used to express a certain dependency or connection relationship in some cases. For those skilled in the art, the specific meanings of these terms in the present invention can be understood according to specific circumstances.
[0044] In addition, the terms "installed", "set", "provided with", "connected", and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection, or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be an internal connection between two devices, elements, or components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0045] In addition, the terms "first", "second", etc. are mainly used to distinguish different devices, elements or components (the specific types and structures may be the same or different), and are not used to indicate or imply the relative importance and quantity of the indicated devices, elements or components. Unless otherwise specified, "plurality" means two or more.
[0046] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0047] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0048] like Figure 1 As shown, the present invention provides a method for interacting data with a host computer for a driver, comprising the following steps:
[0049] S101. Select the device type and access level in the project start dialog box. Select inverter or server as the device type according to the type of drive. Select "User" or "Manufacturer" as the access level. When selecting "Manufacturer", enter the manufacturer password.
[0050] S102, select the communication mode, that is, select RS485 or USB connection mode; set corresponding parameters according to the selected communication mode;
[0051] If RS485 is selected, set the serial port number, expected baud rate, data bit, check bit, stop bit and other serial port parameters; if USB is selected, only the serial port number needs to be set;
[0052] S103, open the serial port, and determine whether the serial port opening is successful. If the opening fails, the communication fails and enters S108; if the opening is successful, enter S104 to test whether the communication is normal;
[0053] Specifically, opening the serial port is performed through the parameters set in S102;
[0054] S104, send a Modbus communication system diagnosis (08) message to the lower computer. If the test communication is normal, enter S105; if the test communication fails, poll the baud rate according to the baud rate list. If the polling of the baud rate is successful, enter S105; if the polling of the baud rate fails, that is, the test still fails after the baud rate list is traversed, the communication fails, and enter S108;
[0055] S105, judging according to the communication mode set in S102, if it is RS485, proceed to S106; if it is USB, proceed to S107;
[0056] S106, obtaining the actual baud rate of the lower computer and comparing it with the expected baud rate set in S102;
[0057] If the two are consistent, the communication is successful and the process goes to S107; if the two are inconsistent, a write single register (06) message is sent to the driver lower computer to change the baud rate of the driver lower computer to the expected baud rate and the process goes to S107;
[0058] S107, communication is successful, enter S109;
[0059] S108, communication fails, enter S110;
[0060] S109, sending a read single register (03) message to the driver slave computer to read the version information and access rights of the driver slave computer; if the access level is selected as "manufacturer authority" and the password is entered in S101, sending a write single register (06) message to the driver slave computer to write the manufacturer password to the driver slave computer;
[0061] S110, load the device function code table excel file, initialize the data of each function code of the driver lower computer stored in this upper computer software, if the communication is successful, enter S111; if the communication fails, the upper computer software runs in "offline mode";
[0062] S111, sending a custom Modbus message to read the function code group capacity (67), a custom Modbus message to read the function code attribute (6A), and a message to read a single register (03) to the driver slave computer, and updating the data such as the capacity of each function code group of the driver slave computer, the attribute and current value of each function code stored in the host computer software.
[0063] The function code attributes described here include the default value, unit, minimum value, maximum value, operation attribute and other data information of the function code. After the update is completed, this host computer runs in "online mode".
[0064] A host computer software system for a driver includes a visualization module, a data processing module, and a communication module, wherein:
[0065] The visualization module 21 includes a parameter editor, an oscilloscope, a monitoring console, a parameter macro, a fault record and a status bar with multiple UI interface windows;
[0066] Various data of the driver will be displayed in the corresponding interface in the form of tables, images, texts, etc. This module also supports human-computer interaction, that is, the user can perform UI operations in the above-mentioned interfaces to realize interface jumps, read and write driver function code parameters, view waveforms, and edit parameters; obviously, the functions implemented by the UI operations here are only part of the many functions of the visualization module of the present invention, not all of them.
[0067] The data processing module 22 includes a task queue model, a task scheduling thread module, and a data update function module. The data processing module is mainly responsible for managing various tasks to be executed and updating the driver function code data;
[0068] The task queue module 221 is used to store instantiated objects of the custom task class;
[0069] The main information contained in the custom task class includes the task ID of the task object, the execution priority of the task object, and the Modbus message corresponding to the task object; the task ID is a hexadecimal integer represented by a macro definition; when the user performs user operations in the various interfaces of the visualization module, the custom task class object will be instantiated, and the task queue will enqueue them according to the execution priority of each task object.
[0070] The task scheduling thread module 222 is used to send out a scheduling signal including the task Modbus message and the expected return message length data; the signal is bound to the serial port communication function in the communication module; and the task will be removed from the task queue after execution.
[0071] The data update function module 223 processes the Modbus return message of the connected driver slave computer after the task scheduling thread completes executing a task, i.e., updates the data of the corresponding function code of the driver slave computer stored in the upper computer software. After the data update is completed, the UI interface displaying the data is updated.
[0072] The communication module 23 is mainly responsible for the communication between the host computer software and the driver slave computer, and sends and receives Modbus messages through the serial port to achieve data exchange;
[0073] Specifically, the communication module 23 includes a serial port connection function module, a Modbus thread module, and a serial port communication function module.
[0074] The serial port connection function module 231 is called when the host computer software attempts to communicate with the driver host computer;
[0075] The Modbus thread module 232 receives the scheduling signal sent by the task scheduling thread, and the serial port communication function bound thereto sends the Modbus message contained in the scheduling signal to the driver lower computer through the serial port;
[0076] After sending the Modbus message contained in the scheduling signal to the driver lower computer, the serial port communication function module 233 will obtain the return message of the driver lower computer through the serial port within a certain limited time. If the number of readable bytes in the serial port is equal to the data of the expected return message length contained in the scheduling signal value, all byte data in the serial port will be obtained and returned to the task scheduling thread.
[0077] Combination Figure 3 The signal slot binding and data flow between the modules of the present invention are further described as follows:
[0078] Each operation signal of the UI interface is bound to its corresponding task generation slot function. When the user performs UI operation, the operation signal is sent. After receiving the operation signal, the task generation function instantiates the corresponding custom task class object, which mainly includes the task ID, execution priority, and Modbus message information. The task list is queued according to the execution priority of the instantiated object.
[0079] In the task scheduling thread, a scheduling signal containing a Modbus message pointer and the expected return message length data is bound to the serial communication slot function in the Modbus thread. When there is a task object in the task queue, the information contained in the task object with the highest priority will be sent through the scheduling signal. After receiving the scheduling signal, the serial communication function communicates with the driver slave computer, that is, sends and receives Modbus messages. The return message received by the serial communication function will be passed to the data update function in the task scheduling thread through the Modbus message pointer in the scheduling signal, and the Modbus return message will be processed, that is, the data of the corresponding function code of the driver slave computer stored in this host computer software will be updated.
[0080] After the task is executed, that is, after the sending and receiving of the Modbus message included in the task is completed, the task will be dequeued from the task queue and destroyed.
[0081] In the task scheduling thread, the task completion signal containing the task ID is bound to the interface update slot function of each UI interface. When a task is completed, the task scheduling thread will send the task completion signal. After receiving the signal, the interface update function will update the UI interface according to the task ID, that is, visualize the latest data of the function code.
[0082] In the present invention, RS485 or USB is used to connect with the driver lower computer, and the bottom layer performs data interaction based on the general and custom Modbus function code protocol formats.
[0083] Custom Modbus protocol function code: 67-Read function code group capacity, its message format is as follows Figure 4 As shown; 6A-Read function code attributes, its message format is as follows Figure 5As shown. Where addr is the address of the function code of the driver lower computer; Number in the reply message of the 67 protocol function code is the number of function codes contained in the group where addr belongs, that is, the capacity of the function code group; MaxVal in the reply message of the 6A protocol function code is the maximum value of the addr function code, MinVal is the minimum value, Attr is the attribute value, including the symbol, decimal point, unit, operation permission, whether to store in EEPROM, modification permission and access level, etc.; CRC is the check code. The H suffix represents the high bit of the 32-bit number, and the L suffix represents the low bit of the 32-bit number.
[0084] The upper computer software and the drive lower computer exchange data through RS485 or USB communication mode, such as Figure 6 shown.
[0085] Among them, the RS485 connecting line integrates the RS485 conversion chip, which is used to convert the PC serial port data into RS485 format data for transmission on the RS485 bus, and connect to the RS485 interface of the drive lower computer for data interaction.
[0086] In addition, the driver lower computer can also use the USB peripheral in the MCU to simulate RS485 to communicate through the USB interface. The driver lower computer calls the setup() function in the peripheral lib to connect to the upper computer software, and calls the read() and write() functions to read and write data.
[0087] The signal-slot mechanism based on the Qt framework loosely couples and binds UI controls with slot functions, realizes data flow between modules, and simplifies data sharing between different threads.
[0088] The signal-slot mechanism is a mechanism for inter-object communication in the Qt framework. The QObject::connect() function is used to bind the signal function of the signal sending object to the slot function of the signal receiving object. Compared with the function callback mechanism, the sending object and the receiving object do not need to know the existence of each other explicitly, that is, the two are decoupled, which means that software functions can be modified or added more conveniently and quickly.
[0089] The signal-slot mechanism can realize multiple connection modes such as one-to-many, many-to-one, and many-to-many, and the connection can be dynamically established and released at runtime.
[0090] The signal-slot mechanism naturally supports cross-thread communication. Signals can be emitted and slot functions can be called in different threads without explicitly dealing with thread synchronization issues, which is beneficial to improving the accuracy of the monitoring data of this host computer software.
[0091] Beneficial effects of the present invention:
[0092] 1. Based on the custom Modbus message format, the actual parameter attributes of the driver are obtained, which reduces the dependence of the host computer software on the Excel table, thereby greatly reducing the workload of Excel table maintenance caused by the upgrade of the lower computer software. When performing most UI operations, the actual parameter attributes of the driver stored in the host computer will be updated at the same time, solving the problem caused by the change of the attribute data of its associated parameters due to the change of a certain parameter data, which is beneficial to improve the accuracy of software data.
[0093] 2. The USB peripheral of MCU is used in the lower computer driver to simulate RS485 communication. When the upper computer software uses USB to establish a connection with the lower computer of the driver and perform data exchange, serial data is directly sent without the need to develop USB protocol communication format and program separately, thus realizing software normalization. At the same time, it also improves the speed and timeliness of data exchange.
[0094] 3. A custom task class, whose instantiated objects are used to store the task ID and execution priority of the UI operation, and a task queue is used to uniformly manage all instantiated objects of the custom task class. If the present invention needs to add new functions when upgrading, it only needs to set and add the parameter macro task ID and priority of the new function, and the function expansion can be realized quickly and conveniently.
[0095] 4. The various modules of the present invention run in different threads respectively, and the advantages of Qt signal slot mechanism are utilized to support inter-thread communication and do not need to explicitly process data synchronization, so as to realize multi-threaded parallel processing, and put the functions that require fast and continuous reading and writing into a separate thread to run, so as to avoid blocking the main thread; the functions of each module are decoupled, so as to atomize the execution process of the software functions, which is conducive to reducing the difficulty of development and maintenance and improving design efficiency.
[0096] 5. Expand the functions and expressions of the UI interface by inheriting existing controls, so that it has new interactive features, is more in line with actual application scenarios and user needs, provides a humanized data display method and a richer and more flexible user experience.
[0097] Regarding the embodiments of the present invention, it should also be noted that, in the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to obtain new embodiments.
[0098] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. The protection scope of the present invention shall be subject to the protection scope of the claims. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical content disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of the technical solution of the present invention.
Claims
1. A method for interacting with a host computer data for a driver, characterized in that: The following steps are involved: S101. Select the device type and access level in the project start dialog box. Select inverter or server as the device type according to the type of drive. Select "user" or "manufacturer" as the access level. When selecting "manufacturer", enter the manufacturer password. S102, select the communication mode, that is, select RS485 or USB connection mode; set corresponding parameters according to the selected communication mode; S103, open the serial port, and determine whether the serial port opening is successful. If the opening fails, the communication fails and enters S108; if the opening is successful, enter S104 to test whether the communication is normal; Specifically, opening the serial port is performed through the parameters set in S102; S104, send a Modbus communication system diagnosis (08) message to the lower computer. If the test communication is normal, enter S105; if the test communication fails, poll the baud rate according to the baud rate list. If the polling of the baud rate is successful, enter S105; if the polling of the baud rate fails, that is, the test still fails after the baud rate list is traversed, the communication fails, and enter S108; S105, judging according to the communication mode set in S102, if it is RS485, proceed to S106; if it is USB, proceed to S107; S106, obtaining the actual baud rate of the lower computer and comparing it with the expected baud rate set in S102; If the two are consistent, the communication is successful and the process goes to S107; if the two are inconsistent, a write single register (06) message is sent to the driver lower computer to change the baud rate of the driver lower computer to the expected baud rate and the process goes to S107; S107, communication is successful, enter S109; S108, communication fails, enter S110; S109, sending a read single register (03) message to the driver slave computer to read the version information and access rights of the driver slave computer; if the access level is selected as "manufacturer authority" and the password is entered in S101, sending a write single register (06) message to the driver slave computer to write the manufacturer password to the driver slave computer; S110, load the device function code table excel file, initialize the data of each function code of the driver lower computer stored in this upper computer software, if the communication is successful, enter S111; if the communication fails, the upper computer software runs in "offline mode"; S111, sending a custom Modbus read function code group capacity (67) message to the driver slave computer, sending a custom Modbus read function code attribute (6A) message, sending a read single register (03) message, and updating the capacity of each function code group of the driver slave computer, the attribute of each function code and the current value data stored in this host computer software.
2. A method for interacting with a host computer for a driver according to claim 1, characterized in that: In S102, if RS485 is selected, serial port parameters such as serial port number, expected baud rate, data bit, check bit, stop bit, etc. are set; if USB is selected, only one parameter, namely the serial port number, needs to be set.
3. A host computer software system for a driver, used to execute the host computer data interaction method of claim 1, characterized in that: It includes visualization module, data processing module and communication module, among which: The visualization module includes a parameter editor, an oscilloscope, a monitoring console, a parameter macro, a fault record and a status bar with multiple UI interface windows; The data processing module includes a task queue module, a task scheduling thread module, and a data update function module. The data processing module is mainly responsible for managing various tasks to be executed and updating the driver function code data; The communication module is mainly responsible for the communication between the host computer software and the driver slave computer, and sends and receives Modbus messages through the serial port to achieve data exchange.
4. The driver host computer software system according to claim 1, characterized in that: The task queue module is used to store instantiated objects of custom task classes; The main information contained in the custom task class includes the task ID of the task object, the execution priority of the task object, and the Modbus message corresponding to the task object; the task ID is a hexadecimal integer represented by a macro definition; when the user performs user operations in the various interfaces of the visualization module, the custom task class object will be instantiated, and the task queue will enqueue them according to the execution priority of each task object. The task scheduling thread module is used to send out a scheduling signal including the task Modbus message and the expected return message length data; the signal is bound to the serial port communication function in the communication module; and the task will be removed from the task queue after execution. The data update function module processes the Modbus return message of the connected driver slave computer after the task scheduling thread completes executing a task, i.e., updates the data of the corresponding function code of the driver slave computer stored in the host computer software. After the data update is completed, the UI interface displaying the data is updated.
5. The host computer software system for a driver according to claim 1, characterized in that: The communication module includes a serial port connection function module, a Modbus thread module, and a serial port communication function module. The serial port connection function module is called when the host computer software attempts to communicate with the driver host computer; The Modbus thread module receives the scheduling signal sent by the task scheduling thread, and the serial port communication function bound thereto sends the Modbus message contained in the scheduling signal to the driver lower computer through the serial port; After sending the Modbus message contained in the scheduling signal to the driver lower computer, the serial port communication function module will obtain the return message of the driver lower computer through the serial port within a certain limited time. If the number of readable bytes in the serial port is equal to the data of the expected return message length contained in the scheduling signal value, all byte data in the serial port will be obtained and returned to the task scheduling thread.
Citation Information
Cited By
Motor controller online debugging system and method based on extended Modbus protocol
CN121657523A
