Control panel configuration method, system and equipment and storage medium

By using a unified firmware program in the embedded control system and reading the identification information on the control board for runtime configuration, the problem of independently developing and burning firmware in each control board under the traditional development mode is solved, and the effect of reducing software maintenance costs and improving hardware flexibility is achieved.

CN119576848APending Publication Date: 2025-03-07CHONGQING MIDEA GENERAL REFRIGERATING EQUIP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411411689.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

In embedded control systems, under the traditional development model, each control board needs to independently develop and record firmware programs, resulting in complex production processes, high risk of errors, and high software maintenance costs.

Method used

By reading the user setting identification information on the target control board as the configuration index, the function configuration set is matched in the pre-stored configuration set array, and the control board is initialized and configured and registered according to the configuration set, realizing the versatility of a unified firmware program.

Benefits of technology

Reduces software maintenance costs, improves hardware flexibility and scalability, simplifies production and maintenance processes, and reduces the use of storage resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119576848A_ABST
    Figure CN119576848A_ABST
Patent Text Reader

Abstract

The invention discloses a control panel configuration method, system and device and a storage medium, and the method comprises the steps: reading identification information set by a user on a target control panel, and taking the identification information as a configuration index; matching a function configuration set corresponding to the configuration index in a pre-stored configuration set array; performing initialization configuration on the target control panel according to the function configuration set to generate an operation instance; and registering the operation instance into a microcontroller unit of the target control board according to the function configuration set. The control panel uses a unified firmware program, and different functions of the control panel are realized through configuration during operation, so that the software maintenance cost is reduced, and the hardware flexibility and expandability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a control panel configuration method, system, device and storage medium. Background Art

[0002] In embedded control systems, in order to achieve complex control tasks, multiple control boards are often required to work together. These control boards are connected to each other through communication buses to achieve data exchange and synchronization. These control boards all use standardized microcontroller units (MCUs) as core processing components and are equipped with similar onboard hardware facilities. The differences between them are mainly reflected in the connected external devices and software functions.

[0003] In the traditional development model, each control board is independently developed according to its specific functions. After the development is completed, the developer needs to release an independent firmware burning program for the control board. In a mass production environment, this practice requires burning the corresponding specific firmware program for each control board, which not only increases the complexity of the production process, but also increases the risk of errors. Summary of the invention

[0004] The main purpose of the present invention is to provide a control panel configuration method, system, device and storage medium, so that the control panel can use a unified firmware program to implement different functions of the control panel through runtime configuration, reduce software maintenance costs, and improve hardware flexibility and scalability.

[0005] In order to achieve the above objectives, the embodiments of the present application provide the following technical solutions:

[0006] According to a first aspect of an embodiment of the present application, a control panel configuration method is provided, the method comprising:

[0007] Read the identification information set by the user on the target control panel as a configuration index;

[0008] Matching the function configuration set corresponding to the configuration index in a pre-stored configuration set array;

[0009] Initialize the configuration of the target control board according to the functional configuration set to generate a running instance;

[0010] The running instance is registered in the microcontroller unit of the target control board according to the functional configuration set.

[0011] Optionally, the functional configuration set includes at least one of memory requirements, control logic, and peripheral hardware configuration information;

[0012] The initializing configuration of the target control board according to the functional configuration set to generate a running instance includes:

[0013] Acquire corresponding memory space according to the memory requirement;

[0014] In the acquired memory space, creating a module instance according to the control logic;

[0015] According to the peripheral hardware configuration information, setting the initial state and parameters of the module instance;

[0016] The running instance is generated according to the set module instance.

[0017] Optionally, the running instance includes a device driver or a module program; the function configuration set includes an operation function;

[0018] The step of registering the running instance into the microcontroller unit of the target control board according to the functional configuration set includes:

[0019] The device driver and the corresponding operation function, as well as the module program and the corresponding operation function are registered in the microcontroller unit of the target control board.

[0020] Optionally, matching a function configuration set corresponding to the configuration index in a pre-stored configuration set array includes:

[0021] According to the configuration index, a corresponding function configuration set is matched in a configuration set array pre-stored in a flash memory of a microcontroller unit of the target control board.

[0022] Optionally, before reading identification information set by a user on the target control panel, the method further includes:

[0023] For each control panel to be entered, obtain the configuration information of the control panel;

[0024] Extracting setting type information from the configuration information and defining it as a configuration item, the setting type information including at least one of the number of external devices on the control board, a device connection mode, and a module parameter;

[0025] Generate a corresponding function configuration set for each function of the control board according to the configuration item;

[0026] All function configuration sets and corresponding configuration indexes are combined into a configuration set array and stored in the flash memory of the microcontroller unit.

[0027] Optionally, the initializing configuration of the target control board according to the functional configuration set, the method further includes:

[0028] The configuration index is configured as the communication address of the target control board on the communication bus.

[0029] Optionally, the method further comprises:

[0030] Acquire a configuration index of a target communication control board from the configuration set array; the target communication control board is a control board that communicates with the target control board;

[0031] The target communication control board is accessed through the communication bus according to the communication address matched by the configuration index of the target communication control board.

[0032] According to a second aspect of an embodiment of the present application, a control panel configuration system is provided, the system comprising:

[0033] An identification reading module is used to read the identification information set by the user on the target control panel as a configuration index;

[0034] A function configuration set acquisition module, used to match the function configuration set corresponding to the configuration index in a pre-stored configuration set array;

[0035] An initialization module, used to initialize the configuration of the target control board according to the functional configuration set and generate a running instance;

[0036] A registration module is used to register the running instance in a microcontroller unit of a target control board according to the functional configuration set.

[0037] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect above.

[0038] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the method described in the first aspect above.

[0039] In summary, the embodiments of the present application provide a control panel configuration method, system, device and storage medium, which reads the identification information set by the user on the target control panel as a configuration index; matches the function configuration set corresponding to the configuration index in the pre-stored configuration set array; initializes the target control panel according to the function configuration set to generate a running instance; and registers the running instance to the microcontroller unit of the target control panel according to the function configuration set. The control panel uses a unified firmware program to implement different functions of the control panel through runtime configuration, reducing software maintenance costs and improving hardware flexibility and scalability. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art 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 the structures shown in these drawings without paying creative work.

[0041] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0042] Figure 1 A schematic diagram of a control panel configuration method provided in an embodiment of the present application;

[0043] Figure 2 Schematic diagram of different types of control panel configurations provided in the embodiments of the present application;

[0044] Figure 3 A control panel configuration system block diagram provided in an embodiment of the present application;

[0045] Figure 4 A structural diagram of an electronic device provided in an embodiment of the present application is shown;

[0046] Figure 5 A diagram showing a computer-readable storage medium provided by an embodiment of the present application.

[0047] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] 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.

[0049] It should be noted that all directional indications in the embodiments of the present invention (such as up, down, left, right, front, back, etc.) are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0050] In addition, in the present invention, descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0051] In the present invention, unless otherwise clearly specified and limited, the terms "connection", "fixation", etc. should be understood in a broad sense. For example, "fixation" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0052] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in the field can implement it. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0053] Figure 1 A control panel configuration method provided in an embodiment of the present application is shown, the method comprising:

[0054] Step S101: Read the identification information set by the user on the target control panel as a configuration index;

[0055] Step S102: matching the function configuration set corresponding to the configuration index in the pre-stored configuration set array;

[0056] Step S103: Initializing the target control board according to the function configuration set to generate a running instance;

[0057] Step S104: registering the running instance into the microcontroller unit of the target control board according to the functional configuration set.

[0058] In a possible implementation manner, before reading the identification information set by the user on the target control panel in step S101, the method further includes:

[0059] For each control board to be entered, the configuration information of the control board is obtained; the setting type information in the configuration information is extracted and defined as a configuration item, wherein the setting type information includes at least one of the number of external devices on the control board, the device connection method and the module parameters; a corresponding function configuration set is generated for each function of the control board according to the configuration item; all the function configuration sets and the corresponding configuration indexes are combined into a configuration set array, and stored in the flash memory of the microcontroller unit.

