CN111352620A - Visual configuration programming method and system - Google Patents

Visual configuration programming method and system Download PDF

Info

Publication number
CN111352620A
CN111352620A CN202010219683.5A CN202010219683A CN111352620A CN 111352620 A CN111352620 A CN 111352620A CN 202010219683 A CN202010219683 A CN 202010219683A CN 111352620 A CN111352620 A CN 111352620A
Authority
CN
China
Prior art keywords
programming
module
script
logic
user
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
CN202010219683.5A
Other languages
Chinese (zh)
Other versions
CN111352620B (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.)
Gree Electric Appliances Inc of Zhuhai
Original Assignee
Gree Electric Appliances Inc of Zhuhai
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 Gree Electric Appliances Inc of Zhuhai filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202010219683.5A priority Critical patent/CN111352620B/en
Publication of CN111352620A publication Critical patent/CN111352620A/en
Application granted granted Critical
Publication of CN111352620B publication Critical patent/CN111352620B/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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation

Abstract

The invention discloses a visual configuration programming method and a visual configuration programming system, wherein the method comprises the following steps: identifying programming logic set by a user through a visual interface of configuration software; and converting the programming logic into script program codes executable by the controller. By adopting the technical scheme of the invention, the universality and debugging efficiency of the configuration software can be improved.

Description

