[go: up one dir, main page]

CN110333861A - A general UI design method for upper computer based on PLC - Google Patents

A general UI design method for upper computer based on PLC Download PDF

Info

Publication number
CN110333861A
CN110333861A CN201910511089.0A CN201910511089A CN110333861A CN 110333861 A CN110333861 A CN 110333861A CN 201910511089 A CN201910511089 A CN 201910511089A CN 110333861 A CN110333861 A CN 110333861A
Authority
CN
China
Prior art keywords
plc
equipment
general
host computer
button
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
CN201910511089.0A
Other languages
Chinese (zh)
Other versions
CN110333861B (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.)
China National Petroleum Corp
Baoji Oilfield Machinery Co Ltd
CNPC National Oil and Gas Drilling Equipment Engineering Technology Research Center Co Ltd
Original Assignee
Baoji Oilfield Machinery 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 Baoji Oilfield Machinery Co Ltd filed Critical Baoji Oilfield Machinery Co Ltd
Priority to CN201910511089.0A priority Critical patent/CN110333861B/en
Publication of CN110333861A publication Critical patent/CN110333861A/en
Application granted granted Critical
Publication of CN110333861B publication Critical patent/CN110333861B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • 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)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Programmable Controllers (AREA)

Abstract

本发明公开了一种基于PLC的上位机通用UI设计方法,具体步骤包括:步骤1,首先设计PLC的上位机通用UI;步骤2,设计经步骤1得到的UI需加载的Excel表格内容;步骤3,激活PLC的上位机软件,加载需经步骤2设计的Excel表格内容,完成PLC的上位机内部变量存储值的更新,本发明根据设备的不同,不需要改变UI的内部程序,只需要更新Excel的内容,PLC上位机重新加载即可,不需要任何额外的编程,显著提高了软件开发效率。

The invention discloses a method for designing a general-purpose UI of an upper computer based on PLC. The specific steps include: step 1, first designing the general-purpose UI of the upper computer of the PLC; step 2, designing the content of an Excel table to be loaded by the UI obtained through step 1; step 3. Activate the upper computer software of the PLC, load the Excel table content that needs to be designed in step 2, and complete the update of the internal variable storage value of the upper computer of the PLC. According to the difference of the equipment, the present invention does not need to change the internal program of the UI, only needs to be updated The content of Excel can be reloaded by the PLC host computer without any additional programming, which significantly improves the efficiency of software development.

Description

一种基于PLC的上位机通用UI设计方法A general UI design method for upper computer based on PLC

技术领域technical field

本发明属于工业控制软件开发技术领域,涉及一种基于PLC的上位机通用UI设计方法。The invention belongs to the technical field of industrial control software development, and relates to a PLC-based universal UI design method for an upper computer.

背景技术Background technique

用户界面(User Interface,简称UI)是系统和用户之间进行交互和信息交换的媒介,UI介于用户与硬件之间,为彼此之间交互沟通而设计的相关软件,使得用户能够方便有效地去操作硬件以达成双向之交互,完成所希望的工作。User Interface (UI for short) is the medium for interaction and information exchange between the system and the user. To operate the hardware to achieve two-way interaction to complete the desired work.

工业自动化领域的UI开发方面,通常的做法是一种设备,开发一套上位机软件,并且上位机的各对象属性直接和PLC程序变量连接,一个对象只能显示唯一的文本,一个对象的操作指令是唯一的。这就导致更换设备、或者设备某些控制需求发生变化时,需要多次修改上位机程序,带来了重复、耗时的劳动,延长了开发周期;同时工业自动化中一些标准化的设备,也迫切需要一种局部满足通用性的上位机UI。In terms of UI development in the field of industrial automation, the usual practice is to develop a set of host computer software for a device, and the attributes of each object of the host computer are directly connected to the PLC program variables. An object can only display unique text, and the operation of an object Instructions are unique. This leads to the need to modify the host computer program many times when the equipment is replaced or certain control requirements of the equipment change, which brings repetitive and time-consuming labor and prolongs the development cycle; at the same time, some standardized equipment in industrial automation is also urgently needed. A host computer UI that partially satisfies universality is needed.

发明内容Contents of the invention

本发明的目的是提供一种基于PLC的上位机通用UI设计方法,解决了传统的上位机软件设计中存在因为设备不同,需要频繁更新上位机内部程序的问题。The purpose of the present invention is to provide a general UI design method for upper computer based on PLC, which solves the problem in the traditional upper computer software design that the internal program of the upper computer needs to be frequently updated because of different devices.

本发明所采用的技术方案是,一种基于PLC的上位机通用UI设计方法,具体步骤如下:The technical scheme adopted in the present invention is, a kind of general UI design method of upper computer based on PLC, concrete steps are as follows:

步骤1,首先设计PLC的上位机通用UI;Step 1, first design the general UI of the upper computer of the PLC;

步骤2,设计经步骤1得到的UI需加载的Excel表格内容;Step 2, design the content of the Excel table to be loaded by the UI obtained in step 1;

步骤3,激活PLC的上位机软件,加载需经步骤2设计的Excel表格内容,完成PLC的上位机内部变量存储值的更新。Step 3: activate the upper computer software of the PLC, load the contents of the Excel table that needs to be designed in step 2, and complete the update of the internal variable storage value of the upper computer of the PLC.

本发明的特点还在于:The present invention is also characterized in that:

其中步骤1中UI区域具体包括:The UI area in step 1 specifically includes:

设备名称显示区,用于显示当前操作的设备名称,所述名称显示区采用椭圆形静态文本;The device name display area is used to display the name of the currently operating device, and the name display area adopts oval static text;

设备切换区,用于显示和选择设备;Device switching area, used to display and select devices;

设备操作按钮显示区,用于显示当前设备的操作按钮布置;The device operation button display area is used to display the operation button layout of the current device;

其中步骤1中设备切换区的具体操作步骤包括:The specific operation steps in the device switching area in step 1 include:

首先在PLC的上位机通用UI上设定3个按钮对象显示3种可以操作的设备,PLC的上位机通用UI对每个按钮对象的文本进行标记,PLC的上位机通用UI运行后,单击对应按钮可以切换该设备操作模式;First, set 3 button objects on the general UI of the upper computer of the PLC to display 3 kinds of operable devices. The general UI of the upper computer of the PLC marks the text of each button object. After the general UI of the upper computer of the PLC is running, click The corresponding button can switch the operation mode of the device;

其中设备操作按钮显示区具体操作步骤包括:The specific operation steps in the device operation button display area include:

首先在PLC的上位机通用UI上采用4行3列的按钮,用对象1~对象12依次标记每个设备操作按钮,PLC的上位机通用UI运行后,单击设备切换区中的设备切换按钮的任何一个,可改变设备操作按钮连接的内部变量值,对象1~对象12显示的文本更新为对应设备下的操作文本;Firstly, buttons with 4 rows and 3 columns are used on the general UI of the upper computer of the PLC, and each device operation button is marked with objects 1 to 12 in turn. After the general UI of the upper computer of the PLC is running, click the device switching button in the device switching area Any one of them can change the internal variable value connected to the device operation button, and the text displayed in Object 1 to Object 12 will be updated to the operation text under the corresponding device;

其中步骤2中Excel表格内容的设计具体如下:The design of the content of the Excel table in step 2 is as follows:

首先设计12行5列的Excel表格,其中,第1列标题名称为行号,数值最大为12;First design an Excel table with 12 rows and 5 columns, where the title of the first column is the row number, and the maximum value is 12;

第2列标题名称为设备名称,每个设备对应唯一的名称表述,只有第二行有内容,为中文字符,后续行内容为空;The title name of the second column is the device name, and each device corresponds to a unique name expression. Only the second line has content, which is Chinese characters, and the content of the subsequent lines is empty;

第3列标题名称为按钮对象,从第1~12行数值依次为按钮对象1~按钮对象12;The title name of the third column is the button object, and the values from the 1st to the 12th row are button object 1 to button object 12 in turn;

第4列标题名称为按钮对象文本,从第2行开始内容依次为以中文字符来表示的设备具体操作命令的名称,指定的中文字符用于显示UI激活、触发运行后的UI对象的文本;The title name of the fourth column is the button object text, and the content from the second row is the name of the specific operation command of the device expressed in Chinese characters. The specified Chinese characters are used to display the text of the UI object after the UI is activated and triggered to run;

第5列标题名称为状态反馈,通过通讯网络,PLC上位机读取PLC程序的反馈指令,改变第3列对应UI按钮对象的属性,来显示对象操作命令的执行状态;The title of the fifth column is Status Feedback. Through the communication network, the PLC host computer reads the feedback command of the PLC program, and changes the attribute of the corresponding UI button object in the third column to display the execution status of the object operation command;

其中步骤3的具体操作步骤如下:The specific operation steps of step 3 are as follows:

步骤3.1,激活PLC上位机软件;Step 3.1, activate the PLC host computer software;

步骤3.2,PLC上位机软件经步骤3.1激活后,判断是否满足触发条件,若不满足触发条件,UI的初始界面上,设备名称显示区与设备操作按钮显示区为空;Step 3.2, after the PLC host computer software is activated in step 3.1, judge whether the trigger condition is met. If the trigger condition is not met, on the initial interface of the UI, the device name display area and the device operation button display area are empty;

若满足触发条件,PLC上位机软件开始读入为对应设备设计的Excel表格内容,PLC上位机软件将读入的Excel表格内容存入PLC上位机软件的程序内部变量中;If the trigger condition is met, the PLC host computer software starts to read in the Excel table content designed for the corresponding equipment, and the PLC host computer software stores the read Excel table content into the program internal variables of the PLC host computer software;

步骤3.3,经步骤3.2处理后,UI界面显示内部变量的存储值;Step 3.3, after processing in step 3.2, the UI interface displays the stored value of the internal variable;

步骤3.4,通过切换不同的设备按钮,触发PLC上位机软件的操作程序,UI对象文本更新连接内部变量值,对象1~对象12显示对应设备的文本,PLC上位机软件内部变量存储值更新及文本显示更新结束。Step 3.4, by switching different device buttons, trigger the operation program of the PLC host computer software, update the UI object text to connect the internal variable value, object 1 to object 12 display the text of the corresponding device, update the internal variable storage value and text of the PLC host computer software Indicates that the update is complete.

本发明的有益效果是The beneficial effect of the present invention is

本发明的一种基于PLC的上位机通用UI设计方法,面对差异化的设备控制需求,不需要改变上位机UI的内部程序,只需要根据设备控制需求的变化更新Excel表格的内容,上位机重新加载即可,不需要任何额外的编程,就能实现基于同一种UI界面的文本更新更新。这种方法充分利用了Excel对数据管理的便捷、清晰特性,让开发人员从编程中解脱出来,减小了出错的机会,显著提高了开发效率。A PLC-based universal UI design method for upper computer of the present invention, in the face of differentiated equipment control requirements, does not need to change the internal program of the upper computer UI, only needs to update the content of the Excel table according to changes in equipment control requirements, the upper computer Reloading is enough, without any additional programming, the text update based on the same UI interface can be realized. This method makes full use of Excel's convenient and clear features for data management, frees developers from programming, reduces the chance of errors, and significantly improves development efficiency.

附图说明Description of drawings

图1是本发明的一种基于PLC的上位机通用UI设计方法中通用UI界面结构图;Fig. 1 is a general UI interface structural diagram in a kind of PLC-based host computer general UI design method of the present invention;

图2是本发明的一种基于PLC的上位机通用UI设计方法中通用UI更新显示文本的原理图;Fig. 2 is a schematic diagram of general UI update display text in a kind of PLC-based host computer general UI design method of the present invention;

图3是本发明的一种基于PLC的上位机通用UI设计方法中以“泥浆泵”为例的本发明通用UI运行效果。Fig. 3 is a general UI operation effect of the present invention taking "mud pump" as an example in a PLC-based upper computer general UI design method of the present invention.

图中,1.设备名称显示区,2.设备切换区,3.设备操作按钮显示区。In the figure, 1. Device name display area, 2. Device switching area, 3. Device operation button display area.

具体实施方式Detailed ways

下面结合附图和具体实施方式对本发明进行详细说明。The present invention will be described in detail below in conjunction with the accompanying drawings and specific embodiments.

本发明提供一种基于PLC的上位机通用UI设计方法,具体步骤如下:The present invention provides a kind of general UI design method of upper computer based on PLC, and concrete steps are as follows:

步骤1,首先设计PLC的上位机通用UI,如图1所示,UI区域具体包括:Step 1, first design the common UI of the upper computer of the PLC, as shown in Figure 1, the UI area specifically includes:

设备名称显示区1,用于显示当前操作的设备名称,所述名称显示区采用椭圆形静态文本,静态文本的值就是当前选择的操作设备名称。;The device name display area 1 is used to display the name of the currently operating device. The name display area adopts elliptical static text, and the value of the static text is the name of the currently selected operating device. ;

设备切换区2,用于显示和选择设备,具体操作步骤包括:Device switching area 2, used to display and select devices, the specific operation steps include:

首先在PLC的上位机通用UI上设定3个按钮对象显示3种可以操作的设备,标题是可变的,PLC的上位机通用UI对每个按钮对象的文本进行标记,PLC的上位机通用UI运行后,单击对应按钮可以切换该设备操作模式,默认情况下,三个设备切换按钮的文本标记为设备名称1~设备名称3,通用UI运行后,单击对应按钮可以切换该设备操作模式下,同时该按钮的背景颜色属性发生变化,指示目前该设备已被选中;First, set 3 button objects on the general UI of the upper computer of the PLC to display 3 kinds of operable equipment. After the UI is running, click the corresponding button to switch the device operation mode. By default, the text labels of the three device switching buttons are device name 1 to device name 3. After the general UI is running, click the corresponding button to switch the device operation mode, the background color property of the button changes at the same time, indicating that the device is currently selected;

设备操作按钮显示区3,用于显示当前设备的操作按钮布置,设备操作按钮显示区3具体操作步骤包括:The device operation button display area 3 is used to display the operation button layout of the current device. The specific operation steps of the device operation button display area 3 include:

首先在PLC的上位机通用UI上采用4行3列的按钮,用对象1~对象12依次标记每个设备操作按钮,PLC的上位机通用UI运行后,单击设备切换区2中的设备切换按钮的任何一个,可改变设备操作按钮连接的内部变量值,对象1~对象12显示的文本更新为对应设备下的操作文本;Firstly, buttons with 4 rows and 3 columns are used on the common UI of the upper computer of the PLC, and each device operation button is marked with objects 1 to 12 in turn. After the general UI of the upper computer of the PLC is running, click the device switch in the device switching area 2 Any one of the buttons can change the internal variable value connected to the device operation button, and the text displayed by Object 1 to Object 12 is updated to the operation text under the corresponding device;

步骤2,设计经步骤1得到的UI需加载的Excel表格内容,首先设计12行5列的Excel表格,如表1所示,其中:Step 2, design the content of the Excel table to be loaded by the UI obtained in step 1, first design an Excel table with 12 rows and 5 columns, as shown in Table 1, where:

表1本发明技术方案所设计的Excel表格的内容Table 1 The content of the Excel form designed by the technical scheme of the present invention

第1列标题名称为行号,数值最大为12;The title name of the first column is the row number, and the maximum value is 12;

第2列标题名称为设备名称,每个设备对应唯一的名称表述,只有第二行有内容,为中文字符,后续行内容为空;The title name of the second column is the device name, and each device corresponds to a unique name expression. Only the second line has content, which is Chinese characters, and the content of the subsequent lines is empty;

第3列标题名称为按钮对象,从第1~12行数值依次为按钮对象1~按钮对象12;The title name of the third column is the button object, and the values from the 1st to the 12th row are button object 1 to button object 12 in turn;

第4列标题名称为按钮对象文本,从第2行开始内容依次为以中文字符来表示的设备具体操作命令的名称,指定的中文字符用于显示UI激活、触发运行后的UI对象的文本;The title name of the fourth column is the button object text, and the content from the second row is the name of the specific operation command of the device expressed in Chinese characters. The specified Chinese characters are used to display the text of the UI object after the UI is activated and triggered to run;

第5列标题名称为状态反馈,该内容为PLC上位机程序变量的一部分,通过通讯网络,PLC上位机读取PLC程序的反馈指令,改变第3列对应UI按钮对象的属性,来显示对象操作命令的执行状态,比如,该处UI对象的背景颜色为绿色,表示该设备正在运行;The title of the fifth column is Status Feedback, which is a part of the program variable of the PLC host computer. Through the communication network, the PLC host computer reads the feedback command of the PLC program and changes the attribute of the corresponding UI button object in the third column to display the object operation. The execution status of the command, for example, the background color of the UI object here is green, indicating that the device is running;

步骤3,激活PLC的上位机软件,加载需经步骤2设计的Excel表格内容,完成PLC的上位机内部变量存储值的更新,PLC上位机软件激活后,根据触发条件,加载不同设备的Excel表格,完成上位机内部变量存储值的更新,UI本身不需要做任何更改,如图2所示具体操作步骤如下:Step 3: Activate the PLC upper computer software, load the Excel table content that needs to be designed in step 2, and complete the update of the internal variable storage value of the PLC upper computer. After the PLC upper computer software is activated, load the Excel sheets of different devices according to the trigger conditions , to complete the update of the storage value of the internal variable of the host computer, and the UI itself does not need to be changed. As shown in Figure 2, the specific operation steps are as follows:

步骤3.1,激活PLC上位机软件;Step 3.1, activate the PLC host computer software;