[0060] For each control board that will be added to the system, its detailed configuration information is first obtained. The setting type information is extracted from the collected configuration information, including key information such as the number of external devices on the control board, device connection methods, and module parameters, and defined as configuration items. Based on the configuration items of each control board, a dedicated function configuration set is generated for each function of the control board to ensure that each function can be accurately configured. All generated function configuration sets and their corresponding configuration indexes are combined into a configuration set array, which is stored in the flash memory of the microcontroller unit for fast access and retrieval during program startup and runtime.

[0061] In a possible implementation, in step S102, a functional configuration set corresponding to the configuration index is matched in a pre-stored configuration set array, including: matching the corresponding functional configuration set in a configuration set array pre-stored in the flash memory of the microcontroller unit of the target control board according to the configuration index.

[0062] Using the configuration index set by the user on the target control board, this index is pre-set by the user through a dip switch or other mechanism to identify the role or function of the control board. The system will then access the flash memory of the microcontroller unit, where a configuration set array is pre-stored. This array contains all possible functional configuration sets, each of which is a collection of preset parameters and instructions to meet the functions of a specific control board. The system performs an exact match in the configuration set array based on the configuration index read to find the corresponding functional configuration set. This matching process is automated. Once the match is successful, the system applies this functional configuration set to the target control board, laying the foundation for the subsequent initial configuration and run instance generation.

[0063] In a possible implementation, the functional configuration set includes at least one of memory requirements, control logic, and peripheral hardware configuration information; in step S103, the target control board is initialized and configured according to the functional configuration set to generate a running instance, including: obtaining the corresponding memory space according to the memory requirements; creating a module instance in the acquired memory space according to the control logic; setting the initial state and parameters of the module instance according to the peripheral hardware configuration information; and generating the running instance according to the set module instance.

[0064] Based on the memory requirements defined in the functional configuration set, the system obtains the corresponding memory space to provide the necessary resource guarantee for the operation of subsequent modules. In the successfully allocated memory space, according to the control logic encoded in the configuration set, the system carefully constructs the module instance to ensure that each module can run accurately according to the predetermined logic. Referring to the peripheral hardware configuration information in the functional configuration set, the system performs detailed initial state and parameter settings for the module instance so that the peripheral hardware can work seamlessly with the module. After completing the above steps, the system will generate the final running instance based on the set module instance to provide support for the startup and operation of the control board.

[0065] In one possible implementation, the running instance includes a device driver or a module program; the functional configuration set includes an operation function; in step S104, registering the running instance to the microcontroller unit of the target control board according to the functional configuration set includes: registering the device driver and the corresponding operation function, and the module program and the corresponding operation function to the microcontroller unit of the target control board.

[0066] Each device driver is paired with its corresponding operation function and registered to the unified management framework in the microcontroller unit. This ensures that the device driver can respond to system calls and perform the expected hardware interaction tasks. Similarly, module programs and their corresponding operation functions are also registered in the management framework. This allows module programs to be flexibly called in the system to perform specific functions or process specific data. By incorporating device drivers and module programs into a unified management framework (microcontroller unit), the system achieves centralized management and scheduling of each component, improving the maintainability and scalability of the code.

[0067] In a possible implementation manner, the method of initializing the configuration of the target control board according to the functional configuration set further includes:

[0068] The configuration index is configured as the communication address of the target control board on the communication bus.

[0069] In a possible implementation, the method further includes: obtaining a configuration index of a target communication control board from the configuration set array; the target communication control board is a control board that communicates with the target control board; and accessing the target communication control board through the communication bus according to a communication address that matches the configuration index of the target communication control board.

[0070] During the initial configuration process, the microcontroller unit of the target control board sets the configuration index as the unique communication address of the target control board on the communication bus. This ensures that the control board can be correctly identified and simplifies address management during the communication process. By directly mapping the configuration index to the communication address, the method of the microcontroller unit of the target control board allows the system to dynamically configure and identify each control board participating in the communication, thereby improving the flexibility and reliability of the communication.

[0071] When it is necessary to communicate with other control boards in the system, the method of the microcontroller unit of the target control board includes obtaining the configuration index of the target communication control board from the configuration set array. Using the configuration index of the target communication control board, the system of the microcontroller unit of the target control board accesses the control board through the communication bus, and transmits or receives data according to the communication address matched by the index. Through the above communication mechanism, the various control boards in the system can work together to achieve efficient data exchange and coordinated execution of tasks, thereby improving the operating efficiency of the entire system. Using the configuration index as the communication address also helps to implement security measures in the system to prevent illegal access and ensure the stability of the communication process and the integrity of the data.

