[go: up one dir, main page]

CN112579070A - Graphical programming method - Google Patents

Graphical programming method Download PDF

Info

Publication number
CN112579070A
CN112579070A CN202011506671.7A CN202011506671A CN112579070A CN 112579070 A CN112579070 A CN 112579070A CN 202011506671 A CN202011506671 A CN 202011506671A CN 112579070 A CN112579070 A CN 112579070A
Authority
CN
China
Prior art keywords
module
programming method
graphical programming
embedded system
operation code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011506671.7A
Other languages
Chinese (zh)
Other versions
CN112579070B (en
Inventor
钟发斌
邓在刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Qiaotong Intelligent Technology Co ltd
Original Assignee
Shanghai Qiaotong Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Qiaotong Intelligent Technology Co ltd filed Critical Shanghai Qiaotong Intelligent Technology Co ltd
Priority to CN202011506671.7A priority Critical patent/CN112579070B/en
Publication of CN112579070A publication Critical patent/CN112579070A/en
Application granted granted Critical
Publication of CN112579070B publication Critical patent/CN112579070B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a graphical programming method, which comprises a control end and an embedded system; the control end comprises a data acquisition module, a logic control module, a numerical value conversion module, a mathematical operation module and a storage and recording module; the data acquisition module, the logic control module, the numerical value transformation module, the mathematical operation module and the storage recording module are provided with corresponding identification numbers; the embedded system comprises an operation code, the operation code is compiled and stored in the embedded system in a library function form, and the identification number is matched with the operation code in a one-to-one correspondence manner; each module is allocated with an identification number, the operation codes of the modules are compiled and stored in the embedded system in a library function form, the library functions provide a uniform interface, and the scheduling algorithm calls the operation modules according to the category identification numbers to obtain operation results.

Description

Graphical programming method
Technical Field
The invention relates to the field of heating ventilation air conditioners, in particular to a graphical programming method.
Background
Embedded systems typically include embedded hardware systems and embedded software systems, including general purpose embedded operating systems and applications based on embedded operating systems. At present, the embedded application programs are generally written by using a general programming language, such as C/C + +, JAVA, and the like, and then are programmed into the embedded system to run after being compiled. Or installing a script running platform in the embedded system, and generating a script by the upper computer according to the application requirement and downloading the script to the embedded system for running.
At present, embedded application requires a professional programmer to write a special application program according to the requirements of the embedded application. Common programmers do not know about industrial applications of the embedded system, and professional application engineers who know about industrial applications, such as heating and ventilation engineers, do not know about programming languages and embedded system development. The embedded system generally has limited resources, and the script program runs in the embedded system with low efficiency. Therefore, it is necessary to develop a graphic programming method.
Disclosure of Invention
The invention aims to solve the problems and provides a graphical programming method, wherein each module is allocated with an identification number, the operation codes of the modules are compiled and stored in an embedded system in a library function form, the library function provides a uniform interface, and a scheduling algorithm calls an operation module according to the category identification number to obtain an operation result.
In order to achieve the purpose, the invention adopts the following technical scheme.
A graphical programming method comprises a control end and an embedded system; the control end comprises a data acquisition module, a logic control module, a numerical value conversion module, a mathematical operation module and a storage and recording module; the data acquisition module, the logic control module, the numerical value transformation module, the mathematical operation module and the storage recording module are provided with corresponding identification numbers; the embedded system comprises an operation code, the operation code is compiled and stored in the embedded system in a library function form, and the identification number is matched with the operation code in a one-to-one correspondence manner.
Further, the data acquisition module comprises a general input and output module, a network input and output module and a system internal parameter input and output module.
Further, the logic control module comprises a basic logic operation module, a time control module and a switching module.
Further, the numerical conversion module comprises a PID controller, linear conversion, enthalpy calculation, wet bulb temperature calculation, dew point temperature calculation, comparison and judgment, slow rising and slow falling and a threshold value.
Further, the mathematical operation module comprises four arithmetic operations, modulus, absolute value, rounding, average value, trigonometric function, logarithm, power and integral.
Further, the memory logging module includes run time, history, and trend records.
Further, the control end adopts a linux operating system and an RTOS real-time operating system.
Furthermore, the operation codes adopt HTML, CSS and JAVASCRIPT program languages.
Further, the control end adopts a serial communication bus or a network protocol mode for transmission.
The positive effects of the graphical programming method of the invention are as follows:
(1) the invention simplifies the development process of the embedded application program, avoids using script program language in the embedded system with limited resources and improves the running efficiency of the application program of the embedded system. A method for granular algorithm logic and a scheduling method for granular algorithm are provided.
(2) The invention adopts a graphical tool and designs program operation logic in a drag-and-drop mode. And generating a tree data structure according to the combination relation of the graphs, and indicating the operation priority and the operation relation among the modules. The programming is converted into design module relationships. The application engineer avoids writing program code and only needs relational application logic. The generated data structure is transmitted to the controller through a network protocol.
(3) According to the forest data structure and the priority in the data structure, the controller traverses each module in a message queue mode and calls a library function algorithm to achieve the effect of running a program.
Drawings
Fig. 1 is a schematic diagram provided by an embodiment of the present invention.
The reference numerals in the figures are respectively:
1. a control end; 2. an embedded system; 3. a data acquisition module; 4. a logic control module; 5. a numerical value transformation module; 6. a mathematical operation module; 7. a storage recording module; 8. identifying the number; 9. and (5) operating codes.
Detailed Description
The following provides a detailed embodiment of a graphical programming method according to the present invention with reference to the accompanying drawings, but it should be noted that: the described embodiments are not intended to limit the practice of the invention. All similar structures and similar variations thereof adopting the invention shall fall within the scope of the invention. The following description of the embodiments refers to the accompanying drawings for illustrating the specific embodiments in which the invention may be practiced. In the embodiments, directional terms such as "up", "down", "front", "back", "left", "right", "top", "bottom", etc. refer to directions of the attached drawings only. Accordingly, the directional terms used are used for explanation and understanding of the present invention, and are not used for limiting the present invention.
See fig. 1. A graphical programming method comprises a control terminal 1 and an embedded system 2; the control end 1 comprises a data acquisition module 3, a logic control module 4, a numerical value conversion module 5, a mathematical operation module 6 and a storage recording module 7; the data acquisition module 3, the logic control module 4, the numerical value conversion module 5, the mathematical operation module 6 and the storage recording module 7 are provided with corresponding identification numbers 8; the embedded system 2 comprises an operation code 9, the operation code 9 is compiled and stored in the embedded system 2 in a library function form, and the identification number 8 is matched with the operation code 9 in a one-to-one correspondence manner.
The data acquisition module 3 comprises general input and output, network input and output and system internal parameter input and output. The logic control module 4 comprises a basic logic operation module, a time control module and a switching module. The numerical value conversion module 5 comprises a PID controller, linear conversion, enthalpy calculation, wet bulb temperature calculation, dew point temperature calculation, comparison and judgment, slow rising and slow falling and a threshold value. The mathematical operation module 6 comprises four arithmetic operations, modulus, absolute value, rounding, average value, trigonometric function, logarithm, power and integral. The memory logging module 7 includes run time, history and trend records. The control terminal 1 adopts a linux operating system and an RTOS real-time operating system. The operation code 9 adopts HTML, CSS and JAVASCRIPP program languages. The control end 1 adopts a serial communication bus or a network protocol mode for transmission.
The module algorithm is realized as follows: and (3) writing an external interface function by each module by adopting a C/C + + programming language. And finally programming the executable program library. And compiling the program library by adopting different compiling environments according to different operating systems. And a linux operating system and an RTOS real-time operating system are supported. Graphical programming: js and electron open source platforms are based on the program. And generating a graphical push-pull test programming interface by adopting HTML, CSS and JAVASCRIPT programming languages and a web front-end programming technology. Data structure: and storing the generated directed graph by adopting an array linked list. Each node of the graph identifies a logical module; the node attribute stores parameters required by the data module for calculation; the input edge is a node input parameter, and the output edge is an output parameter of the node. When generating the directed graph, the scheduling priority needs to be identified, and the priority is as follows: when the node without the edge has priority, the output node of the edge has priority over the input node, and the graph exists in a ring, the ring is removed first when the priority is determined. Configuration program transmission and storage: the configuration program is transmitted by adopting a serial communication bus or a network protocol mode. And storing the data into the non-volatile flash memory of the embedded system 2. And (3) program operation: and when the system runs, a module algorithm is circularly called according to the configured data structure, and a final value is output in real time, so that the running effect is achieved.
The scheme is modeled and standardizes a general calculation algorithm. In applications where programming is required, programming code is avoided. Only according to the application requirements, the data is graphically combined, and the program application is automatically generated. Writing a computer program is converted into a combination of limited data. The invention reduces the threshold of computer program design. In the field of heating, ventilating and air conditioning control or process control, an application engineer can simply and quickly generate a logic control program. Even the method is popularized to the fields of Internet of things and edge computing, and more common application engineers can realize development and application of the control program without professional programming language training.

Claims (9)

1. A graphical programming method is characterized by comprising a control end and an embedded system; the control end comprises a data acquisition module, a logic control module, a numerical value conversion module, a mathematical operation module and a storage and recording module; the data acquisition module, the logic control module, the numerical value transformation module, the mathematical operation module and the storage recording module are provided with corresponding identification numbers; the embedded system comprises an operation code, the operation code is compiled and stored in the embedded system in a library function form, and the identification number is matched with the operation code in a one-to-one correspondence manner.
2. The graphical programming method according to claim 1, wherein the data collection module comprises a general purpose input output, a network input output, and an in-system parameter input output.
3. The graphical programming method according to claim 1, wherein the logic control module comprises a basic logic operation, a time control module and a switching module.
4. The graphical programming method according to claim 1, wherein the numerical transformation module comprises a PID controller, a linear transformation, an enthalpy calculation, a wet bulb temperature calculation, a dew point temperature calculation, a comparison determination, a gradual rise and fall, and a threshold.
5. The graphical programming method according to claim 1, wherein the mathematical operation module comprises a four-way operation, a modulo, an absolute, a rounded, an average, a trigonometric function, a logarithm, a power, and an integral.
6. The graphical programming method of claim 1, wherein the memory logging module comprises run time, history and trend records.
7. The graphical programming method according to claim 1, wherein the control terminal employs a linux operating system and an RTOS real-time operating system.
8. The graphical programming method according to claim 1, wherein the operation code adopts HTML, CSS and javascript program languages.
9. The graphical programming method according to claim 1, wherein the control terminal transmits in a serial communication bus or a network protocol.
CN202011506671.7A 2020-12-18 2020-12-18 Graphical programming method Active CN112579070B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011506671.7A CN112579070B (en) 2020-12-18 2020-12-18 Graphical programming method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011506671.7A CN112579070B (en) 2020-12-18 2020-12-18 Graphical programming method

Publications (2)

Publication Number Publication Date
CN112579070A true CN112579070A (en) 2021-03-30
CN112579070B CN112579070B (en) 2024-12-17

Family

ID=75136270

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011506671.7A Active CN112579070B (en) 2020-12-18 2020-12-18 Graphical programming method

Country Status (1)

Country Link
CN (1) CN112579070B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6138271A (en) * 1996-06-26 2000-10-24 Rockwell Technologies, Llc Operating system for embedded computers
CN102385509A (en) * 2010-08-31 2012-03-21 苏州大学 Graphical embedded type development method and platform
CN104932354A (en) * 2015-05-28 2015-09-23 芜湖思沃电子科技有限公司 Intelligent trolley graphical programming method based on ARM Cortex-M series single-chip microcomputer platform
CN105824285A (en) * 2016-03-14 2016-08-03 上海交通大学 Programmable-logic-control-system-based programming design method for single-chip microcomputer

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6138271A (en) * 1996-06-26 2000-10-24 Rockwell Technologies, Llc Operating system for embedded computers
CN102385509A (en) * 2010-08-31 2012-03-21 苏州大学 Graphical embedded type development method and platform
CN104932354A (en) * 2015-05-28 2015-09-23 芜湖思沃电子科技有限公司 Intelligent trolley graphical programming method based on ARM Cortex-M series single-chip microcomputer platform
CN105824285A (en) * 2016-03-14 2016-08-03 上海交通大学 Programmable-logic-control-system-based programming design method for single-chip microcomputer

Also Published As

Publication number Publication date
CN112579070B (en) 2024-12-17

Similar Documents

Publication Publication Date Title
CN110990019B (en) Java class analysis method and device, storage medium and electronic equipment
US11579856B2 (en) Multi-chip compatible compiling method and device
US20200142376A1 (en) Engineering apparatus, control method of engineering apparatus, and program
JP2006504156A (en) Component model for real-time system control
CN109074336B (en) System and method for programming data transfer within a microcontroller
CN114518884B (en) Method and device for repairing weak memory order problem
CN111352620B (en) Visual configuration programming method and system
US20120253479A1 (en) System and Method for Creating a Graphical Control Programming Environment
US20190196798A1 (en) Executable program creation device, executable program creation method, and executable program creation program
CN107024900B (en) Method for optimally compiling PLC commands
CN117573132A (en) Integrated compiling and downloading method for controllers of different architectures
JP2009169864A (en) Compiling method and compiling program
US20210026609A1 (en) Support device and non-transitory computer-readable recording medium
JP4366575B2 (en) tool
CN112579070A (en) Graphical programming method
Kucera et al. PetriNet Editor+ PetriNet Engine: New Software Tool For Modelling and Control of Discrete Event Systems Using Petri Nets and Code Generation
US11169510B2 (en) Engineering system and method for planning an automation system
Hanselmann et al. Production quality code generation from Simulink block diagrams
US8832670B2 (en) Programmable controller and programming tool for communication with legacy equipment
CN105117227A (en) Method and device for automatically generating code
EP1835407A2 (en) Apparatus and method for managing resources in a Java environment
CN112269579A (en) Compiling PLC controller system based on STM32 processor and implementation method
CN111857726A (en) Method and device for weather forecasting
CN113632016A (en) Memory mapping method for mixed use of programming language and manufacturer defined language
CN111562914B (en) AI intelligent visual control language integration system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant