Address mapping configuration method for Modbus function register of precision pump equipment
By adopting the Modbus function register address mapping configuration method in precision pump equipment, the problems of low communication efficiency, poor real-time performance and complex firmware customization in the prior art are solved, and efficient and real-time communication control and a wide range of firmware applications are achieved.
Patent Information
- Application Number
- CN202510086322.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-01-20
Smart Images

Figure CN120010917A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless communication technology, and in particular to a method for configuring Modbus function register address mapping of precision pump equipment. Background Art
[0002] Peristaltic pumps, syringe pumps, gear pumps, plunger pumps and other precision pump equipment generally use Modbus protocol as the communication protocol to facilitate user control of the host remote control. To meet the diverse needs of users, pump equipment is set with multiple functions and multiple working modes. Corresponding to the multiple functions and multiple working modes of pump equipment, multiple Modbus function registers will be defined.
[0003] In actual applications, different users will use some of the functions and modes according to their needs (such as: Figure 4 "User 1", "User 2", etc.): Since different users need to use different functions and modes, they need to access multiple discontinuous function registers at the same time during application. In this case, it is necessary to split it into multiple control packets to complete it. Figure 4 As shown in the figure: "User 1" uses the function registers FUN-1, FUN-4, FUN-5, and FUN-n, which need to be split into 3 control packages to complete; "User 2" uses the function registers FUN-2, FUN-3, FUN-5, FUN-7, and FUN-n, which need to be split into 4 control packages to complete. This will cause the following disadvantages: 1. The addresses involved in use span multiple unused addresses, and multiple communication packages are required to complete the control during the control process, resulting in low communication efficiency and poor real-time performance. After splitting into multiple packages, the writing order of the function registers is completed, and there are differences in the update time, and it is uncertain: as shown in the attached figure. Figure 4 For example, in order to realize the control of FUN-1, FUN-4, FUN-5, and FUN-n, it is necessary to split the multi-package control (as shown in the attached Figure 5) is decomposed into control packet 1, control packet 2, and control packet 3, which are sent out in sequence. There will be delays T1 and T2 between the control packets, which makes the real-time performance poor. For example, if the effective time of the FUN-1 register is set to T0, the effective time of FUN-4 and FUN-5 is T0+T1, and the effective time of FUN-n is T0+T1+T2. Taking the commonly used communication baud rate of 9600bps as an example, the time difference between the first and the last effective time is T1+T2, which is about 0.5S~1S. For control registers that need to be issued at the same time, a maximum time difference of about 1S is generated after they are split into multiple packets. The time difference will cause a large precision error for instructions that require control accuracy. For example, for distributed instructions, the control cycle is close to 1S, and delays will result in the loss of control times, which is a functional failure state for industrial customers. 2. Based on the existing solution, when the needs of the same user change, the type, quantity, and order of the packets sent will be different, and the control flow of the user control software will also change, requiring a lot of adjustments to be implemented. 3. In order to meet the requirements of users who cannot accept the impact of shortcomings 1 and 2, improve communication efficiency and update synchronization, the definition order of function registers has changed, and it is necessary to rearrange the function register addresses for each requirement to form different firmware models to achieve it. There are many requirements, which will generate a large number of firmware program customizations, which are not easy to develop and manage.
[0004] In summary, the current arrangement of function register addresses basically defines all function registers, uniformly defines the address arrangement, starts with the user operation base address, and each function register address within the user operation address segment is fixed. It has the following disadvantages: low communication efficiency, poor real-time performance, complex timing for users to write control software, and the control interface will change with demand, resulting in a large number of customizations for special user needs. Summary of the invention
[0005] In order to solve the defects in the prior art, the present invention provides a Modbus function register address mapping configuration method for precision pump equipment.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] The Modbus function register address mapping configuration method of precision pump equipment of the present invention includes the following mapping configuration method:
[0008] Starting from the user operation base address, a variable user operation register address segment is defined;
[0009] Starting from the mapping configuration base, a mapping configuration register address segment is defined, and each function register of the precision pump corresponds to a mapping configuration address;
[0010] The value in each of the mapping configuration registers is used to indicate the position of the function register within the user operation register address segment relative to the user operation base address.
[0011] As a preferred technical solution of the present invention, when locating the user operation register address segment, the method further includes:
[0012] The dedicated configuration software is used to program the registers of the mapping configuration address segment according to the functional requirements, and a non-repetitive mapping offset address is written into the mapping configuration register corresponding to each necessary functional register.
[0013] As a preferred technical solution of the present invention, after the register of the mapping configuration address segment is written, it further includes:
[0014] All the written contents are stored in the mapping configuration storage, and after power is turned on again, all the mapping configuration address segment information is restored to the last setting state.
[0015] As a preferred technical solution of the present invention, the user control software access device running on the user control host further includes:
[0016] The device is accessed in the order of registers remapped according to the configuration, and the device responds to instructions in the order of registers remapped to connect to the product function module.
[0017] As a preferred technical solution of the present invention, the built-in algorithm structure of the dedicated configuration software includes: a visualized list of control function registers of precision pump products. The user determines the combination that needs to be accessed continuously according to the functions to be realized, and moves the registers in the list by dragging and dropping, so as to arrange them in a "what you see is what you get" manner.
[0018] As a preferred technical solution of the present invention, after the registers in the list are arranged, encrypted data is generated and sent to the precision pump in a unified manner. After obtaining confirmation feedback from the precision pump, the configuration step is completed.
[0019] As a preferred technical solution of the present invention, the programming encryption algorithm of the mapping configuration register is: password verification is carried out when writing data, and only when the password generated by the dedicated configuration software is successfully verified, it is written and stored in the mapping configuration storage EEPROM.
[0020] As a preferred technical solution of the present invention, the two continuous parts of the user operation address segment and the mapping configuration address segment constitute a register definition table, and the register definition table is a list of definitions of all accessible registers in the device.
[0021] As a preferred technical solution of the present invention, the user operation address segment includes all register addresses accessible to the user, starting with the user operation base address, and the definition of each register is determined by the actual configuration content of the user operation address segment.
[0022] As a preferred technical solution of the present invention, the mapping configuration address segment includes registers configured corresponding to each function register. The address segment starts with a mapping configuration base address and defines a mapping configuration register address segment. Each function register of the precision pump corresponds to a mapping configuration address. The value in each mapping configuration register is used to guide the position of the function register relative to the user operation base address in the user operation register address segment.
[0023] The beneficial effects of the present invention are:
[0024] 1. This Modbus function register address mapping configuration method for precision pump equipment can be sorted according to the needs of each user. The registers that need to be operated simultaneously are defined as continuous and segmented continuous user operation addresses and configured in continuous segments. This allows one control package to issue instructions and ensures the corresponding real-time performance. The complexity of the user control software is reduced, and there is no need to additionally disassemble multiple control packages and issue instructions in a time sequence. When the user needs to adjust the order of the function register address definition, the mapping configuration can be directly changed to achieve it, which greatly reduces user customization of the firmware and effectively improves the application scope of the firmware.
[0025] 2. This kind of precision pump equipment Modbus function register address mapping configuration method can configure the address redefinition method. Users can configure the software to instantly change to the required address arrangement according to control requirements, reducing the complexity of system development; eliminating the development and communication links of both parties for customized requirements, and the system function is highly efficient; the efficiency and real-time performance of communication control of pump equipment are also greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0027] Figure 1 It is an overall flow chart of the Modbus function register address mapping configuration method of precision pump equipment of the present invention;
[0028] Figure 2 It is a structural block diagram of the Modbus function register address mapping configuration method of precision pump equipment of the present invention;
[0029] Figure 3It is a schematic diagram of the application of the mapping configuration scheme of the Modbus function register address mapping configuration method of the precision pump equipment of the present invention;
[0030] Figure 4 It is a current application schematic diagram of the mapping configuration scheme of the Modbus function register address mapping configuration method of the precision pump equipment of the present invention;
[0031] Figure 5 It is a timing diagram of splitting multi-packet control of the Modbus function register address mapping configuration method of the precision pump equipment of the present invention. DETAILED DESCRIPTION
[0032] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0033] Example: Figure 1 , Figure 2 and Figure 3 As shown, the Modbus function register address mapping configuration method of precision pump equipment of the present invention includes the following mapping configuration method:
[0034] Starting from the user operation base address, a variable user operation register address segment is defined; starting from the mapping configuration base, a mapping configuration register address segment is defined, and each function register of the precision pump corresponds to a mapping configuration address; the value in each mapping configuration register is used to guide the function register, and the position relative to the user operation base address in the user operation register address segment can be sorted according to the needs of each user, and the registers that need to be operated simultaneously are defined as continuous and segmented continuous user operation addresses, which are configured in a continuous segment, so that one control package can be used to issue instructions to ensure the corresponding real-time performance; the complexity of the user control software is reduced, and there is no need to additionally disassemble multiple control packages and issue instructions in a time sequence; when the user has the need to adjust the order of function register address definitions, the mapping configuration can be directly changed to achieve it, which greatly reduces user customization of the firmware and effectively improves the application scope of the firmware. Among them, when locating the user operation register address segment, the method also includes: using the dedicated configuration software, according to the functional requirements, to write the register of the mapping configuration address segment, and write a non-repetitive mapping offset address to the mapping configuration register corresponding to each necessary function register, and the dedicated configuration software has the function of automatically judging repeated addresses, and can avoid duplication when setting; after the register of the mapping configuration address segment is written, it further includes: all the written contents are stored in the mapping configuration storage, and all the mapping configuration address segment information is restored to the last setting state after power is turned on again; running the user control software on the user control host to access the device, further including: accessing the device according to the register sequence after the configuration remapping, the device responds to the instruction according to the register sequence after the remapping, and connects to the product function module to achieve the control function. The configurable address redefinition method allows the user to use the configuration software to instantly change to the required address arrangement according to the control requirements, thereby reducing the complexity of system development; eliminating the development links and communication links of both parties for customized requirements, and the system function is highly efficient; the efficiency and real-time performance of communication control of pump equipment are also greatly improved.
[0035] Among them, the built-in algorithm structure of the dedicated configuration software includes: a visualized list of control function registers of precision pump products. The user determines the combination that needs to be accessed continuously according to the functions to be realized, and moves the registers in the list by dragging and dropping, and arranges them in a "what you see is what you get" manner. After the registers in the list are arranged, encrypted data is generated and sent to the precision pump in a unified manner. After obtaining confirmation feedback from the precision pump, the configuration steps are completed.
[0036] Among them, the programming encryption algorithm of the mapping configuration register is: with password verification when writing data, only the password generated by the dedicated configuration software is written and stored in the mapping configuration storage EEPROM when the password verification is successful, which can prevent accidental writing on the bus and ensure that the configuration information is not accidentally destroyed.
[0037] The two continuous parts of the user operation address segment and the mapping configuration address segment constitute a register definition table, and the register definition table is a list of definitions of all accessible registers in the device.
[0038] The user operation address segment includes all the register addresses accessible to the user, starting with the user operation base address, and the definition of each register is determined by the actual configuration content of the user operation address segment.
[0039] Among them, the mapping configuration address segment includes registers configured corresponding to each function register. The address segment starts with the mapping configuration base address and defines the mapping configuration register address segment. Each function register of the precision pump corresponds to a mapping configuration address. The value in each mapping configuration register is used to guide the position of the function register relative to the user operation base address in the user operation register address segment.
[0040] Example 1: With the attached Figure 4 The user uses the FUN-1, FUN-4, FUN-5, and FUN-n function registers. Figure 3 As shown, CFG-1 points to address 1, CFG-4 points to address 2, CFG-5 points to address 3, and CFG-5 points to address 4; after remapping, the four consecutive addresses starting with the user operation register base address, 1, 2, 3, and 4, correspond to the FUN-1, FUN-4, FUN-5, and FUN-n function registers respectively.
[0041] Example 2: With the attachment Figure 4 The user uses the FUN-2, FUN-3, FUN-5, FUN-7, and FUN-n function registers. Figure 3 As shown, CFG-2 points to address 1, CFG-3 points to address 2, CFG-5 points to address 3, CFG-7 points to address 4, and CFG-n points to address 5. After remapping, the five consecutive addresses 1, 2, 3, 4, and 5 starting with the base address of the user operation register correspond to the FUN-2, FUN-3, FUN-5, FUN-7, and FUN-n function registers, respectively.
[0042] Through the above two example case tests, we know that when using the current fixed address arrangement, access to the necessary register addresses needs to be split into 4 packets, with an estimated maximum time consumption of 1.5 seconds, and a delay of about 1 second between the first packet and the last packet; after adopting the mapping configuration scheme, only 1 packet needs to be sent to access all register addresses, with an estimated time consumption of 0.2 seconds, and no delay between multiple packets, making the communication efficient and ensuring real-time performance.
[0043] When working, the Modbus function register address mapping configuration method of this precision pump equipment can be sorted according to the needs of each user. The registers that need to be operated simultaneously are defined as continuous and segmented continuous user operation addresses, which are configured in continuous segments. This can realize one control package to issue instructions and ensure the corresponding real-time performance. The complexity of the user control software is reduced, and there is no need to additionally disassemble multiple control packages and issue instructions in a time sequence. When the user needs to adjust the definition order of the function register address, he can directly change the mapping configuration to achieve it, which greatly reduces user customization of the firmware and effectively improves the application scope of the firmware. The configurable address redefinition method allows users to configure the software to instantly change to the required address arrangement according to control requirements, reducing the complexity of system development. It eliminates the development and communication links of both parties for customized requirements, and the system function is highly efficient. The efficiency and real-time performance of communication control of pump equipment are also greatly improved.
[0044] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. The Modbus function register address mapping configuration method for precision pump equipment is characterized in that: Includes the following mapping configuration methods: Starting from the user operation base address, a variable user operation register address segment is defined; Starting from the mapping configuration base, a mapping configuration register address segment is defined, and each function register of the precision pump corresponds to a mapping configuration address; The value in each of the mapping configuration registers is used to indicate the position of the function register within the user operation register address segment relative to the user operation base address.
2. The Modbus function register address mapping configuration method for precision pump equipment according to claim 1, characterized in that: When locating the user operation register address segment, the method further includes: The dedicated configuration software is used to program the registers of the mapping configuration address segment according to the functional requirements, and a non-repetitive mapping offset address is written into the mapping configuration register corresponding to each necessary functional register.
3. The Modbus function register address mapping configuration method for precision pump equipment according to claim 2, characterized in that: After the register of the mapping configuration address segment is written, the method further includes: All the written contents are stored in the mapping configuration storage, and after power is turned on again, all the mapping configuration address segment information is restored to the last setting state.
4. The Modbus function register address mapping configuration method for precision pump equipment according to claim 3 is characterized in that: Running the user control software on the user control host to access the device further comprises: The device is accessed in the order of registers remapped according to the configuration, and the device responds to instructions in the order of registers remapped to connect to the product function module.
5. The Modbus function register address mapping configuration method for precision pump equipment according to claim 2, characterized in that: The built-in algorithm structure of the dedicated configuration software includes: a visualized list of control function registers of precision pump products. The user determines the combination that needs to be accessed continuously according to the functions to be realized, and moves the registers in the list by dragging and dropping, so as to arrange them in a "what you see is what you get" manner.
6. The Modbus function register address mapping configuration method for precision pump equipment according to claim 5, characterized in that: After the registers in the list are arranged, encrypted data is generated and sent to the precision pump in a unified manner. After receiving confirmation feedback from the precision pump, the configuration steps are completed.
7. The Modbus function register address mapping configuration method for precision pump equipment according to claim 1, characterized in that: The programming encryption algorithm of the mapping configuration register is: password verification is carried out when writing data, and only when the password generated by the dedicated configuration software is successfully verified, it is written and stored in the mapping configuration storage EEPROM.
8. The Modbus function register address mapping configuration method for precision pump equipment according to claim 1, characterized in that: The two continuous parts of the user operation address segment and the mapping configuration address segment constitute a register definition table, and the register definition table is a list of definitions of all accessible registers in the device.
9. The Modbus function register address mapping configuration method for precision pump equipment according to claim 8, characterized in that: The user operation address segment includes all register addresses accessible to the user, starting with the user operation base address. The definition of each register is determined by the actual configuration content of the user operation address segment.
10. The Modbus function register address mapping configuration method for precision pump equipment according to claim 8, characterized in that: The mapping configuration address segment includes registers configured corresponding to each function register. The address segment starts with the mapping configuration base address and defines the mapping configuration register address segment. Each function register of the precision pump corresponds to a mapping configuration address. The value in each mapping configuration register is used to guide the position of the function register relative to the user operation base address in the user operation register address segment.
Citation Information
Patent Citations
Access control method for synchronous dynamic memory and synchronous dynamic memory controller
CN101021819A
I / O (input / output) remapping method and device for plurality of shared systems
CN102722458A
Modbus address remapping method used for electric quantity module
CN104407983A
Modbus multi-slave-station data acquisition and lower control method and system based on address mapping
CN117544442A
User programmable method for mapping address of multi-channel instrument communication register
CN119105803A