[0072] The control panels provided in the embodiments of the present application are in the same embedded control system, and all control panels use a unified firmware program, and realize their respective specific functions by dynamically selecting configurations at runtime, significantly reducing software maintenance costs. A common software platform is constructed through modular design, so that different functions can be realized only by configuring the corresponding functional module parameters and quantities, which not only maximizes the reuse rate of the software, but also greatly improves development efficiency and reduces development costs. In addition, by dynamically allocating and registering modules at runtime, the occupancy of storage resources is effectively reduced, the demand for hardware storage is reduced, and the overall cost is reduced. This design strategy realizes the optimal utilization of software and hardware resources, improves the flexibility and scalability of the system, and simplifies the production and maintenance processes.

[0073] The control panel configuration method provided in the embodiment of the present application is described in detail below with reference to the accompanying drawings.

[0074] The embodiment of the present application provides a software system design for a water machine multi-control board system to minimize storage resource consumption and improve system flexibility. The unified program firmware supports the main control board and the expansion board, and the roles are switched through the dip switch. When the software is running, the corresponding configuration is dynamically selected through the unique identifier on the circuit board (corresponding to the setting value of the dip switch) to achieve differentiated software functions of different control boards. The flexibility and scalability of the system are improved, and the maintenance cost of the system can also be reduced.

[0075] The system consists of a main control circuit board and multiple expansion circuit boards. Figure 2 The configuration diagram of the main control board and the expansion board is shown, and these control boards are connected through a communication bus. This application introduces a configuration management system so that the same set of codes can support all the main control circuit boards and expansion circuit boards in the system at the same time.

[0076] Figure 2 "Configuration Set 0" to "Configuration Set 3" indicate that the system has designed four different configuration sets, each of which corresponds to one or more specific functions of one or more control boards, allowing the system to dynamically select and apply the corresponding configuration set according to the needs of different control boards, thereby optimizing resource utilization and reducing costs. The main control board and the expansion board correspond to different configuration sets, but the code shares the same set, so that the same set of code supports configuration as both the main control board and the expansion board, but only one of the two can be selected for the same motherboard. The corresponding configuration set is selected based on the setting value of the dip switch to achieve role switching. Module creation refers to allocating memory, initializing devices, and instantiating module programs according to the configuration items listed in the configuration set. Module registration refers to installing the module program and its operation functions into the microcontroller unit of the target control board so that the application layer can access them.

[0077] A dip switch is a device on the board that can be easily set to different values ​​by manual operation, and the program can read the current value of the dip switch. Each board has a dip switch, and if it is set to a different value, the program can read the value to understand the user's intention.

[0078] First, the control panel software system is modularly designed to separate reusable components such as drivers, subsystems, and control logic.

[0079] The configuration list of all main control boards and expansion boards is preset in the program firmware in the form of compile-time constants. When the program starts, it automatically selects which set of configurations to use for the creation and registration of peripheral objects by reading the value of the current dip switch. Peripheral creation refers to allocating memory, initializing devices, and instantiating device drivers according to the configuration items listed in the configuration set. Peripheral registration refers to installing the device driver and its operating functions into the microcontroller unit of the target control board so that the application layer can access them. Since the RAM space of the MCU is usually more scarce, the advantage of the embodiment of the present application is that the peripheral objects are created on demand (occupying RAM space) through the selected configuration, and the additional configuration storage space that must be consumed is all located in the code ROM area. The embodiment of the present application requires the aforementioned dynamic peripheral driver model to cooperate with it. Specifically including:

[0080] Step 1: Before separating the code and configuration, extract the variable part and make it into configurable items, including at least one of the number of external devices on the control board, the device connection method and the module parameters;

[0081] Step 2: Separate the fixed code and variable configuration items. Configuration items may include the device connection method, module parameters and quantity, etc. These variable parts are designed as configurable items. The specific implementation is to extract the configurable items in the form of C language macro definitions and put them into a separate .h header file. The value range of each configuration item is clarified through comments or documents. The application layer modifies the corresponding macro definition according to the requirements to avoid directly modifying the code when the requirements change, thereby realizing code reuse.

[0082] Step 3: According to the configuration items, organize the functions of each control board in the system into different configuration sets and store them as an array. This array is stored in the MCU's flash memory as constant data known at compile time. Each module only occupies code space at compile time, and dynamically applies for memory and instantiation according to the actual configuration at runtime, thereby effectively controlling the consumption of storage resources.

[0083] The functions of each control board required in the system are organized into a configuration set array according to the configuration items. Since the flash memory storage resources of the MCU are usually richer, the array will be stored in the flash memory of the MCU code area as constant data known at compile time. At this time, each module will only occupy the code flash memory space, and only at runtime will it dynamically apply for memory and execute instantiation as needed according to different configurations, thereby controlling the storage resource consumption of the unified firmware program without excessive expansion and exceeding the MCU memory resource limit.

[0084] For example: the system has two mainboards, one is the main control board and the other is the expansion board. The external devices of the main control board: 3 temperature sensors, 4 pressure sensors, 1 fan, 1 compressor; the external devices of the expansion board: 6 temperature sensors, 8 pressure sensors, 2 fans, 2 compressors; the configuration items are the information about the type, quantity, connection method, etc. of these devices, and the configuration set is a set of all configuration items that describe the actual board device information. In the example, since there are two mainboards in the system, two sets of configuration sets are required to describe them. These two sets of configuration sets are stored in the program code segment in the form of C language constant numbers, and finally burned into the MCU flash storage area. When the program is running, the value of the aforementioned dip switch is used as the array subscript to select which of the two configuration sets to use, and then the program executes the corresponding creation and registration logic according to the selected configuration set.

[0085] The configuration list of all main control boards and expansion boards is preset in the firmware. When the program starts, the DIP switch value is read and the corresponding configuration is selected to create and register the peripheral object. In this way, the software system is not only more efficient in the development stage, but also simpler and more reliable in mass production and after-sales maintenance. This design pattern is particularly suitable for multi-control board systems such as air conditioner water machine embedded control systems, which can significantly reduce software development and maintenance costs.

[0086] In terms of software implementation, this solution adopts a modular design, separating components such as drivers, subsystems, and control logic, which improves the reusability of the code. All configuration sets are stored in the program firmware as compile-time constants. When the program starts, the corresponding configuration set is automatically selected according to the value of the DIP switch to create and register peripheral objects. This solution also separates code from configuration information, storing variable configuration items in a separate header file in the form of macro definitions. This not only avoids direct code modification, but also improves code reusability.

[0087] Second, during the operation phase, the firmware program identifies the role of the control board by reading the value of the DIP switch, and dynamically creates, initializes, and registers the module according to the selected configuration set. This dynamic configuration selection during runtime effectively reduces the use of storage resources.

[0088] When the firmware program is running, it reads specific information on the control board (such as the settings of the dip switch) as the configuration index to identify its operating environment. Then, the program uses this index to select the corresponding configuration set in the configuration set array, and performs memory allocation, module instantiation and initialization, and running control logic according to this configuration set. Specifically, it includes:

[0089] Step 1: The firmware program first reads specific information on the control board, such as the settings of the dip switches, which serve as the configuration index.

[0090] Step 2: Use the configuration index (Index) to select the corresponding configuration set in the configuration set array pre-stored in the MCU flash memory.

[0091] Step 3: Based on the selected configuration set, the firmware program dynamically applies for memory space for the required modules. This step is only performed at runtime to reduce the occupation of storage resources.

[0092] Step 4: In the allocated memory space, the firmware creates instances of modules. These modules are defined according to the configuration set and may include drivers, subsystems, control logic, etc.

[0093] Step 5: Initialize the instantiated modules, set the initial state and parameters of the modules, and ensure that they can run as expected.

[0094] Step 6: The firmware program performs corresponding operations according to the control logic defined in the configuration set, including startup, monitoring, adjustment and other tasks.