Visual configuration programming method and system
Technical Field
The present invention relates to the field of configuration programming, and in particular, to a visual configuration programming method and system.
Background
With the rapid improvement of the industrial automation level and the wide application of computers in the industrial field, people have higher and higher requirements on industrial automation, a variety of control devices and process monitoring devices are widely applied in the industrial field, and hmi (human Machine interface) configuration software is important human-computer interaction software, so that a user can configure pictures and functions to achieve the effect of controlling and monitoring according to the control requirement of the user.
The configuration software available in the market at present is graphical programming by combining the characteristics of the controller, but in the programming process, each programming language has the characteristics of each family, and no language capable of being generalized exists. When each language is compiled after debugging, the languages are compiled into binary files and are issued to the controller to run logic. This reduces the versatility of the configuration programming, and consumes much time in the compiling process. Because the programming language learning curve of each family is steep, the method is not suitable for fast mastering.
Disclosure of Invention
The present invention provides a visual configuration programming method and system for solving the technical problem of low versatility of the configuration software in the prior art.
In an embodiment of the present invention, a visual configuration programming method is provided, which includes:
identifying programming logic set by a user through a visual interface of configuration software;
and converting the programming logic into script program codes executable by the controller.
In the embodiment of the invention, a user sets the programming logic in a configuration programming mode or a script code writing mode.
In an embodiment of the present invention, the visual configuration programming method further includes:
and running and debugging the script program code which can be executed by the controller, and issuing the script program code into the controller for execution.
In the embodiment of the present invention, the converting the programming logic into a script program code executable by a controller includes:
establishing a stack, and uniformly managing various variables generated in the operation process of the programming logic;
establishing independent threads for each scene in the running process of the programming logic;
and loading a variable module, a custom module and a third-party library module required by the operation of each thread.
In an embodiment of the present invention, a visual configuration programming system is further provided, which includes:
the configuration interaction module is used for providing a visual interface for a user to set programming logic;
and the script generation module is used for converting the programming logic set by the user into a script program code which can be executed by the controller.
In the embodiment of the invention, a user sets the programming logic in a configuration programming mode or a script code writing mode.
In an embodiment of the present invention, the script generating module includes:
the variable storage management unit is used for uniformly managing various variables generated in the operation process of the programming logic;
the thread management unit is used for establishing independent threads for each scene in the running process of the programming logic and managing each thread;
and the main running program management unit is used for loading the variable module, the custom module and the third library module required by the running of each thread.
In this embodiment of the present invention, the script generating module further includes:
and the code packaging unit is used for automatically packaging the script codes input by the user into a self-defined logic module.
In an embodiment of the present invention, the visual configuration programming system further includes:
and the running debugging module is used for running and debugging the script program code which can be executed by the controller.
In an embodiment of the present invention, the visual configuration programming system further includes:
and the encryption module is used for encrypting the script program code generated by the script generation module.
Compared with the prior art, in the visual configuration programming method and the visual configuration programming system, the programming logic input by the graphical configuration programming mode or the programming logic input directly through the script codes is converted into the script program codes executable by the controller, and because the script language is a general language, most programmers can quickly master the script program codes, so that the universality of the configuration programming is improved; in addition, the script voice can be directly issued to the controller to execute the logic program, so that the compiling time is saved, and the online debugging efficiency can be improved.
Drawings
Fig. 1 is a schematic structural diagram of a visual configuration programming system according to an embodiment of the present invention.
Fig. 2 is a flowchart illustrating a programming process performed by the visual configuration programming system according to an embodiment of the present invention.
Detailed Description
As shown in fig. 1, the visual configuration programming system according to the embodiment of the present invention includes a configuration interaction module 1, a script generation module 2, an operation debugging module 3, and an encryption module 4. The following description will be made separately.
The configuration interaction module 1 is used for providing a visual interface for a user to perform configuration programming and providing a code input interface for the user to input a script program code.
It should be noted that the visual interface provided by the configuration interaction module 1 includes a plurality of logic modules, and a user can perform configuration programming by setting the order of the plurality of logic modules and setting the input/output variables of each logic module. The configuration interaction module also provides a code input interface, and a user can directly input script codes in the code input interface for programming. After the user completes programming by means of configuration programming or completes programming by means of code input, the configuration interaction module 1 identifies the programming logic of the user.
And the script generation module 2 is used for converting the programming logic set by the user into a script program code which can be executed by the controller. The script generation module 2 can analyze the logic module sequence, the module type, the module input and output relationship and the period variable storage relationship set by the user and uniformly generate script program codes.
And the running debugging module 3 is used for running and debugging the script program code generated by the script generating module 2.
The encryption module 4 is configured to encrypt the script program code that is generated by the script generation module 2 and that is executable by the controller. In order to prevent the programming logic set by the user from being maliciously tampered, the user can choose to encrypt the script program code generated by the script generation module 2 by using the encryption module.
In the embodiment of the present invention, the script generating module 2 includes a variable storage managing unit 21, a thread managing unit 22, a main running program managing unit 23, and a code encapsulating unit 24.
The variable storage management unit 21 is configured to perform unified management on various variables generated in the program logic operation process. These variables include global storable variables, global non-storable variables, and local variables. The variable storage management unit 21 may store the variable data by using a memory or a persistence technology.
The thread management unit 22 establishes an independent thread for each scene in the operation process of the programming logic and manages each thread. The thread management unit 22 is mainly responsible for managing thread delays, managing the life cycles of threads, and managing thread locks in coordination with each other among threads.
And the main running program management unit 23 is configured to load a variable module, a custom module, and a third library module required by the running of each thread.
The code packaging unit 24 is used for automatically packaging the script code input by the user into a self-defined logic module. It should be noted that the script code input by the user is also a programming logic, and the code encapsulating unit 24 encapsulates the script code input by the user into a self-defined logic module, and the self-defined logic module can be displayed in a graphical form and graphically edited together with the self-contained logic module in the configuration software.
As shown in fig. 2, the programming process using the visual configuration programming system is as follows:
first, a user newly builds an engineering project. In the established engineering project, a user can establish a plurality of scenes, and the system generates one scene by default. Each independent operation logic unit is in an independent scene; the user can select different programming modes to program the logic, can select a mode of directly writing codes, and can also select a mode of programming through graphical configuration.
If the user programs by directly writing the codes, the system automatically packages the codes written by the user when the user selects to store after writing the complete codes, identifies the programming logic of the user and forms a self-defined logic module.
If the user selects the configuration programming mode, the user can connect the logic modules and the process in a graphical configuration mode, and the system can analyze the programming logic of the user according to the configuration graph connected by the user and disassemble the corresponding logic operation module.
Then, converting the programming logic set by the user into a script program code operated by the controller, wherein the specific process comprises the following steps: the variable storage management unit 21 establishes a stack, and performs unified management on various variables generated in the programming logic operation process; the thread management unit 22 establishes an independent thread for each scene in the programming logic operation process and manages each thread; the main running program management unit 23 loads a variable module, a custom module and a third library module required for running of each thread.
And then, operating and debugging the generated script program code, wherein the visual configuration programming system can independently operate at the PC end, but can perform real-time data interaction with the field controller through an independent interface.
And finally, directly issuing the generated script program code to a field controller, and independently operating by the field controller.
In summary, in the visual configuration programming method and system of the present invention, the programming logic input by the graphical configuration programming method or the programming logic input directly through the script code is converted into the script program code executable by the controller, because the script language is a general language, most programmers can quickly grasp the script program code, and the universality of the configuration programming is improved; in addition, the script voice can be directly issued to the controller to execute the logic program, so that the compiling time is saved, and the online debugging efficiency can be improved.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.

Claims (10)

1. A visual configuration programming method, comprising:
identifying programming logic set by a user through a visual interface of configuration software;
and converting the programming logic into script program codes executable by the controller.
2. The visual configuration programming method according to claim 1, wherein a user sets the programming logic by means of configuration programming or by means of writing script code.
3. The visual configuration programming method of claim 2, further comprising:
and running and debugging the script program code which can be executed by the controller, and issuing the script program code into the controller for execution.
4. The visual configuration programming method according to claim 1, wherein converting the programming logic into script program code executable by a controller comprises:
establishing a stack, and uniformly managing various variables generated in the operation process of the programming logic;
establishing independent threads for each scene in the running process of the programming logic;
and loading a variable module, a custom module and a third-party library module required by the operation of each thread.
5. A visual configuration programming system, comprising:
the configuration interaction module is used for providing a visual interface for a user to set programming logic;
and the script generation module is used for converting the programming logic set by the user into a script program code which can be executed by the controller.
6. The visual configuration programming system of claim 5, wherein a user configures the programming logic by programming or by writing script code.
7. The visual configuration programming system of claim 6 wherein the script generation module comprises:
the variable storage management unit is used for uniformly managing various variables generated in the operation process of the programming logic;
the thread management unit is used for establishing independent threads for each scene in the running process of the programming logic and managing each thread;
and the main running program management unit is used for loading the variable module, the custom module and the third library module required by the running of each thread.
8. The visual configuration programming system of claim 7 wherein the script generation module further comprises:
and the code packaging unit is used for automatically packaging the script codes input by the user into a self-defined logic module.
9. The visual configuration programming system of claim 6, further comprising:
and the running debugging module is used for running and debugging the script program code which can be executed by the controller.
10. The visual configuration programming system of claim 6, further comprising:
and the encryption module is used for encrypting the script program code generated by the script generation module.
CN202010219683.5A 2020-03-25 2020-03-25 Visual configuration programming method and system Active CN111352620B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010219683.5A CN111352620B (en) 2020-03-25 2020-03-25 Visual configuration programming method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010219683.5A CN111352620B (en) 2020-03-25 2020-03-25 Visual configuration programming method and system

Publications (2)

Publication Number Publication Date
CN111352620A true CN111352620A (en) 2020-06-30
CN111352620B CN111352620B (en) 2021-09-14

Family

ID=71193053

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010219683.5A Active CN111352620B (en) 2020-03-25 2020-03-25 Visual configuration programming method and system

Country Status (1)

Country Link
CN (1) CN111352620B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112255962A (en) * 2020-10-30 2021-01-22 浙江佳乐科仪股份有限公司 PLC programming system based on artificial intelligence
CN112328233A (en) * 2020-10-29 2021-02-05 许继集团有限公司 Visual logic graphical code interpretation and execution method and device
CN113204381A (en) * 2021-05-11 2021-08-03 深圳市星火数控技术有限公司 Instruction file generation method, instruction file generation device, machine equipment and storage medium
CN113641139A (en) * 2021-08-05 2021-11-12 珠海格力电器股份有限公司 System, controller, control system, and storage medium capable of realizing asynchronous programming
CN112328233B (en) * 2020-10-29 2024-04-16 许继集团有限公司 Visual logic graphical code interpretation execution method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101872184A (en) * 2010-06-04 2010-10-27 南大傲拓科技江苏有限公司 Programming and control method of sequence control diagram of programmable controller
WO2014014935A1 (en) * 2012-07-16 2014-01-23 Newvoicemedia Limited System and method for optimized and distributed resource management
US20150378733A1 (en) * 2014-06-27 2015-12-31 Samsung Electronics Company, Ltd. Redundancy elimination in single instruction multiple data/thread (simd/t) execution processing
CN108829394A (en) * 2018-08-20 2018-11-16 珠海格力电器股份有限公司 A kind of HMI configuration software scripting editing method
CN109144515A (en) * 2018-06-29 2019-01-04 北京广利核系统工程有限公司 The off-line simulation method and device of the graphical algorithm configuration of DCS
CN109284105A (en) * 2018-10-30 2019-01-29 北京天安智慧信息技术有限公司 A kind of SVG configuration display methods and system based on programmable script
CN110262425A (en) * 2019-06-27 2019-09-20 湖北汽车工业学院 A kind of induction heating dcs

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101872184A (en) * 2010-06-04 2010-10-27 南大傲拓科技江苏有限公司 Programming and control method of sequence control diagram of programmable controller
WO2014014935A1 (en) * 2012-07-16 2014-01-23 Newvoicemedia Limited System and method for optimized and distributed resource management
US20150378733A1 (en) * 2014-06-27 2015-12-31 Samsung Electronics Company, Ltd. Redundancy elimination in single instruction multiple data/thread (simd/t) execution processing
CN109144515A (en) * 2018-06-29 2019-01-04 北京广利核系统工程有限公司 The off-line simulation method and device of the graphical algorithm configuration of DCS
CN108829394A (en) * 2018-08-20 2018-11-16 珠海格力电器股份有限公司 A kind of HMI configuration software scripting editing method
CN109284105A (en) * 2018-10-30 2019-01-29 北京天安智慧信息技术有限公司 A kind of SVG configuration display methods and system based on programmable script
CN110262425A (en) * 2019-06-27 2019-09-20 湖北汽车工业学院 A kind of induction heating dcs

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
薛如峰 等: "组态软件脚本语言的设计与实现", 《工业控制计算机》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328233A (en) * 2020-10-29 2021-02-05 许继集团有限公司 Visual logic graphical code interpretation and execution method and device
CN112328233B (en) * 2020-10-29 2024-04-16 许继集团有限公司 Visual logic graphical code interpretation execution method and device
CN112255962A (en) * 2020-10-30 2021-01-22 浙江佳乐科仪股份有限公司 PLC programming system based on artificial intelligence
CN113204381A (en) * 2021-05-11 2021-08-03 深圳市星火数控技术有限公司 Instruction file generation method, instruction file generation device, machine equipment and storage medium
CN113641139A (en) * 2021-08-05 2021-11-12 珠海格力电器股份有限公司 System, controller, control system, and storage medium capable of realizing asynchronous programming
CN113641139B (en) * 2021-08-05 2022-11-25 珠海格力电器股份有限公司 System, controller, control system and storage medium capable of realizing asynchronous programming

Also Published As

Publication number Publication date
CN111352620B (en) 2021-09-14

Similar Documents

Publication Publication Date Title
CN111352620B (en) Visual configuration programming method and system
EP2169547B1 (en) Compilation model for programmable logic controllers (PLC).
CN108351636B (en) Engineering design tool, system and module
CN103814333B (en) For the method and apparatus to programmable control unit programming and configuration
KR100224379B1 (en) Process line control alogorithm automatic generation method
US8984131B2 (en) Real-time run-time system with an administrative module to configure functional modules of the system
US9058029B2 (en) System and method for creating a graphical control programming environment
CN101872184A (en) Programming and control method of sequence control diagram of programmable controller
CN101226385A (en) Soft PLC module of open type soft numerical control system
CN104932905A (en) Automatic code generation method from AADL to C language
CN108829394A (en) A kind of HMI configuration software scripting editing method
KR102225691B1 (en) Script task execution system during preinstallation of embedded system
CN104317589A (en) Automatic code generating method and automatic code generating device for loading dynamic link library
CN103197654A (en) Monitoring system of standard semiconductor equipment based on organic photo conductor (OPC)
CN107479866A (en) The method that open terminal applies data and function are realized based on reconfiguration technique
CN108121285B (en) Application software collaborative compiling method and device based on continuous function diagram
KR20120095513A (en) Method and framework system for converting plc based control code to a general program code using xml interface
CN108829440B (en) Method and system for converting logic configuration array into logic execution command
CN104657136A (en) Integrated system of Simulink assemblies
TWI442316B (en) Program edit system and method for plc
CN112180808B (en) Servo control method, device, system, computer equipment and storage medium
CN109343448B (en) Programming system and programming method for fan integrated control system
CN117234480B (en) Ontology-based multi-programming language component specification and workflow system and use method
WO2022190418A1 (en) Development assitance device, development assitance method, and development assitance program
CN107329449B (en) Creation method of PLC plug-and-play module based on AB 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