WO2020037906A1 - 一种hmi组态软件脚本编辑方法 - Google Patents

一种hmi组态软件脚本编辑方法 Download PDF

Info

Publication number
WO2020037906A1
WO2020037906A1 PCT/CN2018/122331 CN2018122331W WO2020037906A1 WO 2020037906 A1 WO2020037906 A1 WO 2020037906A1 CN 2018122331 W CN2018122331 W CN 2018122331W WO 2020037906 A1 WO2020037906 A1 WO 2020037906A1
Authority
WO
WIPO (PCT)
Prior art keywords
module
algorithm
editing
configuration software
script
Prior art date
Application number
PCT/CN2018/122331
Other languages
English (en)
French (fr)
Inventor
秦博
王灵军
李伟进
朱康
李旻蔚
Original Assignee
珠海格力电器股份有限公司
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 珠海格力电器股份有限公司 filed Critical 珠海格力电器股份有限公司
Publication of WO2020037906A1 publication Critical patent/WO2020037906A1/zh

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/38Creation or generation of source code for implementing user interfaces

Definitions

  • the invention relates to the technical field of industrial programming, and more particularly, to a script editing method for HMI configuration software.
  • HMI Human Machine Interface
  • Configure means “configuration”, “settings”, “settings”, etc. It means that users can complete the software functions they need in a simple way similar to "building blocks", without the need to write Computer program, also known as "configuration”.
  • the purpose of the present invention is to solve the problems of inefficient and inconvenient configuration software script writing in the prior art, and to provide an HMI configuration software script editing method, which can be implemented through graphical programming, modular programming, and through configuration means. Efficient script logic writing.
  • the invention provides a script editing method for HMI configuration software, which includes the following steps:
  • the generated variables include reference variables and / or temporary variables.
  • the step of generating the reference variable includes:
  • S22 The system saves the variable to a memory block that stores global variables, and does not set a default value
  • the reference variable is used for the parameters of the algorithm and the function body.
  • step of generating the temporary variable includes:
  • this temporary variable can only be used in the function body of the algorithm.
  • step S3 includes the following steps:
  • step S34 Determine whether the script editing is completed. If the editing is completed, the editing is ended. If the editing is not completed, the process returns to step S31.
  • the step S31 specifically includes:
  • a newly created algorithm module is selected, and the newly created algorithm module is any one of the following selected 6 modules: if module, for module, whileDo module, doWhile module, switch module, and sequence module, among which The if module is an image condition judgment module; the for module is an image cycle statement module; the whileDo module is an image cycle first judgment and execution module; the doWhile module is an image execution first and then cycle judgment module; the switch module is image Switch sentence module, sequence module is a graphical sequence sentence module.
  • the step S31 further includes:
  • the newly-created algorithm module selected in the algorithm editing module includes a direct return module, and the direct return module is used to perform a halfway return of the compilation logic.
  • step S32 specifically includes:
  • the operation of adding the newly created algorithm module to the already constructed algorithm or the sequential mode in the algorithm being constructed through sequential mode or nested mode is: first add a first algorithm module, and then click the The arrow pops up the option of the six selected modules, and chooses to add a second algorithm module.
  • the program When executed, the program first runs the contents of the first algorithm module in order, and then runs the second algorithm module.
  • step S32 specifically includes:
  • the operation of adding the newly created algorithm module to the already built algorithm or the nested mode in the algorithm being built through the sequential mode or the nested mode is: selecting a statement part and / or a condition part of the third algorithm module, Then click the plus button in the upper right corner to pop up the option of the above 6 selected modules.
  • Select the embedded to add a fourth algorithm module When executing, the program first enters the third algorithm module. When it executes to the embedded fourth algorithm module, it executes first. Finish the fourth algorithm module, and then execute the rest of the third algorithm module.
  • step S33 further includes:
  • the variables generated in step S2 are configured into corresponding algorithm modules.
  • the invention also provides an air-conditioning system.
  • the control system of the system uses the HMI configuration software script editing method; and an industrial touch screen using the HMI configuration software script editing method.
  • the technical solution provided by the present invention has at least the following advantages:
  • the present invention uses a graphical interface mode for programming, which is different from traditional pure code programming.
  • This graphical programming method mainly uses several algorithm modules (if module, for module, while-do module, do-while module, switch module, sequence module) sequence and nesting operations plus basic variable information and logic to implement the script function of the configuration software, the initialization definition of variables is added through the variable configuration module, and then the added variables can be used in each algorithm module .
  • the HMI configuration software script editing method provided by the present invention can reduce the threshold for HMI configuration software operators to use. It does not require them to master deep programming skills. They only need to know a few basic module contents to implement some through scripts. Logic greatly reduces the cost of manpower training.
  • through graphical programming, modular programming, and efficient writing of script logic through configuration means it brings great convenience to HMI configuration software users.
  • FIG. 1 is a schematic flowchart of an HMI configuration software script editing method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of generating variables in an embodiment of the present invention
  • FIG. 3 is a schematic diagram of an overall process of algorithm editing according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a newly created algorithm module according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of image creation using a sequential mode and a nested mode new algorithm in an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of an image using a nested mode new algorithm according to an embodiment of the present invention.
  • the method of the present invention is mainly applied to the logical definition between pictures on an industrial display screen.
  • screen jump, data operation, etc. but it is not limited to the type of its operating system, it can be Linux, Windows, Mac, Android, IOS and other operating systems, or embedded operating systems.
  • an embodiment of the present invention provides a method for editing an HMI configuration software script, including the following steps:
  • the generating variable includes a reference variable and / or a temporary variable.
  • the step of generating the reference variable includes:
  • S22 The system saves the variable to a memory block that stores global variables, and does not set a default value
  • the reference variable is used for the parameters of the algorithm and the function body.
  • step of generating the temporary variable includes:
  • this temporary variable can only be used in the function body of the algorithm.
  • step S3 includes the following steps:
  • step S34 Determine whether the script editing is completed. If the editing is completed, the editing is ended. If the editing is not completed, the process returns to step S31.
  • the step S31 specifically includes:
  • a newly created algorithm module is selected, and the newly created algorithm module is any one of the following selected 6 modules: if module, for module, whileDo module, doWhile module, switch module, and sequence module, among which The if module is an image condition judgment module; the for module is an image cycle statement module; the whileDo module is an image cycle first judgment and execution module; the doWhile module is an image execution first and then cycle judgment module; the switch module is image Switch sentence module, sequence module is a graphical sequence sentence module.
  • FIG. 4 it is a schematic diagram of a newly created algorithm module in an embodiment of the present invention.
  • the algorithm modules from left to right are: if module, for module, whileDo module, doWhile module, switch Module and sequence module, and the last module is the direct return module; click any one of them to generate the selected algorithm editing module, and add this module in the graphical interface.
  • the above selected six modules mainly include two parts, one is the interface UI, and the other is the data structure behind the algorithm module. For example, a new if module will create an interface and a corresponding data structure at the same time. The content in the interface is mainly used for The data structure behind it configures conditions, data, logic, and so on.
  • the UI interface is dynamically generated. Each module will be nested or sequentially generated according to your choice. Add a module, and a node will be added to the entire algorithm tree. The entire algorithm is a tree. From the top Go down.
  • the step S31 further includes:
  • the newly-created algorithm module selected in the algorithm editing module includes a direct return module, and the direct return module is used to perform a halfway return of the compilation logic.
  • the RET button is a direct return module, which is mainly used to return halfway through some logic execution, similar to the return statement in the C language.
  • step S32 specifically includes:
  • the operation of adding the newly created algorithm module to the already constructed algorithm or the sequential mode in the algorithm being constructed through sequential mode or nested mode is: first add a first algorithm module, and then click the The arrow pops up the option of the six selected modules, and chooses to add a second algorithm module.
  • the program When executed, the program first runs the contents of the first algorithm module in order, and then runs the second algorithm module.
  • step S32 specifically includes:
  • the operation of adding the newly created algorithm module to the already built algorithm or the nested mode in the algorithm being built through the sequential mode or the nested mode is: selecting the statement part and / or the condition part of the third algorithm module Then click the plus button in the upper right corner to pop up the option of the above 6 selected modules.
  • Select the embedded to add a fourth algorithm module When executing, the program first enters the third algorithm module. When it executes to the embedded fourth algorithm module, it executes first. Finish the fourth algorithm module, and then execute the rest of the third algorithm module.
  • step S33 further includes:
  • the variables generated in step S2 are configured into corresponding algorithm modules.
  • FIG. 3 it is a schematic diagram of the overall process of algorithm editing in one embodiment of the present invention; it can be seen in the figure that a new algorithm is added, an algorithm module is added, and the newly created algorithm module is selected from the following six selected modules. Any one: if module, for module, whileDo module, doWhile module, switch module and sequence module. After selecting the algorithm module, write in the condition part and / or statement part of the algorithm module. When you need to use variables, change the previous The variables set in step S2 are added to the condition part and / or the statement part. After the algorithm module is written, the algorithm module is re-executed to perform the loop until the algorithm is edited.
  • the algorithm module addition includes sequential addition and nested addition. .
  • FIG. 5 it is a schematic diagram of a new algorithm using a sequential mode and a nested mode in one embodiment of the present invention
  • FIG. 6 is a schematic diagram of a new algorithm using a nested mode new algorithm in an embodiment of the present invention.
  • algorithm modules there are two cases when adding algorithm modules. One is to add them sequentially. For example: first add an if module, then add a for module, and finally add a switch module. The final effect is that the program runs the if module first. Content, then run the content of the for module, and finally run the content of the switch module. For each module user, just click the arrow below the entire module, and 6 module options will pop up for users to choose.
  • This operation is to add sequentially As shown in Figure 5 above.
  • the other is nested addition. For example: if you want to add a for module in the else part of the if module, first, select the else part, and then click the plus button in the upper right corner. The same will pop up 6 module options, this operation It is a nested addition, as shown in FIG. 6 above.
  • the internal logic is written.
  • the statement part is included, and the other 5 modules also include the condition part.
  • the specific operation you want to achieve. You need to configure the variables when writing the internal logic.
  • var0 and var1 in Figures 5 and 6 above are the two added variables, and they are configured in the if module. The condition judgment is completed, thereby perfecting the module statement.
  • the content including grammar is automatically generated by the interface, which greatly improves editing efficiency.
  • the script editing method of the HMI configuration software proposed by the present invention can be applied to a control system of household appliances such as air conditioners.
  • the invention also protects an industrial touch screen, which uses the HMI configuration software script editing method.
  • the program may be stored in a computer-readable storage medium, and the storage medium may include : Read-only memory (ROM, Read Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk, etc.
  • ROM Read-only memory
  • RAM Random Access Memory
  • magnetic disk or optical disk etc.

Landscapes

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

Abstract

一种HMI组态软件脚本编辑方法,包括:S1:在HMI组态软件脚本编辑环境中设置变量配置模块和算法编辑模块;S2:使用所述变量配置模块生成变量;S3:使用所述算法编辑模块图像化搭建逻辑,完成HMI组态软件脚本的编辑。该方法可以降低HMI组态软件操作人员的使用门槛,只需要知道基本的模块内容就可以通过脚本实现所要求的逻辑,同时,通过图形化的编程、模块化的编程以及通过配置手段实现脚本逻辑的高效编写,方便HMI组态软件使用人员的使用。

Description

一种HMI组态软件脚本编辑方法
本申请要求于2018年8月20日提交中国专利局、申请号为201810950441.6、发明名称为“一种HMI组态软件脚本编辑方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及工业编程技术领域,更具体地,涉及一种HMI组态软件脚本编辑方法。
背景技术
随着工业自动化水平的迅速提高,计算机在工业领域的广泛应用,人们对工业自动化的要求越来越高,种类繁多的控制设备和过程监控装置在工业领域广泛应用,HMI(Human Machine Interface)组态软件就是其中很重要的一种人机交互软件,用户可以根据自己的控制需要,自己组态画面、功能以达到控制监测的效果。“组态(Configure)”的含义是“配置”、“设定”、“设置”等意思,是指用户通过类似“搭积木”的简单方式来完成自己所需要的软件功能,而不需要编写计算机程序,也就是所谓的“组态”。其中多个画面之间的逻辑关系一部分是系统提供的,另外很大一部分是需要自己通过写脚本来实现的,但是传统的HMI组态软件写脚本的语言都需要有一定的计算机语言编程基础,例如:C语言、C#语言、VB等等;这使得使用组态软件的门槛变得比较高,必须要掌握所使用组态软件的脚本对应语言才能进行组态开发。
然而,如何提高组态软件脚本编写的效率和方便性是目前行业研究的 一个重点和难点。
发明内容
本发明的目的在于针对现有技术中组态软件脚本编写效率低下,且不方便等问题,提供一种HMI组态软件脚本编辑方法,通过图形化的编程、模块化的编程以及通过配置手段实现脚本逻辑高效编写。
为了实现上述目的,本发明采取如下技术方案:
本发明提供了一种HMI组态软件脚本编辑方法,包括如下步骤:
S1:在HMI组态软件脚本编辑环境中设置变量配置模块和算法编辑模块;
S2:使用所述变量配置模块生成变量;
S3:使用所述算法编辑模块图像化搭建逻辑,完成HMI组态软件脚本的编辑。
优选地,在所述步骤S2中,所述生成变量包括引用变量和/或临时变量。
优选地,生成所述引用变量的步骤包括:
S21:选择添加引用变量,产生包含默认变量名、数据类型的变量;
S22:系统保存该变量到一个存储全局变量的内存块中,并且不设默认值;
其中,该引用变量用于算法的参数以及函数体。
进一步地,生成所述临时变量的步骤包括:
S21’:选择添加临时变量,产生包含默认变量名、数据类型以及默认值的变量;
S22’:系统不保存该变量具体信息到内存中,只在使用的时候为其赋值初始化;
其中,该临时变量只能用于算法的函数体。
更进一步地,所述步骤S3中,具体包括以下步骤:
S31:在算法编辑模块中选择新建的算法模块;
S32:将所述新建的算法模块通过顺序模式或者嵌套模式添加进已经搭建的算法或者正在搭建的算法,搭建算法框架;
S33:编写所述新建的算法模块中需要填写的部分,包括语句部分和/或条件部分;
S34:判断脚本编辑是否完成,若完成则结束编辑,若没有完成,则返回步骤S31。
优选地,所述步骤S31具体包括:
在算法编辑模块中选择新建的算法模块,所述新建的算法模块为下述被选6个模块中的任意一项:if模块、for模块、whileDo模块、doWhile模块、switch模块以及sequence模块,其中if模块为图像化条件判断模块;for模块为图像化循环语句模块,whileDo模块为图像化的先循环判断后执行模块,doWhile模块为图像化的先执行后循环判断模块;switch模块为图像化的开关语句模块,sequence模块为图像化的顺序语句模块。
优选地,所述步骤S31中还包括:
在算法编辑模块中选择新建的算法模块包括直接返回模块,使用所述直接返回模块执行编译逻辑的中途返回。
进一步地,所述步骤S32具体包括:
将所述新建的算法模块通过顺序模式或者嵌套模式添加进已经搭建的算法或者正在搭建的算法中的所述顺序模式的操作为;先添加第一算法模块,然后点击第一算法模块下方的箭头,弹出上述被选6个模块的选项,选择添加第 二算法模块,执行时程序按照先后顺序先运行第一算法模块的内容,然后运行第二算法模块。
进一步地,所述步骤S32具体包括:
将所述新建的算法模块通过顺序模式或者嵌套模式添加进已经搭建的算法或者正在搭建的算法中的所述嵌套模式的操作为;选中第三算法模块的语句部分和/或者条件部分,然后点击其右上角的加号按钮,弹出上述被选6个模块的选项,选择嵌入添加第四算法模块,执行时程序先进入第三算法模块,执行到嵌入的第四算法模块时,先执行完第四算法模块,然后再执行第三算法模块剩下的部分。
进一步地,所述步骤S33中还包括:
将所述步骤S2中生成的变量配置到相应的算法模块中。
本发明还提出一种空调系统,该系统的控制系统使用了HMI组态软件脚本编辑方法;以及一种工业触摸屏,该工业触摸屏使用了所述的HMI组态软件脚本编辑方法。
相对于现有技术,本发明提供的技术方案至少具有如下优点:
本发明通过图形化界面的模式进行编程不同于传统的纯代码编程,此图形化编程方法主要通过对几个算法模块(if模块、for模块、while-do模块、do-while模块、switch模块、sequence模块)的顺序以及嵌套操作加上基本的变量信息与逻辑去实现组态软件的脚本功能,变量的初始化定义通过变量配置模块进行添加,然后已添加的变量就可以用到各个算法模块中。本发明提供的HMI组态软件脚本编辑方法,可以降低HMI组态软件操作人员的使用门槛,不需要其掌握很深的编程技术,只需要其懂得几个基本 的模块内容就可以通过脚本实现一些逻辑,很大程度上降低了人力培养的成本。同时,通过图形化的编程、模块化的编程以及通过配置手段实现脚本逻辑的高效编写,为HMI组态软件使用人员带来极大方便性。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明一个实施例中HMI组态软件脚本编辑方法的流程示意图;
图2为本发明一个实施例中生成变量的流程示意图;
图3为本发明一个实施例中算法编辑的整体流程示意图;
图4为本发明一个实施例中新建算法模块的图像化示意图。
图5为本发明一个实施例中采用顺序模式和嵌套模式新建算法的图像化示意图。
图6为本发明一个实施例中采用嵌套模式新建算法的图像化示意图。
具体实施方式
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。
在本发明的说明书和权利要求书及上述附图中的描述的一些流程中,包含了按照特定顺序出现的多个操作,但是应该清楚了解,这些操作可以不按照其在本文中出现的顺序来执行或并行执行,操作的序号如S10、S11等,仅仅是 用于区分开各个不同的操作,序号本身不代表任何的执行顺序。
本发明所述方法主要应用于工业显示屏上画面间的逻辑定义。例如:画面跳转、数据操作等等,但其不限制于其操作系统的类型,可以是Linux、Windows、Mac、Android、IOS等操作系统,或嵌入式操作系统。
在本发明的一个实施例中,如图1所示,本发明实施例中提供了一种HMI组态软件脚本编辑方法,包括如下步骤:
S1:在HMI组态软件脚本编辑环境中设置变量配置模块和算法编辑模块;
S2:使用所述变量配置模块生成变量;
S3:使用所述算法编辑模块图像化搭建逻辑,完成HMI组态软件脚本的编辑。
如图2所示,为生成变量的流程示意图,在所述步骤S2中,所述生成变量包括引用变量和/或临时变量。
优选地,生成所述引用变量的步骤包括:
S21:选择添加引用变量,产生包含默认变量名、数据类型的变量;
S22:系统保存该变量到一个存储全局变量的内存块中,并且不设默认值;
其中,该引用变量用于算法的参数以及函数体。
进一步地,生成所述临时变量的步骤包括:
S21’:选择添加临时变量,产生包含默认变量名、数据类型以及默认值的变量;
S22’:系统不保存该变量具体信息到内存中,只在使用的时候为其赋值初始化;
其中,该临时变量只能用于算法的函数体。
更进一步地,所述步骤S3中,具体包括以下步骤:
S31:在算法编辑模块中选择新建的算法模块;
S32:将所述新建的算法模块通过顺序模式或者嵌套模式添加进已经搭建的算法或者正在搭建的算法,搭建算法框架;
在这里,为了更进一步说明,我们举例如下:在正在搭建的算法框架中,先搭建了一个IF……ELSE…..模块,编辑人员在此基础上,想在ELSE部分嵌套一个FOR循环语句,其具体做法是:1、创建FOR循环模块,2、将新建的FOR循环模块添加进正在搭建的算法中,即IF……ELSE…..语句中的ELSE部分,从而进一步完成框架的搭建。对于已经搭建好的算法框架,在需要重新编辑时,也是采用上述相同的步骤。
S33:编写所述新建的算法模块中需要填写的部分,包括语句部分和/或条件部分;
S34:判断脚本编辑是否完成,若完成则结束编辑,若没有完成,则返回步骤S31。
优选地,所述步骤S31具体包括:
在算法编辑模块中选择新建的算法模块,所述新建的算法模块为下述被选6个模块中的任意一项:if模块、for模块、whileDo模块、doWhile模块、switch模块以及sequence模块,其中if模块为图像化条件判断模块;for模块为图像化循环语句模块,whileDo模块为图像化的先循环判断后执行模块,doWhile模块为图像化的先执行后循环判断模块;switch模块为图像化的开关语句模块,sequence模块为图像化的顺序语句模块。
具体如图4所示,为本发明一个实施例中新建算法模块的图像化示意图。 该图中用户点击开始后,可选择下述前6个模块中的任意一个算法模块进行算法编辑,其中,从左往右算法模块依次是:if模块、for模块、whileDo模块、doWhile模块、switch模块以及sequence模块,另外最后一个模块为直接返回模块;点击其中的任意一个即可生成所选择的算法编辑模块,在图形界面中即可添加该模块。
上述被选6个模块主要包含两部分,一部分是界面UI,一部分是算法模块背后的数据结构,例如:新建一个if模块,会同时创建界面以及对应的数据结构,界面中的内容主要用来为背后的数据结构配置条件、数据、逻辑等等。UI界面都是动态生成的,根据自己的选择会嵌套或者顺序的生成各个模块,添加一个模块,在整个的算法树中就会相应的添加一个节点进去,整个算法是一棵树,从上往下执行。
优选地,所述步骤S31中还包括:
在算法编辑模块中选择新建的算法模块包括直接返回模块,使用所述直接返回模块执行编译逻辑的中途返回。
具体地,在图4中,所述RET按钮是直接返回模块,主要用于某些逻辑执行的中途返回,类似于C语言里面的return语句。
进一步地,所述步骤S32具体包括:
将所述新建的算法模块通过顺序模式或者嵌套模式添加进已经搭建的算法或者正在搭建的算法中的所述顺序模式的操作为;先添加第一算法模块,然后点击第一算法模块下方的箭头,弹出上述被选6个模块的选项,选择添加第二算法模块,执行时程序按照先后顺序先运行第一算法模块的内容,然后运行第二算法模块。
进一步地,所述步骤S32具体包括:
将所述新建的算法模块通过顺序模式或者嵌套模式添加进已经搭建的算法或者正在搭建的算法中的所述嵌套模式的操作为;选中第三算法模块的语句部分和/或者条件部分,然后点击其右上角的加号按钮,弹出上述被选6个模块的选项,选择嵌入添加第四算法模块,执行时程序先进入第三算法模块,执行到嵌入的第四算法模块时,先执行完第四算法模块,然后再执行第三算法模块剩下的部分。
进一步地,所述步骤S33中还包括:
将所述步骤S2中生成的变量配置到相应的算法模块中。
如图3所示,为本发明一个实施例中算法编辑的整体流程示意图;在该图中可看出来,新建算法,添加算法模块,选择新建的算法模块为下述被选6个模块中的任意一项:if模块、for模块、whileDo模块、doWhile模块、switch模块以及sequence模块,选择好算法模块以后,在该算法模块的条件部分和/或语句部分编写,需要用到变量时,将前序步骤S2中设置的变量添加进条件部分和/或语句部分,该算法模块编写完成后,重新执行添加算法模块,以此循环,知道算法编辑完毕,其中添加算法模块包括顺序添加和嵌套添加。
具体地,如图5所示,为本发明一个实施例中采用顺序模式和嵌套模式新建算法的图像化示意图;图6为本发明一个实施例中采用嵌套模式新建算法的图像化示意图。如前所述,在添加算法模块时分两种情况,一种是顺序添加,例如:先添加一个if模块,接着再添加一个for模块,最后添加一个switch模块,最后的效果是程序先运行if模块的内容,再运行for模块的内容,最后运行switch模块的内容,针对每一个模块用户只需点击整个模块下方的箭 头,就会弹出6个模块的选项,供用户选择,这种操作是顺序添加,如上述附图5所示。另一种是嵌套添加,例如:想要在if模块的else部分添加一个for模块,首先,选中else部分,然后点击右上角加号按钮,同样的会弹出6个模块的选项,这种操作是嵌套添加,如上述附图6所示。
在上述过程中将算法的框架搭好以后,进行内部逻辑的编写,除了sequence模块只包含语句部分,其它5个模块还包含条件部分,条件部分需写入逻辑的一些判断条件,语句部分写入具体的某种情况想要实现的操作。在内部逻辑编写时需要配置变量,这个时候可以将前面步骤S2中添加的变量配置到相应的模块中,如上述附图5和6中的var0与var1是添加的两个变量,配置到了if模块的条件判断中,从而完善该模块语句。
通过上述步骤,用户可以很轻松的实现脚本的编写,不需要掌握很深的语言技能,包括语法等内容都是界面自动去生成,极大提高编辑效率。
通过对本发明的HMI组态软件脚本编辑方法的揭示可以知晓,本发明的实施,能够应用于工业显示屏上画面间的逻辑定义,如:画面跳转、数据操作等等,提高了工业操作的方便性和自动化程度。
本发明提出的HMI组态软件脚本编辑方法可以应用于空调等家用电器的控制系统中。
本发明还保护一种工业触摸屏,该工业触摸屏使用了所述的HMI组态软件脚本编辑方法。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,模块和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序指令来控制相关的硬件来完成,该程序可以存储于一计算机可读存储介质中,存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁盘或光盘等。
以上结合实施例对本发明进行了详细介绍,对于本领域的普通技术人员依据本发明的构思,在具体实施方式及应用范围上所做的改变均应包括在本发明的权利要求保护范围之内。

Claims (12)

  1. 一种HMI组态软件脚本编辑方法,其特征在于,包括如下步骤:
    S1:在HMI组态软件脚本编辑环境中设置变量配置模块和算法编辑模块;
    S2:使用所述变量配置模块生成变量;
    S3:使用所述算法编辑模块图像化搭建逻辑,完成HMI组态软件脚本的编辑。
  2. 根据权利要求1所述的HMI组态软件脚本编辑方法,其特征在于:在所述步骤S2中,所述生成变量包括引用变量和/或临时变量。
  3. 根据权利要求2所述的HMI组态软件脚本编辑方法,其特征在于:生成所述引用变量的步骤包括:
    S21:选择添加引用变量,产生包含默认变量名、数据类型的变量;
    S22:系统保存该变量到一个存储全局变量的内存块中,并且不设默认值;
    其中,该引用变量用于算法的参数以及函数体。
  4. 根据权利要求2所述的HMI组态软件脚本编辑方法,其特征在于:生成所述临时变量的步骤包括:
    S21’:选择添加临时变量,产生包含默认变量名、数据类型以及默认值的变量;
    S22’:系统不保存该变量具体信息到内存中,只在使用的时候为其赋值初始化;
    其中,该临时变量只能用于算法的函数体。
  5. 根据权利要求1所述的HMI组态软件脚本编辑方法,其特征在于:所述步骤S3中,具体包括以下步骤:
    S31:在算法编辑模块中选择新建的算法模块;
    S32:将所述新建的算法模块通过顺序模式或者嵌套模式添加进正在搭建的算法或者已搭建的算法中,搭建算法框架;
    S33:编写所述新建的算法模块中需要填写的部分,包括语句部分和/或条件部分;
    S34:判断脚本编辑是否完成,若完成则结束编辑,若没有完成,则返回步骤S31。
  6. 根据权利要求5所述的HMI组态软件脚本编辑方法,其特征在于:所述步骤S31具体包括:
    在算法编辑模块中选择新建的算法模块,所述新建的算法模块为下述被选6个模块中的任意一项:if模块、for模块、whileDo模块、doWhile模块、switch模块以及sequence模块,其中if模块为图像化条件判断模块;for模块为图像化循环语句模块,whileDo模块为图像化的先循环判断后执行模块,doWhile模块为图像化的先执行后循环判断模块;switch模块为图像化的开关语句模块,sequence模块为图像化的顺序语句模块。
  7. 根据权利要求6所述的HMI组态软件脚本编辑方法,其特征在于:所述步骤S31中还包括:
    在算法编辑模块中选择新建的算法模块包括直接返回模块,使用所述直接返回模块执行编译逻辑的中途返回。
  8. 根据权利要求6所述的HMI组态软件脚本编辑方法,其特征在于:所述步骤S32具体包括:
    将所述新建的算法模块通过顺序模式或者嵌套模式添加进已经搭建的算法或者正在搭建的算法中的所述顺序模式的操作为;先添加第一算法模块,然 后点击第一算法模块下方的箭头,弹出上述被选6个模块的选项,选择添加第二算法模块,执行时程序按照先后顺序先运行第一算法模块的内容,然后运行第二算法模块。
  9. 根据权利要求6所述的HMI组态软件脚本编辑方法,其特征在于:所述步骤S32具体包括:
    将所述新建的算法模块通过顺序模式或者嵌套模式添加进已经搭建的算法或者正在搭建的算法中的所述嵌套模式的操作为;选中第三算法模块的语句部分和/或者条件部分,然后点击其右上角的加号按钮,弹出上述被选6个模块的选项,选择嵌入添加第四算法模块,执行时程序先进入第三算法模块,执行到嵌入的第四算法模块时,先执行完第四算法模块,然后再执行第三算法模块剩下的部分。
  10. 根据权利要求5所述的HMI组态软件脚本编辑方法,其特征在于:所述步骤S33中还包括:
    将所述步骤S2中生成的变量配置到相应的算法模块中。
  11. 一种组态软件,其特征在于,该组态软件使用权利要求1-10任一项所述的HMI组态软件脚本编辑方法。
  12. 一种工业触摸屏,其特征在于,该工业触摸屏使用权利要求1-10任一项所述的HMI组态软件脚本编辑方法。
PCT/CN2018/122331 2018-08-20 2018-12-20 一种hmi组态软件脚本编辑方法 WO2020037906A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810950441.6A CN108829394A (zh) 2018-08-20 2018-08-20 一种hmi组态软件脚本编辑方法
CN201810950441.6 2018-08-20

Publications (1)

Publication Number Publication Date
WO2020037906A1 true WO2020037906A1 (zh) 2020-02-27

Family

ID=64151203

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/122331 WO2020037906A1 (zh) 2018-08-20 2018-12-20 一种hmi组态软件脚本编辑方法

Country Status (2)

Country Link
CN (1) CN108829394A (zh)
WO (1) WO2020037906A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185508A (zh) * 2022-05-20 2022-10-14 中核武汉核电运行技术股份有限公司 一种基于图元的算法组态工具和方法

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829394A (zh) * 2018-08-20 2018-11-16 珠海格力电器股份有限公司 一种hmi组态软件脚本编辑方法
CN110361986B (zh) * 2019-07-22 2021-02-19 珠海格力电器股份有限公司 仿真文件的生成方法和装置、仿真系统
CN110427183B (zh) * 2019-08-07 2020-10-23 珠海格力电器股份有限公司 图形化函数编辑方法、装置和组态软件
CN110457107B (zh) * 2019-08-09 2021-01-15 珠海格力电器股份有限公司 组态软件操作指令管理方法、装置和系统
CN111338619B (zh) * 2020-02-21 2023-06-23 中科新松有限公司 一种图形化算法编程交互系统、编程方法和可读存储介质
CN111352620B (zh) * 2020-03-25 2021-09-14 珠海格力电器股份有限公司 可视化组态编程方法及系统
CN111651142B (zh) * 2020-05-26 2022-08-26 江苏华途数控科技有限公司 一种组态型示教器管理系统
CN111966341B (zh) * 2020-07-23 2022-03-04 中国航发控制系统研究所 支持事件序列自定义的燃机监控软件事件组态方法
CN112306577A (zh) * 2020-11-03 2021-02-02 珠海格力电器股份有限公司 Hmi组态软件控件的定时方法、计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130311914A1 (en) * 2011-11-11 2013-11-21 Rockwell Automation Technologies, Inc. Method and apparatus for computer aided design of human-machine interface animated graphical elements
CN106444613A (zh) * 2016-11-15 2017-02-22 爱普(福建)科技有限公司 一种设备驱动控制器组件的实现方法及系统
CN107861716A (zh) * 2017-11-09 2018-03-30 山东省计算中心(国家超级计算济南中心) 软件定义型控制系统及控制方法
CN108829394A (zh) * 2018-08-20 2018-11-16 珠海格力电器股份有限公司 一种hmi组态软件脚本编辑方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8332809B2 (en) * 2004-09-30 2012-12-11 Microsoft Corporation Workflow schedule authoring tool
JP2011108008A (ja) * 2009-11-18 2011-06-02 Koyo Electronics Ind Co Ltd Hmi画面自動生成方法
CN104268072B (zh) * 2014-09-03 2017-02-15 武汉烽火网络有限责任公司 图形化脚本编辑器及快速开发通信设备测试脚本的方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130311914A1 (en) * 2011-11-11 2013-11-21 Rockwell Automation Technologies, Inc. Method and apparatus for computer aided design of human-machine interface animated graphical elements
CN106444613A (zh) * 2016-11-15 2017-02-22 爱普(福建)科技有限公司 一种设备驱动控制器组件的实现方法及系统
CN107861716A (zh) * 2017-11-09 2018-03-30 山东省计算中心(国家超级计算济南中心) 软件定义型控制系统及控制方法
CN108829394A (zh) * 2018-08-20 2018-11-16 珠海格力电器股份有限公司 一种hmi组态软件脚本编辑方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
INTOUCH® HMI (NON-OFFICIAL TRANSLATION: GUIDE FOR INTOUCH@ HMI SCRIPT AND LOGIC, 6 August 2007 (2007-08-06), pages 13 ; 63 - 65, Retrieved from the Internet <URL:https://www.2cto.com/ebook/201304/38245.html#download> *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185508A (zh) * 2022-05-20 2022-10-14 中核武汉核电运行技术股份有限公司 一种基于图元的算法组态工具和方法

Also Published As

Publication number Publication date
CN108829394A (zh) 2018-11-16

Similar Documents

Publication Publication Date Title
WO2020037906A1 (zh) 一种hmi组态软件脚本编辑方法
CN108319456B (zh) 一种免编程深度学习应用的开发方法
CN103197929B (zh) 一种面向儿童的图形化编程系统和方法
CN109634592A (zh) 图形化Python编程交互方法、系统及电子设备
JP2020505670A (ja) コンポーネントリリース方法、グラフィック機械学習アルゴリズムプラットフォームベースのコンポーネント構築方法及びグラフィック機械学習アルゴリズムプラットフォーム
JP2011040059A5 (zh)
WO2015039628A1 (zh) 可视化步骤编程法
CN104750490A (zh) 界面动画实现方法及系统
EP1836565A1 (en) Dynamic generation of formatted user interfaces in software environments
WO2023284312A1 (zh) 工作流程的构建方法及装置、设备、计算机存储介质及计算机程序产品
WO2023138435A1 (zh) 应用开发平台、微程序生成方法、设备及存储介质
CN103513977A (zh) 一种群成员列表的展示方法和装置
CN107943474A (zh) 一种智能机器人的编程方法
CN104793927A (zh) 一种界面编辑方法及装置
CN108920143A (zh) 一种用于人机交互软件的快速开发方法
CN110687921B (zh) 一种无人机飞行控制方法、装置及电子设备和存储介质
CN105446788B (zh) 一种信息处理方法及电子设备
US20120046773A1 (en) Mold design system and method
CN109117128A (zh) 一种实现相同目标的编程系统
CN103499931A (zh) 一种控制器设计方法及装置
TWI738216B (zh) 事件處理文件的開發方法與裝置
CN108089854A (zh) 一种linux系统下pci设备驱动开发系统
CN103902274A (zh) 智能电视ui开发的平台
CN110543304A (zh) 方案实现方法和装置
JPH1069379A (ja) 図的プログラミング方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18930789

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18930789

Country of ref document: EP

Kind code of ref document: A1