[0095] The prior art requires writing different codes for different roles (such as main control board, expansion board), compiling and burning different firmware programs; it does not need to distinguish roles by reading this information, but requires more repeated development and maintenance work, and is prone to firmware burning errors. The present invention solves these problems by using a unified firmware program and configuring it to different roles at runtime. Therefore, the difference is that the previous existing solution defines the role of the board by manually burning different firmware, and the embodiment of the present application automatically identifies the role of the board by reading the dial code value.

[0096] The third aspect is the communication between control boards.

[0097] The configuration set index Index can also be used as the communication address on the communication bus between control boards, so that the purpose of communication reference to other control boards in the constant configuration set information can be achieved, and it can be ensured that there will be no conflict in the bus communication address. The purpose of communication reference to other control boards in the constant configuration set information can be achieved. Specifically, the following steps can be included:

[0098] Step 1: The firmware program reads the configuration index on the control board, such as the settings of the dip switches.

[0099] Step 2: Use the configuration index to select a configuration set and complete the process of creating and registering the module.

[0100] Step 3: Initialize the communication bus using the configuration index as the local address.

[0101] Step 4: Use the configuration index of other modules as the target communication address in the module code to access other boards through the bus.

[0102] These steps constitute the basic flow of the firmware program at runtime. They are interrelated and ensure that the control board can correctly perform tasks according to its specific configuration set and work with other control boards. In this way, a highly flexible and scalable embedded control system design can be achieved.

[0103] Through the above mechanism, a single firmware design can be realized that can be compiled once and run on multiple boards. This means that no matter how many different control boards there are, they can all use the same firmware program and only need to make appropriate adjustments according to their respective configurations at runtime. In summary, through modular design, separation of code and configuration, dynamic configuration selection at runtime, and the use of communication addresses, an efficient, flexible, and cost-effective software system design solution is achieved, which is suitable for water machine multi-control board systems.

[0104] The method provided in the embodiment of the present application realizes an innovative "compile once, run in multiple places" solution through the concept of software modularization and platformization, effectively solving the problems of high software development and maintenance costs, cumbersome production processes and easy errors in multi-control board systems. This method not only greatly reduces the workload of multi-control board system software development and maintenance, simplifies the production process, but also significantly improves production efficiency and reduces the error rate. In terms of product after-sales maintenance, it also realizes easy interchangeability between control boards.

[0105] For example, in a system with three motherboards A, B, and C, each motherboard is set to an identification value of 0, 1, and 2 through a DIP switch. If motherboard B fails and needs to be replaced, the operator only needs to take a new motherboard that has been burned with a unified firmware program and set its DIP switch to 1 to replace the faulty motherboard B. The repaired motherboard B can also be flexibly replaced with other motherboards in the system by setting the same DIP switch value. This design not only improves the reliability of the system, but also makes maintenance work extremely simple.

[0106] The control panel functions can be differentiated by dynamically selecting configurations through the DIP switch. The system presets multiple configuration sets, each corresponding to different control panel functions. In this way, the same set of code can be flexibly adapted to the main control panel or expansion board, thereby maximizing software reuse and reducing development and maintenance costs.

[0107] In summary, the embodiment of the present application provides a control panel configuration method, which reads the identification information set by the user on the target control panel as a configuration index; matches the function configuration set corresponding to the configuration index in the pre-stored configuration set array; initializes the target control panel according to the function configuration set to generate a running instance; and registers the running instance to the microcontroller unit of the target control panel according to the function configuration set. The control panel uses a unified firmware program to implement different functions of the control panel through runtime configuration, reducing software maintenance costs and improving hardware flexibility and scalability.

[0108] Based on the same technical concept, the embodiment of the present application also provides a control panel configuration system, such as Figure 3 As shown, the system comprises:

[0109] The identification reading module 301 is used to read the identification information set by the user on the target control panel as a configuration index;

[0110] A function configuration set acquisition module 302 is used to match the function configuration set corresponding to the configuration index in a pre-stored configuration set array;

[0111] An initialization module 303 is used to initialize the target control board according to the function configuration set and generate a running instance;

[0112] The registration module 304 is used to register the running instance in the microcontroller unit of the target control board according to the functional configuration set.