步骤3.2,PLC上位机软件经步骤3.1激活后,判断是否满足触发条件,若不满足触发条件,UI的初始界面上,设备名称显示区1与设备操作按钮显示区3为空,即所有应显示文本的UI对象的文本此刻不显示;Step 3.2, after the PLC host computer software is activated in step 3.1, judge whether the trigger condition is met. If the trigger condition is not met, on the initial interface of the UI, the device name display area 1 and the device operation button display area 3 are empty, that is, all should be displayed The text of the text UI object is not displayed at the moment;

若满足触发条件,根据编程规则,PLC上位机的程序脚本被触发,PLC上位机软件开始读入为对应设备设计的Excel表格内容,PLC上位机软件将读入的Excel表格内容存入PLC上位机软件的程序内部变量中;If the trigger conditions are met, according to the programming rules, the program script of the PLC host computer is triggered, and the PLC host computer software starts to read the contents of the Excel table designed for the corresponding equipment, and the PLC host computer software stores the read Excel table content into the PLC host computer In the program internal variables of the software;

步骤3.3,经步骤3.2处理后,UI界面显示内部变量的存储值;Step 3.3, after processing in step 3.2, the UI interface displays the stored value of the internal variable;

步骤3.4,通过切换不同的设备按钮,触发PLC上位机软件的操作程序,UI对象文本更新连接内部变量值,对象1~对象12显示对应设备的文本,PLC上位机软件内部变量存储值更新及文本显示更新结束。Step 3.4, by switching different device buttons, trigger the operation program of the PLC host computer software, update the UI object text to connect the internal variable value, object 1 to object 12 display the text of the corresponding device, update the internal variable storage value and text of the PLC host computer software Indicates that the update is complete.

根据以上对本发明所采用技术方案的详细说明,列举实施例:According to the detailed description of the technical solution adopted in the present invention above, enumerate embodiment:

示例设备是“泥浆泵”,它的Excel表格设计如表2所示:The example equipment is "mud pump", and its Excel table design is shown in Table 2:

表2泥浆泵设备所设计的Excel表格的内容Table 2 Contents of the Excel table designed for mud pump equipment

“泥浆泵”设备的Excel表格设计特点如下:The Excel table design features of the "mud pump" equipment are as follows:

(1)第1列的行号为12;(1) The row number of the first column is 12;

(2)第2列设备名称为“泥浆泵”,后续列内容为空;(2) The name of the equipment in the second column is "mud pump", and the contents of the subsequent columns are empty;

(3)第3列“按钮和和手柄对象”的内容依次为对象1~对象12;(3) The contents of the third column "button and handle objects" are object 1 to object 12 in sequence;

(4)第4列的“按钮和手柄对象文本”根据设备控制需求,布置目标行内容,某些情况下,该UI对象由于长宽限制,单行不能完全显示字体,需要分行,那么就在文本字符串中加入“\r”(计算机语言的分行符),如第2行的“泵停止\r恢复”;(4) The "button and handle object text" in the fourth column arranges the content of the target line according to the device control requirements. In some cases, due to the length and width restrictions of the UI object, a single line cannot fully display the font and needs to be divided into lines, so in the text Add "\r" (line break in computer language) to the string, such as "pump stop\r resume" in line 2;

(5)第5列“状态反馈”,根据控制需求,利用PLC的反馈指令来改变有状态显示需求的对象属性;但不是所有的操作命令都需要反馈。如第5列PLC接收操作指令到之后,如果命令正常执行,PLC将命令执行的状态“Pump1Start_STA”反馈给上位机,上位机利用该状态反馈指令改变对象5的属性,如背景颜色变绿。(5) The fifth column "status feedback", according to the control requirements, use the PLC feedback command to change the object attributes with status display requirements; but not all operation commands require feedback. For example, after the PLC in column 5 receives the operation command, if the command is executed normally, the PLC will feed back the status of command execution "Pump1Start_STA" to the host computer, and the host computer uses the status feedback command to change the attribute of object 5, such as the background color turns green.

设备的Excel表格设计完成后,需要上位机进行加载,PLC上位机软件激活后,根据触发条件,加载“泥浆泵”设备的Excel表格,通用UI的运行效果如图3所示,其中,After the design of the Excel form of the equipment is completed, the host computer needs to be loaded. After the software of the PLC host computer is activated, the Excel form of the "mud pump" equipment is loaded according to the trigger conditions. The operation effect of the general UI is shown in Figure 3. Among them,

设备名称显示区1,静态文本显示为“泥浆泵”;Equipment name display area 1, the static text is displayed as "mud pump";

