A graphical programming method
Through graphical programming methods and library function interfaces, embedded application development is simplified, operating efficiency is improved, and the complexity and low efficiency of embedded system development is solved. It is suitable for HVAC and Internet of Things fields.
Patent Information
- Application Number
- CN202011506671.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-18
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2040-12-18
AI Technical Summary
At this stage, embedded application development requires professional programmers to write specialized applications, and the operation efficiency is low in embedded systems with limited resources, making it difficult for ordinary engineers to develop.
Using graphical programming method, through the combination of the control end and embedded system, data acquisition, logical control, numerical transformation and mathematical operation modules are used. The operation code is compiled and stored in the form of library functions, providing a unified interface, and the scheduling algorithm is called according to the category identification number. The operation module, a tree-type data structure, traversing the module through message queue, calls the library function to run.
It simplifies the process of embedded application development, improves the operation efficiency of embedded system applications, lowers the programming threshold, and allows ordinary engineers to quickly generate logic control programs, suitable for HVAC and the Internet of Things fields.
Smart Images

Figure CN112579070B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of heating, ventilation and air conditioning, and in particular to a graphical programming method. Background Art
[0002] Embedded systems generally include embedded hardware systems and embedded software systems. Embedded software systems include general embedded operating systems and applications based on embedded operating systems. At present, embedded applications generally use general programming languages such as C / C++, JAVA, etc. to write applications, and then burn them into embedded systems after compilation to run. Alternatively, a script running platform is installed in the embedded system, and the host computer generates scripts according to application requirements and downloads them to the embedded system for execution.
[0003] At present, embedded applications require professional programmers to write specialized applications according to embedded application requirements. However, general programmers do not understand the industry applications of embedded systems, and professional application engineers who understand industry applications, such as HVAC engineers, do not understand programming languages and embedded system development. Embedded systems generally have limited resources, and script programs run inefficiently in embedded systems. Therefore, it is necessary to develop a graphical programming method. Summary of the invention
[0004] The purpose of the present invention is to solve the above problems and provide a graphical programming method, in which each module is assigned an identification number, the module's operation code is compiled and stored in the form of library functions in the embedded system, the library functions provide a unified interface, and the scheduling algorithm calls the operation module according to the category identification number to obtain the operation result.
[0005] To achieve the above object, the present invention adopts the following technical solutions.
[0006] A graphical programming method includes a control end and an embedded system; the control end includes a data acquisition module, a logic control module, a numerical conversion module, a mathematical operation module and a storage and recording module; the data acquisition module, the logic control module, the numerical conversion module, the mathematical operation module and the storage and recording module are provided with corresponding identification numbers; the embedded system includes an operation code, the operation code is compiled and stored in the embedded system in the form of a library function, and the identification number corresponds to the operation code one by one.
[0007] Furthermore, the data acquisition module includes general input and output, network input and output, and system parameter input and output.
[0008] Furthermore, the logic control module includes basic logic operations, a time control module and a switching module.
[0009] Furthermore, the numerical conversion module includes a PID controller, linear conversion, enthalpy value calculation, wet bulb temperature calculation, dew point temperature calculation, comparison and judgment, slow rise and fall, and threshold value.
[0010] Furthermore, the mathematical operation module includes four arithmetic operations, modulus, absolute value, integer, average value, trigonometric function, logarithm, exponentiation and integration.
[0011] Furthermore, the storage record module includes operating time, historical records and trend records.
[0012] Furthermore, the control end adopts Linux operating system and RTOS real-time operating system.
[0013] Furthermore, the operation code adopts HTML, CSS and JAVASCRITP programming languages.
[0014] Furthermore, the control end uses a serial communication bus or a network protocol for transmission.
[0015] The positive effects of a graphical programming method of the present invention are:
[0016] (1) The present invention solves the problem of simplifying the embedded application development process, avoiding the use of scripting languages in embedded systems with limited resources, and improving the operating efficiency of embedded system applications. A method for granularizing algorithm logic and a method for scheduling granular algorithms are proposed.
[0017] (2) The present invention uses a graphical tool to design program operation logic in a drag-and-drop manner. A tree data structure is generated based on the combination relationship of the graph to indicate the operation priority and operation relationship between each module. The program design is converted into a design module relationship. Application engineers avoid writing program code and only need to relate to application logic. The generated data structure is transmitted to the controller via a network protocol.
[0018] (3) The controller of the present invention uses a message queue method to traverse each module according to the generated forest data structure and the priority in the data structure, and calls the library function algorithm to achieve the effect of running the program. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a schematic diagram provided by an embodiment of the present invention.
[0020] The numbers in the figure are:
[0021] 1. Control end; 2. Embedded system; 3. Data acquisition module; 4. Logic control module; 5. Numerical conversion module; 6. Mathematical operation module; 7. Storage and recording module; 8. Identification number; 9. Operation code. DETAILED DESCRIPTION
[0022] The following is a specific implementation of a graphical programming method of the present invention in conjunction with the accompanying drawings, but it should be pointed out that the specific implementation is not intended to limit the specific implementation of the present invention. All similar structures and similar variations of the present invention should be included in the protection scope of the present invention. The description of the following embodiments is with reference to the attached drawings to illustrate specific embodiments of the present invention that can be implemented. The directional terms mentioned in the embodiments, such as "up", "down", "front", "back", "left", "right", "top", "bottom", etc., are only with reference to the directions of the attached drawings. Therefore, the directional terms used are used to illustrate and understand the present invention, rather than to limit the present invention.
[0023] See also Figure 1 A graphical programming method includes a control terminal 1 and an embedded system 2; the control terminal 1 includes a data acquisition module 3, a logic control module 4, a numerical conversion module 5, a mathematical operation module 6 and a storage and recording module 7; the data acquisition module 3, the logic control module 4, the numerical conversion module 5, the mathematical operation module 6 and the storage and recording module 7 are provided with corresponding identification numbers 8; the embedded system 2 includes an operation code 9, the operation code 9 is compiled and stored in the embedded system 2 in the form of a library function, and the identification number 8 corresponds to the operation code 9 one by one.
[0024] The data acquisition module 3 includes general input and output, network input and output, and system parameter input and output. The logic control module 4 includes basic logic operations, time control module and switching module. The numerical conversion module 5 includes PID controller, linear transformation, enthalpy calculation, wet bulb temperature calculation, dew point temperature calculation, comparison judgment, slow rise and slow fall and threshold. The mathematical operation module 6 includes four arithmetic operations, modulus, absolute value, integer, average value, trigonometric function, logarithm, exponentiation and integration. The storage and recording module 7 includes running time, historical records and trend records. The control terminal 1 adopts Linux operating system and RTOS real-time operating system. The operation code 9 adopts HTML, CSS and JAVASCRITP programming language. The control terminal 1 adopts serial communication bus or network protocol for transmission.
[0025] Module algorithm implementation: Use C / C++ programming language, and write an external interface function for each module. Finally, program a executable program library. The program library is compiled using different compilation environments depending on the operating system. Supports Linux operating system and RTOS real-time operating system. Graphical programming: The program is based on node.js and electron open source platforms. Use HTML, CSS and JAVASCRITP programming languages, web front-end programming technology to generate a graphical push-and-pull programming interface. Data structure: Use an array linked list to store the generated directed graph. Each node in the graph identifies a logical module; the node attributes store the parameters required for data module calculation; the input edge is the node input parameter, and the output edge is the node output parameter. When generating a directed graph, it is necessary to identify the scheduling priority. The priority is as follows: nodes without input edges are prioritized, the outgoing nodes of the edge are prioritized over the input nodes, and when there is a loop in the graph, the loop is removed first when determining the priority. Configuration program transmission and storage: The configuration program is transmitted using a serial communication bus or network protocol. Stored in the non-volatile flash memory in the embedded system 2. Program operation: During operation, according to the configured data structure, the module algorithm is called cyclically, and the final value is output in real time to achieve the running effect.
[0026] This solution is modeled and standardized for general computing algorithms. In applications where programming is required, the writing of program code is avoided. It is only necessary to graphically combine the data according to the application requirements to automatically generate a program application. The writing of computer programs is converted into a combination of limited data. The present invention lowers the threshold for computer programming. In the field of HVAC control or process control, application engineers can generate logic control programs simply and quickly. It can even be extended to the fields of the Internet of Things and edge computing, allowing more ordinary application engineers to develop and apply control programs without professional programming language training.
Claims
1. A graphical programming method, It is characterized in that It includes a control end and an embedded system; the control end includes a data acquisition module, a logic control module, a numerical conversion module, a mathematical operation module and a storage and recording module; the data acquisition module, the logic control module, the numerical conversion module, the mathematical operation module and the storage and recording module are provided with corresponding identification numbers; the embedded system includes an operation code, the operation code is compiled and stored in the embedded system in the form of a library function, and the identification number corresponds to the operation code one by one; the data acquisition module includes general input and output, network input and output and system internal parameter input and output; the logic control module includes basic logic operations, time control Module and switching module; the numerical conversion module includes PID controller, linear transformation, enthalpy calculation, wet bulb temperature calculation, dew point temperature calculation, comparison judgment, slow rise and slow fall and threshold; the mathematical operation module includes four arithmetic operations, modulus, absolute value, integer, average value, trigonometric function, logarithm, exponentiation and integration; the storage record module includes running time, historical record and trend record; the control end adopts Linux operating system and RTOS real-time operating system; the operation code adopts HTML, CSS and JAVASCRITP programming language; the control end adopts serial communication bus or network protocol for transmission; Using C / C++ programming language, each module writes an external interface function, and finally programs an executable program library; the program library is compiled using different compilation environments according to different operating systems; supports Linux operating system and RTOS real-time operating system; graphical programming: the program is based on node.js and electron open source platforms; Use HTML, CSS and JAVASCRITP programming languages, web front-end programming technology to generate a graphical push-and-pull programming interface; The data structure uses an array linked list to store the generated directed graph, and each node of the graph identifies a logical module; the node attributes store the parameters required for the data module calculation; the incoming edge is the node input parameter, and the outgoing edge is the node output parameter; when generating a directed graph, it is necessary to identify the scheduling priority, and the priority is as follows: nodes without incoming edges are given priority, outgoing nodes of edges are given priority over incoming nodes, and when there is a loop in the graph, the loop is removed first when determining the priority; configuration program transmission and storage: the configuration program is transmitted using a serial communication bus or a network protocol and stored in a non-volatile flash memory in the embedded system; when the program is running, the module algorithm is cyclically called according to the configured data structure, and the final value is output in real time to achieve the running effect.
Citation Information
Patent Citations
Graphical embedded type development method and platform
CN102385509A
Intelligent trolley graphical programming method based on ARM Cortex-M series single-chip microcomputer platform
CN104932354A
Programmable-logic-control-system-based programming design method for single-chip microcomputer
CN105824285A
Operating system for embedded computers
US6138271A