[0113] The present application also provides an electronic device corresponding to the method provided in the above embodiment. Figure 4 , which shows an electronic device diagram provided by some embodiments of the present application. The electronic device 20 may include: a processor 200, a memory 201, a bus 202 and a communication interface 203, wherein the processor 200, the communication interface 203 and the memory 201 are connected via the bus 202; the memory 201 stores a computer program that can be run on the processor 200, and the processor 200 executes the method provided by any of the aforementioned embodiments of the present application when running the computer program.

[0114] The memory 201 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one physical port (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0115] The bus 202 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used to store programs, and the processor 200 executes the programs after receiving execution instructions. The method disclosed in any implementation of the aforementioned embodiment of the present application may be applied to the processor 200, or implemented by the processor 200.

[0116] The processor 200 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 200. The above processor 200 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 201, and the processor 200 reads the information in the memory 201 and completes the steps of the above method in combination with its hardware.

[0117] The electronic device provided in the embodiment of the present application and the method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, operated or implemented by them.

[0118] The present application also provides a computer-readable storage medium corresponding to the method provided in the above embodiment. Figure 5 The computer-readable storage medium shown is a CD 30 on which a computer program (ie, a program product) is stored. When the computer program is run by a processor, the method provided in any of the aforementioned embodiments is executed.

[0119] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.

[0120] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.

[0121] It should be noted that the above embodiments illustrate the present application rather than limit the present application, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be constructed as a limitation to the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The present application may be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.

[0122] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

[0123] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.

Claims

1. A control panel configuration method, characterized in that: The method comprises: Read the identification information set by the user on the target control panel as a configuration index; Matching the function configuration set corresponding to the configuration index in a pre-stored configuration set array; Initialize the configuration of the target control board according to the functional configuration set to generate a running instance; The running instance is registered in the microcontroller unit of the target control board according to the functional configuration set.

2. The method according to claim 1, characterized in that The functional configuration set includes at least one of memory requirements, control logic, and peripheral hardware configuration information; The initializing configuration of the target control board according to the functional configuration set to generate a running instance includes: Acquire corresponding memory space according to the memory requirement; In the acquired memory space, creating a module instance according to the control logic; According to the peripheral hardware configuration information, setting the initial state and parameters of the module instance; The running instance is generated according to the set module instance.

3. The method according to claim 1, characterized in that The running instance includes a device driver or a module program; the function configuration set includes an operation function; The step of registering the running instance into the microcontroller unit of the target control board according to the functional configuration set includes: The device driver and the corresponding operation function, as well as the module program and the corresponding operation function are registered in the microcontroller unit of the target control board.

4. The method according to claim 1, characterized in that Matching the function configuration set corresponding to the configuration index in the pre-stored configuration set array includes: According to the configuration index, a corresponding function configuration set is matched in a configuration set array pre-stored in a flash memory of a microcontroller unit of the target control board.

5. The method according to claim 1, characterized in that Before reading the identification information set by the user on the target control panel, the method further includes: For each control panel to be entered, obtain the configuration information of the control panel; Extracting setting type information from the configuration information and defining it as a configuration item, the setting type information including at least one of the number of external devices on the control board, a device connection mode, and a module parameter; Generate a corresponding function configuration set for each function of the control board according to the configuration item; All function configuration sets and corresponding configuration indexes are combined into a configuration set array and stored in the flash memory of the microcontroller unit.

6. The method according to claim 1, characterized in that The method of initializing the configuration of the target control panel according to the functional configuration set further comprises: The configuration index is configured as the communication address of the target control board on the communication bus.

7. The method according to claim 6, characterized in that The method further comprises: Acquire a configuration index of a target communication control board from the configuration set array; the target communication control board is a control board that communicates with the target control board; The target communication control board is accessed through the communication bus according to the communication address matched by the configuration index of the target communication control board.

8. A control panel configuration system, characterized in that: The system comprises: An identification reading module is used to read the identification information set by the user on the target control panel as a configuration index; A function configuration set acquisition module, used to match the function configuration set corresponding to the configuration index in a pre-stored configuration set array; An initialization module, used to initialize the configuration of the target control board according to the functional configuration set and generate a running instance; A registration module is used to register the running instance in the microcontroller unit of the target control board according to the functional configuration set.

9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Computer-readable instructions are stored thereon, and the computer-readable instructions can be executed by a processor to implement the method according to any one of claims 1-7.