Engineering environment providing device, controller and implementation device and implementation method thereof
By introducing the update function of the user application calling interface and boot loader in the controller, it provides an engineering environment for writing, debugging and compiling user applications, solving the problem of the cumbersome software upgrade process in the existing technology, realizing a user-programmable controller, and simplifying the function expansion and software upgrade process.
Patent Information
- Application Number
- CN202311227183.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-21
- Publication Date
- 2025-03-21
AI Technical Summary
After the existing controller software is solidified, system integrators need to add new functions or solve problems, which requires multiple design changes and verification, and the process is cumbersome and time-consuming.
The user application call interface and the user application update function of the bootloader are introduced in the controller, providing an engineering environment for users to write, debug and compile user applications, allowing users to independently expand and update controller functions.
It realizes a user-programmable controller, simplifies the function expansion and software upgrade process, reduces the need for multiple parties to participate, and improves the efficiency of design changes.
Smart Images

Figure CN119668138A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of controller technology, and in particular to an engineering environment providing device, a controller, and an implementation device and implementation method thereof. Background Art
[0002] The current controller program, such as a medical device controller, usually consists of a bootloader and a controller application. Usually, the system integrator calls the service functions provided by the controller through the communication interface provided by the controller, and the controller developer implements the corresponding functions according to the requirements. After the controller software is solidified and released, if the system integrator needs to add new functions or new troubleshooting solutions in the future, the system integrator needs to make a request, and the controller developer will upgrade and re-release the software. This process involves a multi-party design change process, which requires multi-party design verification and confirmation work, and the process is cumbersome and time-consuming.
[0003] To this end, those skilled in the art are still working on finding other solutions for the controller. Summary of the invention
[0004] In view of this, in the embodiments of the present application, on the one hand, a controller and an engineering environment providing device are proposed, and on the other hand, a controller implementation device and an implementation method are provided to implement a user-programmable controller.
[0005] A controller proposed in an embodiment of the present application includes: a controller application storage area and a boot loader storage area; characterized in that the controller application has a user application calling interface; the boot loader has a user application updating function; the controller also includes: a user application storage area for storing compiled user applications; the compiled user application is stored in the user application storage area through the boot loader, and can be called by the controller application to execute user-extended controller functions; the user application is written by a user in an engineering environment based on an application programming interface, and debugged based on a controller hardware simulation environment, and after debugging is completed, it is compiled based on a scattered loading file containing information linked to the user application storage area; and a user application interface storage area for storing the input interface and output interface of the user application, the input interface is used to pass data from the controller application to the user application, and the output interface is used to pass data from the user application to the controller application.
[0006] In one embodiment, upon receiving a user application update identifier, the boot loader stores the compiled user application in the user application storage area.
[0007] In one embodiment, the user application is used to implement any one or any combination of the following functions: adding an error type; shielding an error type; changing a state; adding protection to an actuator; adding a control algorithm to an actuator.
[0008] In one embodiment, the user application program storage area is a storage area of a read-only memory of the controller; and the user application interface storage area is a storage area of a random access memory of the controller.
[0009] In one embodiment, the controller includes: a medical device controller.
[0010] An engineering environment providing device proposed in an embodiment of the present application includes: a programming module, which is used to provide a user with a method of writing a user application based on an application programming interface; a simulation module, which is used to provide a user with a method of debugging the user application based on a controller hardware simulation environment; a compilation module, which is used to provide a method for a user to compile the user application based on a distributed loading file containing information that links the user application to a controller setting storage area, and obtain a compiled user application; the compiled user application is used to be stored in the setting storage area of the controller for being called by a controller application of the controller; the user application has an input interface and an output interface, and when the user application is called by the controller application, data from the controller application is passed to the user application through the input interface, and data from the user application is passed to the controller application through the output interface.
[0011] A controller implementation system proposed in an embodiment of the present application includes: an engineering environment providing device and a controller as described above; the engineering environment providing device is used to provide a user with an engineering environment, so that the user can write a user application based on an application programming interface in the engineering environment, and debug the user application based on a controller hardware simulation environment, and after debugging is completed, compile the user application based on a scattered loading file containing information that links the user application to a set storage area of the controller, and obtain a compiled user application.
[0012] In one embodiment, the engineering environment providing device includes: a programming module, which is used to provide a user with a method of writing a user application based on an application programming interface; a simulation module, which is used to provide a user with a method of debugging the user application based on a controller hardware simulation environment; a compilation module, which is used to provide a method for the user to compile the user application based on a distributed loading file containing information that links the user application to a controller setting storage area, and obtain a compiled user application; the compiled user application is used to be stored in the setting storage area of the controller for being called by a controller application of the controller; the user application has an input interface and an output interface, and when the user application is called by the controller application, data from the controller application is passed to the user application through the input interface, and data from the user application is passed to the controller application through the output interface.
[0013] A controller implementation method proposed in an embodiment of the present application, the controller includes a controller application storage area and a boot loader storage area; the controller application has a user application calling interface; the boot loader has a user application updating function; the method includes: providing a user with an engineering environment, allowing the user to write a user application based on an application programming interface in the engineering environment, and debugging the user application based on a controller hardware simulation environment, and after debugging, compiling the user application based on a scattered loading file containing information that links the user application to a set storage area of the controller, and obtaining a compiled user application; controlling the boot loader to store the compiled user application in the set storage area of the controller for calling by the controller application; the user application has an input interface and an output interface, and when the user application is called by the controller application, data from the controller application is passed to the user application through the input interface, and data from the user application is passed to the controller application through the output interface.
[0014] In one embodiment, the controller includes: a medical device controller.
[0015] It can be seen from the above scheme that in the embodiment of the present application, since a user application calling interface is set in the controlled controller application, a user application update function is set in the boot loader, and an engineering environment is provided for users to program, debug and compile user applications, a controller with an open programming interface is provided to users, so that users can expand and update the functions of the controller according to their needs, and realize the upgrade and release of the controller software, and this process does not require the participation of multiple parties. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The preferred embodiments of the present application will be described in detail below with reference to the accompanying drawings, so that those skilled in the art can better understand the above and other features and advantages of the present application. In the accompanying drawings:
[0017] Figure 1 This is an exemplary structural diagram of a controller implementation system in one embodiment of the present application.
[0018] Figure 2 This is a schematic diagram of the uplink execution flow of the controller in an example of this application.
[0019] Figure 3 This is a schematic diagram of the downlink execution flow of the controller in an example of this application.
[0020] Figure 4 This is an exemplary flow chart of the controller implementation method in the embodiment of the present application.
[0021] The reference numerals are as follows:
[0022]
[0023] DETAILED DESCRIPTION
[0024] This solution proposes a controller with an open programming interface. In addition to the existing boot loader and application programs, the program of this controller adds a user application segment. During the specific implementation, the controller provider can provide the input and output interfaces of this program segment, and the programming implementation of the specific program logic can be completed by the system integrator. Subsequently, the system integrator can independently complete the expansion of the controller function, defect repair, etc. based on this interface.
[0025] In order to make the purpose, technical solution and effect of the present application more clearly understood, the specific implementation mode of the present application is now described with reference to the accompanying drawings. The same reference numerals in each figure represent components with the same structure or similar structures but the same functions.
[0026] In this document, “exemplary” and “illustrative” mean “serving as an example, instance or illustration”, and any illustration or implementation described in this document as “exemplary” or “illustrative” should not be construed as a more preferred or more advantageous technical solution.
[0027] To simplify the drawings, each figure schematically shows only the parts related to the present application, and they do not represent the actual structure of the product.
[0028] In this article, "a" or "an" not only means "only one", but also means "more than one". In this article, "first", "second", etc. are only used to distinguish each other, rather than to indicate their importance and order.
[0029] Figure 1 This is an exemplary structural diagram of a controller implementation system in one embodiment of the present application. Figure 1 As shown, the system may include: a controller 1 and an engineering environment providing device 2.
[0030] The controller 1 may include a controller application storage area 11 , a boot loader storage area 12 , a user application storage area 13 , and a user application interface storage area 14 .
[0031] Among them, the controller application and the boot loader can be solidified into their respective storage areas in advance. The controller application storage area 11 is used to store the controller application, and the controller application has a user application calling interface. The boot loader storage area 12 is used to store the boot loader; the boot loader has a user application update function. In specific implementation, a user application update identifier can be set in the boot loader, and a set of domain objects can be added as an interface for user application update, so that when the boot loader is executed, the user application update function is executed according to the received user application update identifier, for example, the compiled user application is stored in the set storage area.
[0032] The user application storage area 13 is used to store compiled user applications; the compiled user applications are stored in the user application storage area through the boot loader and can be called by the controller application to execute the controller extension function written by the user. The user application is written by the user in an engineering environment based on an application programming interface, debugged based on a controller hardware simulation environment, and compiled based on a scatter loading file containing information linked to the user application storage area after debugging.
[0033] The user application interface storage area 14 is used to store the input interface and output interface of the user application, the input interface is used to transfer data from the controller application to the user application, and the output interface is used to transfer data from the user application to the controller application.
[0034] The controller application storage area 11 , the boot loader storage area 12 and the user application storage area 13 may be storage areas of a read-only memory (ROM); and the user application interface storage area 14 may be a storage area of a random access memory (RAM).
[0035] In addition, the controller may further include a processor (not shown in the figure) for calling and executing the controller application, boot loader or user application stored in the storage area.
[0036] The engineering environment providing device 2 is used to provide a user with an engineering environment, so that the user can write a user application based on an application programming interface in the engineering environment, and debug the user application based on a controller hardware simulation environment. After the debugging is completed, the user application is compiled based on a scattered loading file containing information that links the user application to a set storage area of the controller, and a compiled user application is obtained.
[0037] In one embodiment, the engineering environment providing device 2 may include: a programming module 21 , a simulation module 22 and a compiling module 23 .
[0038] The programming module 21 is used to provide a user with a programming interface to write a user application.
[0039] The following code shows an example of an application programming interface.
[0040]
[0041]
[0042] The simulation module 22 is used to provide the user with a controller hardware simulation environment to debug the user application.
[0043] In one example, the controller hardware simulation environment may use an ARM-MDK simulator. For example, the "user simulation" item may be selected, and environment parameters for simulating the controller hardware may be configured.
[0044] The compilation module 23 is used to provide a user with a scattered loading file containing information that links the user application to a controller setting storage area to compile the user application and obtain a compiled user application; the compiled user application is used to be stored in the setting storage area of the controller for calling by the controller application of the controller.
[0045] Wherein, the user application has an input interface and an output interface. When the user application is called by the controller application, data from the controller application is passed to the user application through the input interface, and data from the user application is passed to the controller application through the output interface.
[0046] In one example, a scatter-loading file may include the following code:
[0047]
[0048]
[0049] In one embodiment, the user application can implement functions such as adding an error type, shielding an error type, and changing a status on the upstream. Figure 2 This is a schematic diagram of the uplink execution flow of the controller in an example of this application. Figure 2 As shown, the process may include:
[0050] Step S201: The controller receives collected data from a collection device such as a sensor.
[0051] Step S202: Execute the controller application to perform controller application logic processing on the collected data to obtain first data.
[0052] Step S203: When the condition for calling the user application is met, the user application is called to perform user application logic processing on the first data to obtain second data.
[0053] Step S204, continue to execute the controller application program, and output the second data to the system.
[0054] In one embodiment, the user application can implement downstream functions such as adding protection to the actuator, adding a control algorithm for the actuator, etc. Figure 3 This is a schematic diagram of the downlink execution flow of the controller in an example of this application. Figure 3 As shown, the process may include:
[0055] Step S301: The controller receives a system instruction from the system.
[0056] Step S302: Execute the controller application program to perform controller application logic processing on the system instruction to obtain third data.
[0057] Step S303: When the condition for calling the user application is met, the user application is called to perform user application logic processing on the third data to obtain fourth data.
[0058] Step S304, continue to execute the controller application program, and output the fourth data to the executor.
[0059] In the embodiment of the present application, the controller may include a medical device controller.
[0060] The controller implementation system in the embodiment of the present application is described in detail above, and the controller implementation method in the embodiment of the present application is described in detail below. The controller implementation system in the embodiment of the present application can be used to implement the controller implementation method in the embodiment of the present application. For details not disclosed in detail in the method embodiment of the present application, please refer to the corresponding description in the system embodiment of the present application.
[0061] Figure 4 : is an exemplary flow chart of the controller implementation method in the embodiment of the present application. The controller includes a controller application storage area and a boot loader storage area; it is characterized in that the controller application has a user application calling interface; the boot loader has a user application update function. Figure 4 The method may include the following processing:
[0062] Step S41, providing the user with an engineering environment, allowing the user to write a user application based on an application programming interface in the engineering environment, and debug the user application based on a controller hardware simulation environment, and after debugging is completed, compile the user application based on a scattered loading file containing information that links the user application to a set storage area of the controller, and obtain a compiled user application.
[0063] Step S42, controlling the boot loader to store the compiled user application in the set storage area of the controller for calling by the controller application; the user application has an input interface and an output interface, and when the user application is called by the controller application, the data from the controller application is passed to the user application through the input interface, and the data from the user application is passed to the controller application through the output interface.
[0064] In one embodiment, the user application is used to implement any one or any combination of the following functions: adding an error type; shielding an error type; changing a state; adding protection to an actuator; adding a control algorithm to an actuator.
[0065] In one embodiment, the setting storage area is a storage area of a read-only memory of the controller.
[0066] In one embodiment, the controller comprises a medical device controller.
[0067] It can be seen from the above scheme that in the embodiment of the present application, since a user application calling interface is set in the controller application of the control, a user application update function is set in the boot loader, and an engineering environment is provided for users to program, debug and compile user applications, a controller with an open programming interface is provided to users, so that users can expand and update the functions of the controller according to their own needs, and realize the upgrade and release of the controller software, and the process does not involve the participation of multiple parties. For example, after the controller developer provides the controller with the controller application and the boot loader to the system integrator, the system integrator can not only directly use the controller, but also write and update the user application for it to upgrade and release the software of the controller.
[0068] It can be seen that users can independently upgrade the input and output of the controller according to their own needs, simplify the design change process, and shorten the design change time. In addition, the development of controller application software and user application program development are independent of each other, so as to better protect the intellectual property rights of both parties. In addition, based on the packaged user application interface, users do not need to understand the underlying knowledge of the controller, which is easy to get started. Based on the technical solution of this application, the application of controllers can be better explored and expanded, which is in line with the era of programmable everything. In addition, due to the more flexible controller interface, the competitiveness of the product can be improved.
[0069] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. Controller, including: A controller application storage area (11) and a boot loader storage area (12); characterized in that the controller application has a user application calling interface; the boot loader has a user application update function; the controller also includes: A user application storage area (13) is used to store compiled user applications; the compiled user applications are stored in the user application storage area through the boot loader and can be called by the controller application to execute the controller function extended by the user; the user application is written by a user in an engineering environment based on an application programming interface, debugged based on a controller hardware simulation environment, and compiled based on a scatter loading file containing information linked to the user application storage area after debugging is completed; and The user application interface storage area (14) is used to store the input interface and output interface of the user application, wherein the input interface is used to transfer data from the controller application to the user application, and the output interface is used to transfer data from the user application to the controller application.
2. The controller according to claim 1, characterized in that: When receiving a user application update identifier, the boot loader stores the compiled user application in the user application storage area.
3. The controller according to claim 2, characterized in that: The user application is used to implement any one or any combination of the following functions: Add error types; Shield error type; Change status; Increase protection for actuators; Added actuator control algorithm.
4. The controller according to any one of claims 1 to 3, characterized in that: The user application program storage area (13) is a storage area of a read-only memory of the controller; and the user application interface storage area (14) is a storage area of a random access memory of the controller.
5. The controller according to any one of claims 1 to 3, characterized in that: The controller includes: a medical device controller.
6. The engineering environment providing device is characterized in that: include: A programming module (21), used for providing a user with a user application program based on an application programming interface; A simulation module (22), used for providing a user with a controller hardware simulation environment to debug the user application; A compiling module (23) is used to provide a user with a method for compiling the user application based on a scatter loading file containing information for linking the user application to a controller setting storage area, and obtain a compiled user application; the compiled user application is used to be stored in the setting storage area of the controller for being called by a controller application of the controller; the user application has an input interface and an output interface, and when the user application is called by the controller application, data from the controller application is passed to the user application through the input interface, and data from the user application is passed to the controller application through the output interface.
7. A controller implementation system, characterized in that: include: An engineering environment providing device (2) and a controller (1) as claimed in any one of claims 1 to 5; The engineering environment providing device (2) is used to provide a user with an engineering environment, so that the user can write a user application based on an application programming interface in the engineering environment, and debug the user application based on a controller hardware simulation environment, and after debugging, compile the user application based on a scatter loading file containing information that enables the user application to be linked to a set storage area of the controller (1), and obtain a compiled user application.
8. The controller implementation system according to claim 7, characterized in that: The engineering environment providing device (2) comprises: A programming module (21), used for providing a user with a user application program based on an application programming interface; A simulation module (22), used for providing a user with a controller hardware simulation environment to debug the user application; A compiling module (23) is used to provide a user with a scatter loading file containing information for linking the user application to a controller setting storage area to compile the user application and obtain a compiled user application; the compiled user application is used to store in the setting storage area of the controller for calling by the controller application of the controller; The user application has an input interface and an output interface. When the user application is called by the controller application, data from the controller application is passed to the user application through the input interface, and data from the user application is passed to the controller application through the output interface.
9. A controller implementation method, the controller comprising a controller application storage area and a boot loader storage area; characterized in that: The controller application has a user application calling interface; The bootloader has a user application update function; the method comprises: Providing a user with an engineering environment, allowing the user to write a user application based on an application programming interface in the engineering environment, and debug the user application based on a controller hardware simulation environment, and after debugging is completed, compile the user application based on a scatter loading file containing information for linking the user application to a set storage area of the controller, and obtain a compiled user application; and Control the boot loader to store the compiled user application in the set storage area of the controller for the controller application to call; the user application has an input interface and an output interface. When the user application is called by the controller application, the data from the controller application is passed to the user application through the input interface, and the data from the user application is passed to the controller application through the output interface.
10. The controller implementation method according to claim 9, characterized in that: The controller includes: a medical device controller.