设备切换区2,三个设备名称切换按钮中,设备名称1的UI文本显示“泥浆泵”、设备名称2的UI文本显示“猫道”,设备名称3的UI文本显示为空,因为当前选择的是“泥浆泵”,该按钮的表面根据PLC的反馈增加黑色框显示,以此和其他按钮进行区别。In equipment switching area 2, among the three equipment name switching buttons, the UI text of equipment name 1 displays "mud pump", the UI text of equipment name 2 displays "cat road", and the UI text of equipment name 3 displays empty, because the current selection The most important is "mud pump". The surface of this button is displayed in a black frame according to the feedback from the PLC, so as to distinguish it from other buttons.

设备操作按钮区3,对象1~对象12的UI文本依次显示表2第4列的内容,文本显示后,就可以操作外部按钮发送操作命令,比如单击对应“1号泵启动”的外部按钮,PLC接收到操作指令后,根据程序反馈给上位机状态显示指令“Pump1Start_STA”,该按钮的表面增加了黑色矩形框,背景颜色属性为绿,和其他按钮进行区别。In equipment operation button area 3, the UI text of objects 1 to 12 displays the contents of column 4 in Table 2 in sequence. After the text is displayed, you can operate the external button to send an operation command, such as clicking the external button corresponding to "No. 1 pump start" After the PLC receives the operation command, it will feed back the status display command "Pump1Start_STA" to the host computer according to the program. The surface of the button is added with a black rectangular frame, and the background color attribute is green to distinguish it from other buttons.

本发明的技术方案采用内部变量与UI的属性连接,通过内部变量的纽带作用,将外围PLC程序变量和对象UI属性间接连接,后续只需要根据设备的不同,更新内部变量的存储值,而本发明技术方案所采用的根据触发条件,上位机加载不同设备的Excel,将Excel内容存入内部变量,就是更新了内部变量的存储值。The technical solution of the present invention adopts the connection between the internal variable and the attribute of the UI, and indirectly connects the peripheral PLC program variable and the object UI attribute through the bond function of the internal variable, and then only needs to update the stored value of the internal variable according to the difference of the equipment, and this According to the trigger conditions adopted in the technical solution of the invention, the upper computer loads Excel of different devices, and stores the content of Excel into the internal variable, which is to update the stored value of the internal variable.

Claims (6)

1. a kind of general UI design method of host computer based on PLC, which is characterized in that specific step is as follows:
Step 1, the general UI of host computer of PLC is designed first;
Step 2, the Excel table content that the UI that design is obtained through step 1 need to be loaded;
Step 3, the upper computer software of PLC is activated, load need to complete the upper of PLC through the Excel table content that step 2 designs The update of machine built-in variable storage value.
2. the general UI design method of a kind of host computer based on PLC according to claim 1, which is characterized in that the step The region UI specifically includes in rapid 1:
Device name viewing area (1), for showing the device name of current operation, the title viewing area is static using ellipse Text;
Equipment switch area (2), for showing and selecting equipment;
Equipment operation button viewing area (3), for showing that the operation button of current device is arranged.
3. the general UI design method of a kind of host computer based on PLC according to claim 2, which is characterized in that the step The concrete operation step of equipment switch area (2) includes: in rapid 1
3 button objects are set first on the general UI of the host computer of PLC shows 3 kinds of manipulable equipment, the host computer of PLC The text of each button object is marked in general UI, and after the general UI operation of the host computer of PLC, clicking corresponding button can be cut Change the equipment operation mode.
4. the general UI design method of a kind of host computer based on PLC according to claim 2, which is characterized in that described to set Include: for operation button viewing area (3) concrete operation step
Using the button of 4 rows 3 column first on the general UI of the host computer of PLC, each equipment is successively marked with 1~object of object 12 Operation button clicks any one of the equipment switching push button in equipment switch area (2) after the general UI operation of the host computer of PLC, The built-in variable value of changeable equipment operation button connection, the text that 1~object of object 12 is shown are updated under corresponding equipment Operate text.
5. the general UI design method of a kind of host computer based on PLC according to claim 2, which is characterized in that the step The design of Excel table content is specific as follows in rapid 2:
The Excel table of 12 rows 5 column is designed first, wherein the 1st entitled line number of column heading, numerical value are up to 12;
The 2nd entitled device name of column heading, each equipment correspond to the statement of unique title, only the second row has content, are Chinese character, subsequent rows content are sky;
The 3rd entitled button object of column heading is followed successively by 1~button object of button object 12 from the 1st~12 line number value;
The entitled button object text of 4th column heading, content, which is followed successively by, since the 2nd row has with Chinese character come the equipment indicated The title of body operational order, the text that specified Chinese character is used to show UI activation, triggers postrun UI object;
The entitled state feedback of 5th column heading, by communication network, PLC host computer reads the feedback command of PLC program, changes 3rd arranges the attribute of corresponding UI button object, to show the execution state of Object Operations order.
6. the general UI design method of a kind of host computer based on PLC according to claim 2, which is characterized in that the step Rapid 3 specific steps are as follows:
Step 3.1, PLC upper computer software is activated;
Step 3.2, PLC upper computer software judges whether to meet trigger condition after step 3.1 activation, if being unsatisfactory for triggering item Part, in the initial interface of UI, device name viewing area (1) and equipment operation button viewing area (3) are sky;
If meeting trigger condition, PLC upper computer software starts to read in the Excel table content for corresponding equipment design, and PLC is upper Machine software will be in the program built-in variable of the Excel table content deposit PLC upper computer software of reading;
Step 3.3, after step 3.2 processing, the storage value of UI interface display built-in variable;
Step 3.4, by switching different device buttons, the operation sequence of PLC upper computer software is triggered, UI object text updates Built-in variable value is connected, 1~object of object 12 shows the text of corresponding equipment, and PLC upper computer software built-in variable storage value is more The display of new and text, which updates, to be terminated.
CN201910511089.0A 2019-06-13 2019-06-13 A general UI design method for upper computer based on PLC Active CN110333861B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910511089.0A CN110333861B (en) 2019-06-13 2019-06-13 A general UI design method for upper computer based on PLC

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910511089.0A CN110333861B (en) 2019-06-13 2019-06-13 A general UI design method for upper computer based on PLC

