A rapid control prototyping design method, system and terminal
By adding cloud service programs and web applications to the lower-level machine, graphical modeling of prototypes can be quickly controlled, solving the problems of repetitive code generation and high costs in existing technologies. This provides an efficient, easy-to-use, and low-cost solution for rapid prototype design control.
Patent Information
- Application Number
- CN202411606752.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2044-11-11
AI Technical Summary
Existing RCP design methods involve repeated code generation, compilation, and download, which is time-consuming and requires additional development of host computer software and custom code generators, resulting in high costs and poor usability.
Add a cloud service program to the lower-level server, and start the web application by entering the IP and port number in the browser to realize graphical modeling operations between the upper-level and lower-level machines. Create a rapid control prototype directly on the lower-level machine, eliminating the need for coding, linking, and downloading steps.
It accelerates the verification and iteration of prototype design solutions, reduces development and maintenance costs, improves usability, supports cross-platform operation and remote design, and reduces dependence on dedicated hardware.
Smart Images

Figure CN119937990B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automation and intelligent control design, and particularly relates to a rapid control prototype design method and system and a terminal. BACKGROUND
[0002] With the rapid development of industrial products, the performance requirements of controllers are increasingly improved. When facing the control requirements of complex equipment, using model-based design methods to replace direct C code writing has become an important means. For example, the prior art provides how to use the "code automatic generation" function of the Embeded Coder (embedded code generator) of the MATLAB platform to realize rapid control prototyping (RCP) design; for another example, the prior art provides that the RTW / TLC (target language compiler) provided by MATLAB / Simulink is used to generate RCP to generate a program that can run on dSPACE (a control system development software and hardware platform running a real-time operating system); for another example, the prior art also provides a solution based on the National Instruments (NI) company, that is, RCP modeling and code generation are completed by LabVIEW, and the control program running in a special computing device is monitored by Veristand.
[0003] The technical routes of the above-mentioned prior art RCP methods are roughly the same, mainly including four steps: ① an industrial software provides a graphical modeling environment, including rich model elements, which can correspond to some basic elements of the control algorithm; ② the designer converts the design idea into a control system model composed of model elements in the graphical environment; ③ the industrial software translates the control system model into intermediate code (usually C code, which may insert auxiliary code for convenient monitoring); ④ the target code compiler compiles the intermediate code into an executable program on the target controller. The RCP method also belongs to the Model Based Definition (MBD) method, that is, the actual control program is generated from the model. The designer no longer needs to maintain monotonous and error-prone program language codes, but maintains graphical and modular models. Using graphical models can also effectively improve the reusability of modules and subsystems, facilitate the management of design parameters, and significantly improve the design efficiency of the controller.
[0004] Although the existing RCP method has many advantages compared with traditional handwritten C code, the existing model-based design method still has the following problems:
[0005] 1) by running in the ordinary PC (usually referred to as the host computer) design software generated intermediate code, and then call the target platform compiler to compile it into executable code, and finally through the serial or network cable and other downloads to the target controller (usually referred to as the lower machine), in the complex RCP design process often need to frequently modify the design scheme, therefore, the need to repeatedly generate code, compile, download, this process will consume a lot of time;
[0006] 2) executable program running in the lower machine and the host computer software has no direct association. Therefore, in order to run the control program in the lower machine, and realize monitoring and control, need to develop an additional host computer software, such as NI company's Veristand, dSPACE company's ControlDesk, etc. In addition, the need to customize code generation and compiler (Target Language Compiler, TLC), so that in addition to the control code to increase the additional code with the host computer communication, the price of these software is usually higher, if the use of dedicated computing hardware, such as dSPACE, the cost will be further improved;
[0007] 3) due to the involvement of multiple software and more complex use of process, the user needs to be familiar with the host computer controller design software, host computer monitoring and control software, and can handle the error information generated in the process of code generation, compilation, download, the requirement of the user is higher, poor ease of use. SUMMARY
[0008] The purpose of the present application is to provide a kind of quick control prototype design method, system and terminal, add cloud service program on the lower machine server, configure http service IP and port number, user in host computer is started by browser address bar input IP and port number to start a Web application, and sends graphical modeling operation to the lower machine through Web application, to establish and modify RCP model, when complex RCP design, without repeatedly code generation, compilation, download, software architecture is simpler, research and development cost is lower and is easier to maintain, higher ease of use.
[0009] To achieve the above object, the present application provides the following technical scheme:
[0010] Firstly, the present application provides a kind of quick control prototype design method, comprising:
[0011] S1. add cloud service program on the lower machine server, cloud service program at least includes: http service subprogram, quick control prototype subprogram and running monitoring subprogram;Running cloud service program, configure http service IP and port number;
[0012] S2. start browser in host computer, input IP and port number, send Web application page request to http service subprogram;
[0013] S3. The HTTP service subprogram responds to the page request, completes the communication connection between the host computer and the lower computer, and the lower computer sends the resource files required by the Web application to the browser, and the resource files at least include the controller model basic element description file;
[0014] S4. The browser constructs the Web application according to the resource files, and the Web application at least includes: a model library browser, a graphical modeling area and a rapid control prototype running monitoring window;
[0015] S5. An operation conversion protocol between the host computer and the lower computer is established, and the Web application sends each step of the graphical modeling operation to the rapid control prototype subprogram according to the operation conversion protocol, and the rapid control prototype subprogram obtains the rapid control prototype according to the received modeling operation.
[0016] S6. The rapid control prototype running monitoring window in the Web application sends a start running message to the rapid control prototype subprogram, the lower computer runs the rapid control prototype, and sends the running result to the host computer in real time, and the rapid control prototype is kept or updated according to the running result.
[0017] As a possible implementation manner, the host computer displays the running result in the control prototype running monitoring window, judges whether the running result meets the design requirement, and if yes, the rapid control prototype is kept; otherwise, the rapid control prototype is updated by executing S5.
[0018] As a possible implementation manner, the graphical modeling area provides graphical modeling operations to complete the rapid control prototype building; the graphical modeling operations at least include: a drag-and-drop operation, a connection operation and a parameter configuration operation.
[0019] The drag-and-drop operation is to drag the controller model basic element in the model library browser and put it into the graphical modeling area, and the Web application draws the graphical mark corresponding to the controller model basic element in the graphical modeling area;
[0020] The connection operation is to click the input and output ports on the graphical mark in sequence, and the Web application draws the connection line in the graphical modeling area to establish the connection relationship between the graphical mark ports;
[0021] The parameter configuration operation is to modify the parameter value of the controller model basic element through the parameter configuration dialog box.
[0022] As a possible implementation manner, the lower computer runs the rapid control prototype, including:
[0023] S60. A preset running termination condition is set;
[0024] S61. Determine whether it is the first run, if yes, sort all components to obtain the first execution sequence of all components; otherwise, detect whether the component topology relationship changes relative to the last run; if yes, re-sort all components to obtain the updated execution sequence of all components; otherwise, keep the historical execution sequence of all components at the last run;
[0025] S62. Based on the execution sequence obtained in S61, execute the running function corresponding to each component in turn to obtain the calculation result of each component;
[0026] S63. Transmit the calculation result of each component and the current running state of the rapid control prototype to the host computer;
[0027] S64. Determine whether the preset termination condition is reached, if yes, execute S65; otherwise, jump to S62;
[0028] S65. Send termination information to the host computer to terminate the running of the rapid control prototype.
[0029] As a possible implementation manner, the running function includes: four arithmetic functions, trigonometric functions, logical operation functions, interpolation operation functions and state machine operation functions.
[0030] As a possible implementation manner, an operation conversion protocol between the host computer and the lower computer is established, specifically: each graphical operation is represented by structured data and sent to the lower computer, and the lower computer parses the received structured data into the corresponding operation.
[0031] As a possible implementation manner, parameter estimation is performed before running the rapid control prototype or before sequentially executing the running function corresponding to each component; the parameter estimation is to convert the parameter assignment expression obtained from the parameter configuration dialog box into a numerical value.
[0032] In a second aspect, the present application provides a rapid control prototype design system, comprising: a browser and a cloud service module, the cloud service module comprising an http service submodule, a rapid control prototype submodule and a running monitoring submodule;
[0033] The cloud service module generates the IP and port number of the http service, the browser logs in the IP and port number, and sends a page request of a Web application to the http service submodule;
[0034] The http service submodule responds to the page request and sends resource files required for creating the Web application to the browser, the resource files at least including a controller model basic element description file; the browser constructs the Web application based on the resource files sent by the http service submodule;
[0035] The rapid control prototype submodule is used for parsing graphical modeling operations sent by the Web application, converting the graphical modeling operations into corresponding operations, and obtaining a rapid control prototype;
[0036] The running monitoring submodule is used for sending a start running message to the rapid control prototype submodule, running the rapid control prototype, and feeding back running results in real time.
[0037] As a possible implementation manner, the Web application comprises a model library browser, a graphical modeling area, and a rapid control prototype running monitoring window;
[0038] The model library browser is used for providing a controller model basic element.
[0039] The graphical modeling area is used for providing graphical modeling operations based on the controller model basic element, and sending each step of the graphical modeling operations to the rapid control prototype submodule.
[0040] The rapid control prototype running monitoring window is used for displaying running results of the rapid control prototype.
[0041] In a third aspect, the present application provides a terminal comprising a processor and a communication interface coupled with the processor, and the processor is used for running a computer program or instructions to realize the rapid control prototype design method provided in the first aspect.
[0042] Compared with the prior art, the present application has the following beneficial effects:
[0043] 1. The rapid control prototype design method provided by the present application adds a cloud service program on a lower machine server, and the lower machine cloud service program provides a rapid control prototype building function, that is, the rapid control prototype is directly created on the lower machine, and compared with the prior art in which RCP modeling is performed on an upper machine, and then encoding, linking, and downloading are performed on the lower machine, the present application saves the tedious operations of encoding, linking, and downloading, can save a large amount of time, and accelerates the verification iteration of the rapid control prototype design scheme.
[0044] 2. Since the present application does not need to perform compiling, linking, and downloading operations, it is not necessary to customize code generation and a compiler, and the present application does not depend on exclusive hardware, can be deployed and implemented on a hardware device with a common architecture, and greatly reduces the development and maintenance cost of the rapid control prototype.
[0045] 3. The rapid control prototype design method provided by the present application does not involve a complex use process, only needs to use a Web application, has high user universality, and is easy to operate.
[0046] 4. The rapid control prototype design method provided by the present application adopts a cloud service plus Web application mode, is more easily extended, and can support remote design, collaborative design, and other application requirements.
[0047] 5. The rapid control prototyping design method provided by the present application, the host computer does not need to provide modeling and monitoring two software, only needs to have a browser, therefore, the host computer can select Windows, Linux, iOS, Android multiple mainstream operating systems, and cross-platform operation is realized.
[0048] 6. The present application still supports C code generation function, according to the actual demand of the user, only when the rapid control prototyping design method is verified and the code transfer is needed, the C code generation is executed once, which is suitable for single development of rapid control prototype and batch production. BRIEF DESCRIPTION OF DRAWINGS
[0049] The accompanying drawings, which are included to provide a further understanding of the present application and constitute a part of this application, illustrate embodiments of the present application and together with the description serve to explain the present application. In the drawings:
[0050] Figure 1 It is a rapid control prototyping design method architecture diagram in the embodiment of the present application;
[0051] Figure 2 It is a rapid control prototyping design method flow chart in the embodiment of the present application;
[0052] Figure 3 It is a description file schematic diagram of an "addition element" in the embodiment of the present application;
[0053] Figure 4 It is a schematic diagram of representing specific operations by tags and values in the embodiment of the present application;
[0054] Figure 5 It is a rapid control prototyping flow chart of the lower computer in the embodiment of the present application;
[0055] Figure 6 It is a process comparison diagram of the prior art and the rapid control prototyping design and operation method of the present application in the embodiment of the present application;
[0056] Figure 7 、 Figure 8 It is a display interface when the method of the present application is actually used in the PC end in the embodiment of the present application;
[0057] Figure 9 It is a rapid control prototyping design system schematic diagram provided in the embodiment of the present application.
[0058] REFERENCE NUMERALS
[0059] 1-browser, 10-Web application, 100-model library browser, 101-graphical modeling area, 102-quick control prototype running monitoring window; 2-cloud service module, 20-http service submodule, 21-quick control prototype submodule, 22-running monitoring submodule. DETAILED DESCRIPTION
[0060] In order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, the words "first", "second" and the like are used to distinguish the same or similar items or items with basically the same function and effect. For example, the first threshold and the second threshold are only used to distinguish different thresholds, and the order is not limited. Those skilled in the art can understand that the words "first", "second" and the like do not limit the number and execution order, and the words "first", "second" and the like do not necessarily mean different.
[0061] It should be noted that in the present application, the words "exemplary" or "for example" are used to represent an example, illustration or description. Any embodiment or design scheme described as "exemplary" or "for example" in the present application should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. Rather, the words "exemplary" or "for example" are intended to present the relevant concept in a specific manner.
[0062] In the present application, "at least one" means one or more, and "multiple" means two or more. The association relationship of the associated objects is described, which means that there can be three kinds of relationships, for example, A and / or B, which can represent the following cases: A exists alone, A and B exist together, and B exists alone, wherein A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. The following at least one or similar expressions mean any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, or a, b and c, wherein a, b and c can be single or multiple.
[0063] The present application aims to provide a rapid control prototype design method, system and terminal, so as to solve the problems of existing RCP design methods, such as time-consuming code generation, compilation and download, the need for additional development of host computer software, the high cost of custom code generator and compiler, and poor usability.
[0064] In a first aspect, the present application provides a rapid control prototype design method, referring to Figure 1 and Figure 2 , comprising:
[0065] S1. Add a cloud service program on the lower computer server, the cloud service program at least includes: an http service subprogram, a rapid control prototype subprogram and a running monitoring subprogram; run the cloud service program, configure the http service IP and port number;
[0066] The rapid control prototype design method provided by the application runs the core function of the rapid control prototype building program in the cloud service program on the lower computer. Exemplarily, the lower computer is a common (for example, X86 or Aarch64) architecture computer, and runs a real-time Linux or a real-time Windows operating system.
[0067] S2. Start a browser on the upper computer, input the IP and port number, and send a page request of a Web application to the http service subprogram;
[0068] As an example, the upper computer is a common architecture computer, and the browser on the upper computer is usually integrated with protocol modules Http(s), WebSoeckt (Secure) and the like. The IP and port number are input in the address bar of the browser, for example: http: / / 192.168.0.1:8080 / , and the browser sends a page request of a Web application to the http service subprogram.
[0069] In the application, the upper computer does not need to provide two large software of modeling and monitoring, and only needs to have a browser, so that the upper computer can select Windows, Linux, iOS and Android mainstream operating systems, and cross-platform operation is realized.
[0070] S3. The http service subprogram responds to the page request, completes the communication connection between the upper computer and the lower computer, and the lower computer sends resource files required for creating a Web application to the browser, and the resource files at least include a controller model basic element description file;
[0071] As an example, the http service subprogram responds to the page request of creating a Web application by using the Http (or Https) protocol; exemplarily, the controller model basic element is a component for building a rapid control prototype, and the description file thereof is a hierarchical description file obtained by classifying and summarizing the controller model basic element, for example, mathematical operations (addition, subtraction, trigonometric functions, etc.) are classified into Math type, and logical operations (and, or, not, etc.) are classified into Logical type. The description file at least includes type (ID), description, input port definition, output port definition, parameter definition and the like; for example, the description file of an “addition element” is as shown in the following table: Figure 3 It should be noted that the resource files also include a page static description file (HTML), a page dynamic response script file (JavaScript) and an image resource file and the like basic files for building a Web application.
[0072] S4. The browser builds the web application according to the resource file, and the web application at least includes: a model library browser, a graphical modeling area and a rapid control prototype running monitoring window; see Figure 1 The model library browser presents the controller model basic element in a tree type graphical component according to the hierarchical controller model basic element description file. It needs to be explained that the user can also customize or encapsulate specific elements to form a custom model and put it into the model library browser to improve the reusability of the controller model basic element.
[0073] As a possible implementation manner, the graphical modeling area provides graphical modeling operations to complete the rapid control prototype building; the graphical modeling operations at least include: a drag-and-drop operation, a connection operation and a parameter configuration operation.
[0074] See Figure 1 The drag-and-drop operation is to drag the controller model basic element in the model library browser and put it into the graphical modeling area, and the web application draws the graphical mark corresponding to the controller model basic element in the graphical modeling area;
[0075] See Figure 1 The connection operation is to click the input and output ports on the graphical mark in sequence, and the web application draws the connection line in the graphical modeling area to establish the connection relationship between the ports of the graphical mark;
[0076] See Figure 1 The parameter configuration operation is to modify the parameter value of the controller model basic element through the parameter configuration dialog box.
[0077] S5. An operation conversion protocol between the host computer and the lower computer is established, and the web application sends each step of the graphical modeling operation to the rapid control prototype subprogram according to the operation conversion protocol, and the rapid control prototype subprogram obtains the rapid control prototype according to the received modeling operation.
[0078] As a possible implementation manner, the operation conversion protocol between the host computer and the lower computer is established, specifically: each graphical operation is represented by structured data and sent to the lower computer, the lower computer http service subprogram receives the structured data and transmits it to the rapid control prototype subprogram, and the rapid control prototype subprogram parses the received structured data into corresponding operations, including adding components to the rapid control prototype, establishing the connection relationship between the components and modifying the parameters of the components.
[0079] As an example, each graphical operation is represented by structured data, that is, specific operations are represented by tags and values, see Figure 4, the tag cmd represents an operation type definition, and the value insert represents adding a component to the rapid control prototype, and the specific data of the component is represented by the value corresponding to the tag dat.
[0080] S6. The rapid control prototype running monitoring window in the web application sends a start running message to the rapid control prototype subprogram, the lower computer runs the rapid control prototype, and sends the running result to the upper computer in real time, and the rapid control prototype is kept or updated according to the running result.
[0081] As an example, the rapid control prototype running monitoring window in the web application is provided with start, pause, and stop buttons for controlling the running of the rapid control prototype, the running monitoring subprogram of the lower computer receives the start running message, parses the start running operation and sends it to the rapid control prototype subprogram to run the rapid control prototype, and the running result is fed back to the upper computer in real time through the running monitoring subprogram during the running process.
[0082] As a possible implementation manner, the upper computer displays the running result in the control prototype running monitoring window, judges whether the running result meets the design requirement, and if so, keeps the rapid control prototype; otherwise, performs S5 to update the rapid control prototype.
[0083] As an example, referring to Figure 1 , the running result can be displayed in the control prototype running monitoring window in the form of text, curve, chart, 3D graphics, etc.
[0084] Referring to Figure 5 , as a possible implementation manner, the lower computer runs the rapid control prototype, including:
[0085] S60. preset termination condition of running;
[0086] S61. judging whether it is the first running, if so, sorting all components to obtain the first execution sequence of all components; otherwise, detecting whether the component topological relation changes relative to the last running; if so, re-sorting all components to obtain the updated execution sequence of all components; otherwise, keeping the historical execution sequence of all components at the last running;
[0087] As an example, the topological relation changes refer to adding or deleting part of the components, or changing the connection between the components; re-sorting all components refers to re-determining the execution order of the components.
[0088] S62. based on the execution sequence obtained in S61, executing the running function corresponding to each component in sequence to obtain the calculation result of each component;
[0089] As a possible implementation manner, the operation function includes: a four-operation function, a trigonometric function, a logic operation function, an interpolation operation function, and a state machine operation function.
[0090] As an example, the four-operation function is an addition, subtraction, multiplication, or division operation function; the trigonometric function is a sine function, a cosine function, a tangent function, a cotangent function, a secant function, or a cosecant function; the logic operation function includes an AND operation, an OR operation, a NOT operation, an NAND operation, an NOR operation, an XNOR operation, an XOR operation, or an XORY operation; the interpolation operation function includes linear interpolation, polynomial interpolation, spline interpolation, or cubic interpolation; and the state machine operation function includes OnAction, OnEnter, or OnExit.
[0091] S63. transmitting the calculation result of each component and the current running state of the rapid control prototype to the host computer;
[0092] As an example, the current running state of the rapid control prototype includes running exception information or running time.
[0093] S64. determining whether a preset termination condition is reached, if yes, performing S65; otherwise, jumping to S62;
[0094] S65. sending termination information to the host computer to terminate the running of the rapid control prototype.
[0095] As a possible implementation manner, parameter estimation is performed before the rapid control prototype is run or before each operation function corresponding to each component is sequentially executed; the parameter estimation is to convert a parameter assignment expression obtained from a parameter configuration dialog box into a numerical value.
[0096] As an example, a user can select a timing of parameter estimation based on a self demand; parameter estimation performed before the rapid control prototype is run can save running time; parameter estimation performed before each operation function corresponding to each component is sequentially executed can realize online parameter adjustment without stopping; and the parameter estimation is to convert a parameter assignment expression obtained from a parameter configuration dialog box into a numerical value, for example, parameter A = 1.2 and parameter B = "2*A", and B = 2.4 obtained by parameter estimation.
[0097] The method can directly run the rapid control prototype on the slave computer, thereby avoiding processes such as C code generation, compilation, linking, and downloading, and saving a large amount of time for creating a rapid control prototype, especially a rapid control prototype with high complexity, and accelerating verification and iteration of a rapid control prototype design scheme.
[0098] Referring to Figure 6, shows the process of realizing fast control prototype design and operation by using prior art and by using the method of the application. Assuming that a user adds an "add" component for calculating the sum of two input quantities as output, the prior art generates C code containing the above-mentioned addition from the host computer model, then calls a cross-compiler, a linker, generates an executable file that can run in the lower computer, and then downloads the file to the lower computer for execution; while in the application, each operation is converted into structured data and sent to the lower computer, and the lower computer performs the corresponding operation, that is, the fast control prototype design program is already located in the lower computer, so there is no need to map it into C code, and the result can be obtained directly by running the running function corresponding to the addition component, avoiding the generation of C code and subsequent compilation, linking, and downloading operations, saving time and cost, while greatly improving the operation convenience and ease of use. Moreover, the application uses a cloud service plus Web application approach, which is easier to extend and can support remote design, collaborative design, and other application requirements.
[0099] Referring to Figures 7 to 8 , the display interface of the method of the application when actually used on a PC, the application does not need to rely on dedicated hardware and can be deployed and used on ordinary X86, ARM, and other architectures.
[0100] In addition, the fast control prototype design method provided by the application, after verification, may need to be transferred to a lower-cost controller hardware such as STM32 due to mass production requirements, at which time the fast control prototype is generated as C code on the lower computer and transferred to the controller hardware. The application can generate C code only once after the fast control prototype design method is verified, which is suitable for single development of fast control prototypes and batch production.
[0101] In the second aspect, the application provides a fast control prototype design system, referring to Figure 9 , comprising a browser 1 and a cloud service module 2, the cloud service module 2 comprising an http service submodule 20, a fast control prototype submodule 21, and a running monitoring submodule 22;
[0102] The cloud service module 2 generates the IP and port number of the http service, the browser 1 logs in to the IP and port number, and sends a page request of a Web application to the http service submodule 20;
[0103] The http service submodule 20 responds to the page request and sends resource files required for creating a Web application to the browser 1, the resource files at least comprising a controller model basic element description file; the browser 1 constructs the Web application 10 based on the resource files sent by the http service submodule 20;
[0104] The fast control prototype sub-module 21 is used for parsing the graphical modeling operation sent by the Web application, converting the graphical modeling operation into a corresponding operation, and obtaining the fast control prototype;
[0105] The running monitoring sub-module 22 is used for sending a start running message to the fast control prototype sub-module 21, running the fast control prototype, and feeding back a running result in real time.
[0106] As a possible implementation manner, the Web application 10 comprises a model library browser 100, a graphical modeling area 101, and a fast control prototype running monitoring window 102;
[0107] The model library browser 100 is used for providing a controller model basic element.
[0108] The graphical modeling area 101 is used for providing a graphical modeling operation based on the controller model basic element, and sending each step of the graphical modeling operation to the fast control prototype sub-module 21.
[0109] The fast control prototype running monitoring window 102 is used for displaying a running result of the fast control prototype.
[0110] In a third aspect, the present application provides a terminal comprising a processor and a communication interface coupled with the processor, and the processor is used for running a computer program or instruction to realize the fast control prototype design method provided in the first aspect.
[0111] Although the present application is described herein in conjunction with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in the practice of the claimed application from the drawings, the disclosure, and the appended claims. In the specification, the word "comprising" does not exclude other components or steps, and the indefinite article "a" or "an" does not exclude a plurality. A single processor or other unit can fulfill the functions of several means recited in the specification. Certain measures are recited in different dependent embodiments, but this does not preclude their combination in a single embodiment.
[0112] Although the present application is described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations can be made to them without departing from the spirit and scope of the application. Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense, and it is intended that all such modifications and combinations be included in the scope of the present application. Obviously, various modifications and changes can be made to the present application by those skilled in the art without departing from the spirit and scope of the present application. Thus, it is intended that the present application cover modifications and changes as long as they come within the scope of the appended claims and their equivalents.
Claims
1. A rapid control prototyping method, characterized in that, include: S1. Add a cloud service program to the lower-level server. The cloud service program includes at least: an HTTP service subroutine, a quick control prototype subroutine, and a runtime monitoring subroutine; run the cloud service program and configure the HTTP service IP and port number. S2. Start the browser on the host computer, enter the IP address and port number, and send a web application page request to the HTTP service subroutine; S3. The HTTP service subroutine responds to the page request, completes the communication connection between the host computer and the slave computer, and the slave computer sends the resource files required to create the Web application to the browser. The resource files include at least the controller model basic element description file. S4. The browser constructs a web application based on the resource file, the web application including at least: a model library browser, a graphical modeling area, and a quick control prototype running monitoring window; S5. Establish an operation conversion protocol between the host computer and the slave computer. The Web application sends each step of the graphical modeling operation to the rapid control prototype subroutine according to the operation conversion protocol. The rapid control prototype subroutine obtains the rapid control prototype according to the received modeling operation. S6. The rapid control prototype running monitoring window in the Web application sends a start-up message to the rapid control prototype subroutine. The lower-level machine runs the rapid control prototype and sends the running results to the upper-level machine in real time. The rapid control prototype is maintained or updated according to the running results. It is determined whether this is the first run. If so, all components are sorted to obtain the first execution sequence of all components. Otherwise, it is checked whether the component topology has changed compared to the previous run. If so, all components are reordered to obtain the updated execution sequence of all components. Otherwise, the historical execution sequence of all components in the previous run is retained.
2. The rapid control prototyping method according to claim 1, characterized in that, The host computer displays the running results in the control prototype running monitoring window and determines whether the running results meet the design requirements. If so, the fast control prototype is maintained; otherwise, S5 is executed to update the fast control prototype.
3. The rapid control prototyping method according to claim 1, characterized in that, The graphical modeling area provides graphical modeling operations to quickly control prototype building; the graphical modeling operations include at least: drag and drop operations, connection operations, and parameter configuration operations; The drag-and-drop operation involves dragging the controller model basic element from the model library browser and placing it into the graphical modeling area. The web application then draws the corresponding graphical marker for the controller model basic element in the graphical modeling area. The connection operation involves clicking the input and output ports on the graphic markers in sequence. The Web application then draws lines in the graphical modeling area to establish the connection relationship between the graphic marker ports. The parameter configuration operation involves modifying the parameter values of the basic components of the controller model through the parameter configuration dialog box.
4. The rapid control prototyping method according to claim 1, characterized in that, The lower-level machine runs the aforementioned rapid control prototype, including: S60. Preset termination conditions for operation; S61. Determine if this is the first run. If so, sort all components to obtain the first execution sequence of all components; otherwise, check if the component topology has changed in this run compared to the previous run. If so, reorder all components to obtain the updated execution sequence of all components; otherwise, retain the historical execution sequence of all components from the previous run. S62. Based on the execution sequence obtained in S61, execute the running function corresponding to each component in sequence to obtain the calculation result of each component; S63. Transmit the calculation results of each component and the current operating status of the rapid control prototype to the host computer; S64. Determine whether the preset termination condition has been met. If yes, proceed to S65; otherwise, jump to S62. S65. Send a termination message to the host computer to terminate the operation of the rapid control prototype.
5. The rapid control prototyping method according to claim 4, characterized in that, The operating functions include: arithmetic functions, trigonometric functions, logical operation functions, interpolation operation functions, and state machine operation functions.
6. The rapid control prototyping method according to claim 1, characterized in that, Establish an operation conversion protocol between the host computer and the slave computer. Specifically, each graphical operation is represented by structured data and sent to the slave computer. The slave computer then parses the received structured data into the corresponding operation.
7. The rapid control prototyping method according to claim 4, characterized in that, Parameter estimation is performed before running the rapid control prototype or before executing the corresponding running function of each component in sequence; the parameter estimation is to convert the parameter assignment expression obtained from the parameter configuration dialog box into a numerical value.
8. A rapid control prototyping system, comprising executing the rapid control prototyping method according to any one of claims 1 to 7; characterized in that, include: The browser and cloud service module includes an HTTP service submodule, a quick control prototype submodule, and a runtime monitoring submodule. The cloud service module generates the IP address and port number of the HTTP service, and the browser logs in to the IP address and port number to send a web application page request to the HTTP service submodule. In response to the page request, the HTTP service submodule sends the resource files required to create the Web application to the browser. The resource files include at least a controller model basic element description file. The browser builds a web application based on resource files sent by the HTTP service submodule; The rapid control prototype submodule is used to parse the graphical modeling operations sent by the Web application and convert them into corresponding operations to obtain a rapid control prototype. The operation monitoring submodule is used to send a start-up message to the rapid control prototype submodule to run the rapid control prototype and provide real-time feedback on the operation results.
9. The rapid control prototyping system according to claim 8, characterized in that, The web application includes: a model library browser, a graphical modeling area, and a window for quickly controlling prototype operation and monitoring; The model library browser is used to provide basic components for controller models; The graphical modeling area is used to provide graphical modeling operations based on the basic components of the controller model, and sends each graphical modeling operation to the rapid control prototype submodule; The rapid control prototype operation monitoring window is used to display the operation results of the rapid control prototype.
10. A terminal, characterized in that, It includes a processor and a communication interface coupled to the processor, the processor being used to run computer programs or instructions to implement the rapid control prototyping method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
A sorting method and device for components in a data analysis model
CN109711710A
Man-machine interaction system with separated interface and business
CN117806636A