Publications (2)

Publication Number Publication Date
CN110333861A true CN110333861A (en) 2019-10-15
CN110333861B CN110333861B (en) 2023-06-27

Family

ID=68141103

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910511089.0A Active CN110333861B (en) 2019-06-13 2019-06-13 A general UI design method for upper computer based on PLC

Country Status (1)

Country Link
CN (1) CN110333861B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111596607A (en) * 2020-04-14 2020-08-28 宝鸡石油机械有限责任公司 Upper computer general HMI interface design method capable of configuring text and operation command
CN112286135A (en) * 2020-11-13 2021-01-29 航天晨光股份有限公司 Program real-time adjustment method of PLC controller of aircraft refueling truck
CN112764748A (en) * 2020-11-16 2021-05-07 中油国家油气钻井装备工程技术研究中心有限公司 Upper computer UI design method capable of automatically updating display and storage parameters
CN113268042A (en) * 2021-05-13 2021-08-17 矿冶科技集团有限公司 Upper computer program processing method and device and electronic equipment
CN115858074A (en) * 2022-12-20 2023-03-28 中国铁建高新装备股份有限公司 Self-adaptive display method, device and system for multi-upper-computer default graphic user interface

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020070978A1 (en) * 2000-07-13 2002-06-13 Clayton Wishoff Dynamically configurable graphical user environment
CN1862488A (en) * 2006-06-09 2006-11-15 上海科泰世纪科技有限公司 Method of dynamic binding displaying of control element and multi-language text in computer system
CN104731584A (en) * 2015-02-26 2015-06-24 武汉爱科唯自动化科技有限公司 Human-machine interface customizable configuration design method for open type numerical control system
CN105786578A (en) * 2016-03-24 2016-07-20 北京友信宏科电子科技有限公司 Parameter configuration system and method
CN106250128A (en) * 2016-07-26 2016-12-21 网易(杭州)网络有限公司 The display processing method of user interface and device
CN108279932A (en) * 2018-01-22 2018-07-13 北京奇艺世纪科技有限公司 A kind of mobile terminal dynamic configuration user interface method and device
CN109189539A (en) * 2018-09-03 2019-01-11 深圳市东微智能科技股份有限公司 Update method, terminal and the computer readable storage medium at interface

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020070978A1 (en) * 2000-07-13 2002-06-13 Clayton Wishoff Dynamically configurable graphical user environment
CN1862488A (en) * 2006-06-09 2006-11-15 上海科泰世纪科技有限公司 Method of dynamic binding displaying of control element and multi-language text in computer system
CN104731584A (en) * 2015-02-26 2015-06-24 武汉爱科唯自动化科技有限公司 Human-machine interface customizable configuration design method for open type numerical control system
CN105786578A (en) * 2016-03-24 2016-07-20 北京友信宏科电子科技有限公司 Parameter configuration system and method
CN106250128A (en) * 2016-07-26 2016-12-21 网易(杭州)网络有限公司 The display processing method of user interface and device
CN108279932A (en) * 2018-01-22 2018-07-13 北京奇艺世纪科技有限公司 A kind of mobile terminal dynamic configuration user interface method and device
CN109189539A (en) * 2018-09-03 2019-01-11 深圳市东微智能科技股份有限公司 Update method, terminal and the computer readable storage medium at interface

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KERRY SHIH-PING CHANG ET AL.: "Creating interactive web data applications with spreadsheets", 《UIST "14: PROCEEDINGS OF THE 27TH ANNUAL ACM SYMPOSIUM ON USER INTERFACE SOFTWARE AND TECHNOLOGY》 *
陈学军 等: "基于840D的数控磨齿机二次界面的开发", 《制造业自动化》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111596607A (en) * 2020-04-14 2020-08-28 宝鸡石油机械有限责任公司 Upper computer general HMI interface design method capable of configuring text and operation command
CN111596607B (en) * 2020-04-14 2021-07-13 宝鸡石油机械有限责任公司 A general HMI interface design method for host computer with configurable text and operation commands
CN112286135A (en) * 2020-11-13 2021-01-29 航天晨光股份有限公司 Program real-time adjustment method of PLC controller of aircraft refueling truck
CN112764748A (en) * 2020-11-16 2021-05-07 中油国家油气钻井装备工程技术研究中心有限公司 Upper computer UI design method capable of automatically updating display and storage parameters
CN113268042A (en) * 2021-05-13 2021-08-17 矿冶科技集团有限公司 Upper computer program processing method and device and electronic equipment
CN115858074A (en) * 2022-12-20 2023-03-28 中国铁建高新装备股份有限公司 Self-adaptive display method, device and system for multi-upper-computer default graphic user interface

Also Published As

Publication number Publication date
CN110333861B (en) 2023-06-27

Similar Documents

Publication Publication Date Title
CN110333861B (en) A general UI design method for upper computer based on PLC
US5416895A (en) System and methods for improved spreadsheet interface with user-familiar objects
US9910641B2 (en) Generation of application behaviors
CN203366247U (en) Multifunctional mouse with reused keys
CN103577191B (en) Configurable instrument menu system
CN110764754A (en) A free programming method for manipulator motion controller
US20040130564A1 (en) Software tool for providing a demonstration screen
CN111596607B (en) A general HMI interface design method for host computer with configurable text and operation commands
CN111273896A (en) Class attribute value dynamic replacement method, device and equipment based on Java reflection mechanism
Petroutsos Mastering Microsoft visual basic 2008
CN110427185A (en) A method of man-machine browser function is realized based on electric power scripting language
CN103337050A (en) A climate diagnosis and value simulation integration analysis system
JP2003044108A (en) Editor registration device, registration program, and recording medium recording the same
CN101685396A (en) System and method for controlling function icon
CN114527969B (en) Method for converting list cell into drop-down list form input
US20190265874A1 (en) Panel control system and editing method thereof
KR20050057822A (en) Method for realization gui using xml
CN112764748A (en) Upper computer UI design method capable of automatically updating display and storage parameters
WO2004066116A2 (en) Method for modifying groups of data fields in a web environment
JP7637183B2 (en) DISPLAY CONTROL SYSTEM, DISPLAY CONTROL METHOD, AND PROGRAM
CN103399733A (en) Method for achieving creation, deletion, updating and retrieve functions of drop-down box and textbox
JP5718542B2 (en) Information processing apparatus and file management method
JP2008021155A (en) Screen creation method and picture creation device
CN115455919A (en) Summary processing method, device, electronic device and storage medium of data sheet
CN120144111A (en) Method and system for defining microcontroller process in a non-coding flowchart manner

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
TA01 Transfer of patent application right

Effective date of registration: 20200929

Address after: Baoji City, Shaanxi Province, 721002 Dongfeng Road, Jintai District No. 2

Applicant after: BAOJI OILFIELD MACHINERY Co.,Ltd.

Applicant after: CHINA NATIONAL PETROLEUM Corp.

Applicant after: CNPC national oil and gas drilling equipment Engineering Technology Research Center Co.,Ltd.

Address before: Baoji City, Shaanxi Province, 721002 Dongfeng Road, Jintai District No. 2

Applicant before: Baoji Oilfield Machinery Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant