HMI flow chart generation method and device, storage medium and electronic equipment

文档序号:856565 发布日期:2021-04-02 浏览:20次 中文

阅读说明:本技术 Hmi流程图的生成方法及装置、存储介质及电子设备 (HMI flow chart generation method and device, storage medium and electronic equipment ) 是由 高平 杨鲁江 陆敏 于 2020-12-22 设计创作,主要内容包括:本发明提供一种HMI流程图的生成方法及装置、存储介质及电子设备,对于获取的每个画面配置信息,依据其中包含的每个设备的图元信息,及每个设备对应的各个测点位号,在标准图元库中确定每个设备对应的标准图元,及各个测点位号与标准图元的各个控制位号的对应关系,据各设备的图元信息在图纸上的相应位置对应生成各个标准图元,并以每个设备对应的每个测点位号对其对应的控制位号进行配置,当图纸上生成该画面配置信息中每个设备对应的标准图元,且完成控制位号的配置后,生成该画面配置信息对应的HMI流程图,以得到每个画面配置信息对应的HMI流程图。应用本发明的方法,无需由人工进行HMI流程图的制作,生成HMI流程图的效率较高。(The invention provides a method and a device for generating an HMI (human machine interface) flow chart, a storage medium and electronic equipment, wherein for each acquired picture configuration information, a standard primitive corresponding to each equipment and a corresponding relation between each measuring point bit number and each control bit number of the standard primitive are determined in a standard primitive library according to the primitive information of each equipment and each measuring point bit number corresponding to each equipment, each standard primitive is correspondingly generated according to the corresponding position of the primitive information of each equipment on a drawing, the control bit number corresponding to each equipment is configured according to each measuring point bit number corresponding to each equipment, when the standard primitive corresponding to each equipment in the picture configuration information is generated on the drawing, and the HMI flow chart corresponding to the picture configuration information is generated after the configuration of the control bit number is completed, so as to obtain the HMI flow chart corresponding to each picture configuration information. By applying the method of the invention, the HMI flow chart does not need to be manufactured manually, and the efficiency of generating the HMI flow chart is higher.)

1. A method for generating an HMI flow chart, comprising:

when a trigger instruction sent by a user is received, acquiring the determined configuration information of each picture;

sequentially generating an HMI (human machine interface) flow chart corresponding to each piece of screen configuration information, and ending the generation process of the HMI flow chart until all the HMI flow charts corresponding to the pieces of screen configuration information are generated;

the generation process of the HMI flow chart corresponding to each piece of screen configuration information comprises the following steps:

determining the primitive information of each device contained in the current picture configuration information and the position number of each measuring point corresponding to each device;

according to the primitive information of each device, determining a standard primitive corresponding to each device in a pre-constructed standard primitive library, and determining the one-to-one correspondence of each measuring point bit number corresponding to each device and each control bit number of the standard primitive corresponding to the measuring point bit number;

generating a standard primitive corresponding to each device on a drawing corresponding to the current picture configuration information according to a primitive display position in the primitive information of each device;

aiming at each control bit number of each standard primitive in the drawing, configuring the control bit number by using a measuring point bit number corresponding to the control bit number;

and when the standard primitives corresponding to all the equipment are generated on the drawing, and the control bit number of each standard primitive completes configuration by the corresponding measuring point bit number, generating an HMI (human machine interface) flow chart corresponding to the current picture configuration information based on the drawing.

2. The method according to claim 1, wherein the determining of the respective picture configuration information comprises:

acquiring a measuring point and an equipment list of a preset control system;

extracting information of the measuring points and the equipment list according to a preset information identification strategy to obtain a plurality of pieces of equipment corresponding to the measuring points and the equipment list and measuring point position numbers corresponding to each piece of equipment;

determining a standard primitive model corresponding to each device and a first placeholder corresponding to each measuring point bit number corresponding to each device according to preset association information of the devices and the standard primitives;

determining picture information and a primitive display position corresponding to each device according to preset picture planning information;

determining the standard primitive model and the primitive display position corresponding to each device as primitive information corresponding to the device;

determining each measuring point position number corresponding to the equipment and a first placeholder corresponding to each measuring point position number as measuring point position number information corresponding to the equipment;

determining each device corresponding to each picture according to the picture information corresponding to each device;

and determining the primitive information and the measuring point bit number information corresponding to each device corresponding to each picture as picture configuration information.

3. The method according to claim 2, wherein each control bit number of each standard primitive in the standard primitive library is configured in advance with a second placeholder corresponding to the control bit number, and the step of determining a one-to-one correspondence relationship between each measurement point bit number corresponding to each device and each control bit number of the corresponding standard primitive comprises:

determining a first placeholder corresponding to each measuring point bit number corresponding to each device;

determining a second placeholder correspondingly configured to each control bit number of the standard primitive corresponding to each device;

comparing a first placeholder corresponding to each measuring point bit number corresponding to each device with a second placeholder configured corresponding to each control bit number of a standard graphic element corresponding to the device, determining a second placeholder identical to the first placeholder corresponding to the measuring point bit number as a target placeholder, and determining a control bit number corresponding to the target placeholder as a control bit number corresponding to the measuring point bit number.

4. The method according to claim 3, wherein the process of configuring, for each control bit number of each standard primitive in the drawing, the control bit number with the measurement point bit number corresponding to the control bit number comprises:

in the configuration information of each standard primitive, searching and replacing operations corresponding to each measuring point bit number are carried out, so that a second placeholder correspondingly configured to each control bit number of each standard primitive is replaced with the measuring point bit number corresponding to the control bit number;

and the search object of the search replacement operation corresponding to each measuring point bit number is a first placeholder corresponding to the measuring point bit number, and the replacement object is the measuring point bit number.

5. The method according to claim 1, wherein the determining, in a pre-constructed standard primitive library, a standard primitive corresponding to each device according to the primitive information of each device includes:

determining the standard primitive model in the primitive information of each device as the standard primitive model corresponding to the device;

determining the primitive model of each standard primitive in the standard primitive library;

and comparing the standard primitive model corresponding to each device with the primitive model of each standard primitive in the standard primitive library, and determining the standard primitive with the same primitive model as the standard primitive model corresponding to the device as the standard primitive corresponding to the device.

6. The method as claimed in claim 1, wherein the step of configuring the control position number with the measurement point position number corresponding to the control position number for each control position number of each standard primitive in the drawing further comprises:

judging whether the configuration information of each control bit number of each standard primitive in the drawing is a null value or not, and determining the control bit number of which the configuration information is the null value as a target control bit number;

generating a user-defined measuring point bit number corresponding to the target control bit number according to a preset naming rule;

and configuring the target control bit number by using the user-defined measuring point bit number corresponding to the target control bit number, and storing the user-defined measuring point bit number corresponding to the target control bit number into a preset user-defined variable file.

7. The method of claim 1, wherein generating the HMI flow diagram corresponding to the current screen configuration information based on the drawing comprises:

executing storage operation on the drawing to obtain an HMI flow chart corresponding to the drawing, wherein the HMI flow chart is stored in a preset binary file format;

and determining the HMI flow chart corresponding to the drawing as the HMI flow chart corresponding to the current screen configuration information.

8. An apparatus for generating an HMI flowchart, comprising:

the first acquisition unit is used for acquiring the determined configuration information of each picture when a trigger instruction sent by a user is received;

the generating unit is used for generating an HMI (human machine interface) flow chart corresponding to each piece of screen configuration information in sequence, and ending the generation process of the HMI flow chart until all the HMI flow charts corresponding to the pieces of screen configuration information are generated;

wherein the generating unit includes:

the first determining subunit is used for determining the primitive information of each device contained in the current picture configuration information and the position number of each measuring point corresponding to each device;

the second determining subunit is used for determining a standard primitive corresponding to each device in a pre-constructed standard primitive library according to the primitive information of each device, and determining the one-to-one correspondence relationship between each measuring point bit number corresponding to each device and each control bit number of the standard primitive corresponding to the measuring point bit number;

the first generating subunit is configured to generate a standard primitive corresponding to each device on a drawing corresponding to current picture configuration information according to a primitive display position in the primitive information of each device;

the configuration subunit is used for configuring the control bit number by using the measurement point bit number corresponding to the control bit number for each control bit number of each standard primitive in the drawing;

and the second generation subunit is used for generating an HMI flow chart corresponding to the current picture configuration information based on the drawing when the standard primitives corresponding to all the equipment are generated on the drawing and the control bit number of each standard primitive completes configuration by the corresponding measuring point bit number.

9. A storage medium, characterized in that the storage medium comprises stored instructions, wherein the instructions, when executed, control a device on which the storage medium is located to perform a method of generating an HMI flowchart according to any of claims 1 to 7.

10. An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform a method of generating an HMI flowchart according to any of claims 1-7.

Technical Field

The invention relates to the technical field of industrial control, in particular to a method and a device for generating an HMI flow chart, a storage medium and electronic equipment.

Background

In an industrial control process, various data, states or operation buttons and the like of various field devices to be controlled in the operation process are generally required to be displayed in a Human Machine Interface (HMI) of a control device.

The interface displayed by the man-machine interaction interface in the display process is a dynamic flow chart which is usually pre-manufactured by corresponding software, the chart generally comprises various field devices, primitives corresponding to objects such as measurement signal points and the like, and the display state of the primitives can be dynamically updated by the primitives in the chart according to actually sampled data in the operation process through configuration. Such dynamic flow charts are also known in the engineering control art as HMI flow charts.

Currently, the HMI flowchart is usually drawn and configured manually by a worker according to the control system data and the screen planning. As control systems become more complex, multiple HMI flowcharts are often created, and the amount of content to be drawn and configured in each HMI flowchart increases. Therefore, in the conventional mode of manually drawing and configuring the HMI flow chart, a large amount of time is consumed in the process of generating the HMI flow chart, and the efficiency of generating the HMI flow chart is low.

Disclosure of Invention

In view of this, the embodiment of the present invention provides a method for generating an HMI flowchart, so as to solve the problems that a lot of time is consumed in the process of generating an HMI flowchart, and the efficiency of generating an HMI flowchart is low.

The embodiment of the invention also provides a device for generating the HMI flow chart, which is used for ensuring the actual realization and application of the method.

In order to achieve the above purpose, the embodiments of the present invention provide the following technical solutions:

a method for generating an HMI flow chart comprises the following steps:

when a trigger instruction sent by a user is received, acquiring the determined configuration information of each picture;

sequentially generating an HMI (human machine interface) flow chart corresponding to each piece of screen configuration information, and ending the generation process of the HMI flow chart until all the HMI flow charts corresponding to the pieces of screen configuration information are generated;

the generation process of the HMI flow chart corresponding to each piece of screen configuration information comprises the following steps:

determining the primitive information of each device contained in the current picture configuration information and the position number of each measuring point corresponding to each device;

according to the primitive information of each device, determining a standard primitive corresponding to each device in a pre-constructed standard primitive library, and determining the one-to-one correspondence of each measuring point bit number corresponding to each device and each control bit number of the standard primitive corresponding to the measuring point bit number;

generating a standard primitive corresponding to each device on a drawing corresponding to the current picture configuration information according to a primitive display position in the primitive information of each device;

aiming at each control bit number of each standard primitive in the drawing, configuring the control bit number by using a measuring point bit number corresponding to the control bit number;

and when the standard primitives corresponding to all the equipment are generated on the drawing, and the control bit number of each standard primitive completes configuration by the corresponding measuring point bit number, generating an HMI (human machine interface) flow chart corresponding to the current picture configuration information based on the drawing.

Optionally, the method described above, where the determining process of each piece of screen configuration information includes:

acquiring a measuring point and an equipment list of a preset control system;

extracting information of the measuring points and the equipment list according to a preset information identification strategy to obtain a plurality of pieces of equipment corresponding to the measuring points and the equipment list and measuring point position numbers corresponding to each piece of equipment;

determining a standard primitive model corresponding to each device and a first placeholder corresponding to each measuring point bit number corresponding to each device according to preset association information of the devices and the standard primitives;

determining picture information and a primitive display position corresponding to each device according to preset picture planning information;

determining the standard primitive model and the primitive display position corresponding to each device as primitive information corresponding to the device;

determining each measuring point position number corresponding to the equipment and a first placeholder corresponding to each measuring point position number as measuring point position number information corresponding to the equipment;

determining each device corresponding to each picture according to the picture information corresponding to each device;

and determining the primitive information and the measuring point bit number information corresponding to each device corresponding to each picture as picture configuration information.

Optionally, the above method, where each control bit number of each standard primitive in the standard primitive library is configured in advance by a second placeholder corresponding to the control bit number, and the process of determining a one-to-one correspondence relationship between each measurement point bit number corresponding to each device and each control bit number of the corresponding standard primitive includes:

determining a first placeholder corresponding to each measuring point bit number corresponding to each device;

determining a second placeholder correspondingly configured to each control bit number of the standard primitive corresponding to each device;

comparing a first placeholder corresponding to each measuring point bit number corresponding to each device with a second placeholder configured corresponding to each control bit number of a standard graphic element corresponding to the device, determining a second placeholder identical to the first placeholder corresponding to the measuring point bit number as a target placeholder, and determining a control bit number corresponding to the target placeholder as a control bit number corresponding to the measuring point bit number.

Optionally, in the method, the configuring, for each control bit number of each standard primitive in the drawing, the measurement point bit number corresponding to the control bit number for the control bit number includes:

in the configuration information of each standard primitive, searching and replacing operations corresponding to each measuring point bit number are carried out, so that a second placeholder correspondingly configured to each control bit number of each standard primitive is replaced with the measuring point bit number corresponding to the control bit number;

and the search object of the search replacement operation corresponding to each measuring point bit number is a first placeholder corresponding to the measuring point bit number, and the replacement object is the measuring point bit number.

Optionally, the determining, according to the primitive information of each device, a standard primitive corresponding to each device in a pre-constructed standard primitive library includes:

determining the standard primitive model in the primitive information of each device as the standard primitive model corresponding to the device;

determining the primitive model of each standard primitive in the standard primitive library;

and comparing the standard primitive model corresponding to each device with the primitive model of each standard primitive in the standard primitive library, and determining the standard primitive with the same primitive model as the standard primitive model corresponding to the device as the standard primitive corresponding to the device.

Optionally, in the method, after configuring, for each control position number of each standard primitive in the drawing, the control position number by using the measurement point position number corresponding to the control position number, the method further includes:

judging whether the configuration information of each control bit number of each standard primitive in the drawing is a null value or not, and determining the control bit number of which the configuration information is the null value as a target control bit number;

generating a user-defined measuring point bit number corresponding to the target control bit number according to a preset naming rule;

and configuring the target control bit number by using the user-defined measuring point bit number corresponding to the target control bit number, and storing the user-defined measuring point bit number corresponding to the target control bit number into a preset user-defined variable file.

Optionally, in the method, the generating an HMI flowchart corresponding to the current screen configuration information based on the drawing includes:

executing storage operation on the drawing to obtain an HMI flow chart corresponding to the drawing, wherein the HMI flow chart is stored in a preset binary file format;

and determining the HMI flow chart corresponding to the drawing as the HMI flow chart corresponding to the current screen configuration information.

An apparatus for generating an HMI flow chart, comprising:

the first acquisition unit is used for acquiring the determined configuration information of each picture when a trigger instruction sent by a user is received;

the generating unit is used for generating an HMI (human machine interface) flow chart corresponding to each piece of screen configuration information in sequence, and ending the generation process of the HMI flow chart until all the HMI flow charts corresponding to the pieces of screen configuration information are generated;

wherein the generating unit includes:

the first determining subunit is used for determining the primitive information of each device contained in the current picture configuration information and the position number of each measuring point corresponding to each device;

the second determining subunit is used for determining a standard primitive corresponding to each device in a pre-constructed standard primitive library according to the primitive information of each device, and determining the one-to-one correspondence relationship between each measuring point bit number corresponding to each device and each control bit number of the standard primitive corresponding to the measuring point bit number;

the first generating subunit is configured to generate a standard primitive corresponding to each device on a drawing corresponding to current picture configuration information according to a primitive display position in the primitive information of each device;

the configuration subunit is used for configuring the control bit number by using the measurement point bit number corresponding to the control bit number for each control bit number of each standard primitive in the drawing;

and the second generation subunit is used for generating an HMI flow chart corresponding to the current picture configuration information based on the drawing when the standard primitives corresponding to all the equipment are generated on the drawing and the control bit number of each standard primitive completes configuration by the corresponding measuring point bit number.

The above apparatus, optionally, further comprises:

the second acquisition unit is used for acquiring a preset measuring point of the control system and an equipment list;

the extracting unit is used for extracting information of the measuring points and the equipment list according to a preset information identification strategy to obtain a plurality of pieces of equipment corresponding to the measuring points and the equipment list and measuring point position numbers corresponding to each piece of equipment;

the device comprises a first determining unit, a second determining unit and a judging unit, wherein the first determining unit is used for determining a standard graphic primitive model corresponding to each device and a first placeholder corresponding to each measuring point bit number corresponding to each device according to preset association information of the devices and the standard graphic primitives;

the second determining unit is used for determining picture information and a graphic element display position corresponding to each device according to preset picture planning information;

the third determining unit is used for determining the standard primitive model and the primitive display position corresponding to each device as primitive information corresponding to the device;

a fourth determining unit, configured to determine, as the measurement point bit number information corresponding to the device, each measurement point bit number corresponding to the device and the first placeholder corresponding to each measurement point bit number;

a fifth determining unit, configured to determine, according to picture information corresponding to each device, each device corresponding to each picture;

and the sixth determining unit is used for determining the primitive information and the measuring point bit number information corresponding to each device corresponding to each picture as picture configuration information.

Optionally, in the apparatus described above, each control bit number of each standard primitive in the standard primitive library is configured in advance by a second placeholder corresponding to the control bit number, where the second determining subunit includes:

the third determining subunit is used for determining a first placeholder corresponding to each measuring point bit number corresponding to each device;

a fourth determining subunit, configured to determine a second placeholder correspondingly configured to each control bit number of the standard primitive corresponding to each device;

and a fifth determining subunit, configured to compare a first placeholder corresponding to each measurement point bit number corresponding to each device with a second placeholder configured to correspond to each control bit number of a standard primitive corresponding to the device, determine a second placeholder identical to the first placeholder corresponding to the measurement point bit number as a target placeholder, and determine a control bit number corresponding to the target placeholder as a control bit number corresponding to the measurement point bit number.

The above apparatus, optionally, the configuration subunit includes:

the replacing subunit is used for performing searching and replacing operation corresponding to each measuring point bit number in the configuration information of each standard primitive so as to replace a second placeholder correspondingly configured to each control bit number of each standard primitive with the measuring point bit number corresponding to the control bit number;

and the search object of the search replacement operation corresponding to each measuring point bit number is a first placeholder corresponding to the measuring point bit number, and the replacement object is the measuring point bit number.

The above apparatus, optionally, the second determining subunit includes:

a sixth determining subunit, configured to determine, as a standard primitive model corresponding to the device, a standard primitive model in the primitive information of each device;

a seventh determining subunit, configured to determine a primitive model of each standard primitive in the standard primitive library;

and the eighth determining subunit is configured to compare the standard primitive model corresponding to each piece of equipment with the primitive model of each standard primitive in the standard primitive library, and determine a standard primitive with the same primitive model as the standard primitive model corresponding to the piece of equipment as the standard primitive corresponding to the piece of equipment.

The above apparatus, optionally, further comprises:

the judging unit is used for judging whether the configuration information of each control bit number of each standard primitive in the drawing is a null value or not, and determining the control bit number of which the configuration information is the null value as a target control bit number;

the naming unit is used for generating a self-defined measuring point bit number corresponding to the target control bit number according to a preset naming rule;

and the configuration unit is used for configuring the target control bit number by using the user-defined measuring point bit number corresponding to the target control bit number and storing the user-defined measuring point bit number corresponding to the target control bit number into a preset user-defined variable file.

The above apparatus, optionally, the second generating subunit includes:

the storage subunit is used for executing storage operation on the drawing to obtain an HMI (human machine interface) flow chart corresponding to the drawing, and the HMI flow chart is stored in a preset binary file format;

and the ninth determining subunit is configured to determine the HMI flowchart corresponding to the drawing as the HMI flowchart corresponding to the current screen configuration information.

A storage medium, the storage medium comprising stored instructions, wherein the instructions, when executed, control a device on which the storage medium is located to perform the above-mentioned method for generating an HMI flowchart.

An electronic device comprising a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by the one or more processors to perform the above-described method of generating an HMI flowchart.

Based on the above method for generating an HMI flowchart provided by the embodiment of the present invention, the method includes: when a trigger instruction sent by a user is received, acquiring the determined configuration information of each picture; sequentially generating an HMI (human machine interface) flow chart corresponding to each piece of screen configuration information, and ending the generation process of the HMI flow chart until the HMI flow charts corresponding to all pieces of screen configuration information are generated; the generation process of the HMI flow chart corresponding to each picture configuration information comprises the steps of determining a standard primitive corresponding to each device in a pre-constructed standard primitive library according to the primitive information of each device contained in the current picture configuration information, and determining the one-to-one correspondence between each measuring point bit number corresponding to each device and each control bit number of the standard primitive corresponding to each measuring point bit number. And generating a standard primitive corresponding to each device according to the primitive display position corresponding to each device on the drawing corresponding to the current picture configuration information, and configuring each control bit number by each measurement bit number corresponding to the device. And after the generation and configuration processes of the standard graphic elements corresponding to each device in the current picture configuration information are completed, generating a corresponding HMI flow chart based on the current drawing. By applying the method provided by the embodiment of the invention, the HMI flow chart corresponding to the picture configuration information can be automatically generated based on the predetermined picture configuration information and the pre-constructed standard primitive library when the trigger instruction of the user is received, the primitive drawing and configuration work is not required to be manually carried out, the time consumed for generating the HMI flow chart is reduced, and the generation efficiency of the HMI flow chart is improved.

Drawings

In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.

FIG. 1 is a flowchart of a method for generating an HMI flowchart according to an embodiment of the present invention;

FIG. 2 is a flowchart of another method for generating an HMI flow chart according to an embodiment of the present invention;

fig. 3 is a schematic structural diagram of an apparatus for generating an HMI flowchart according to an embodiment of the present invention;

fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

In this application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

The embodiment of the invention provides a method for generating an HMI flow chart, the method can be applied to a charting system of the HMI flow chart, an execution subject of the method can be a processor of the charting system, and a flow chart of the method is shown in FIG. 1 and comprises the following steps:

s101: when a trigger instruction sent by a user is received, acquiring the determined N pieces of picture configuration information, and setting i to be 1;

in the method provided by the embodiment of the invention, when a user needs to generate the HMI flow chart through the HMI drawing system, the drawing triggering instruction can be sent through HMI software based on terminals such as computer equipment. When the processor receives a trigger instruction sent by a user, a preset interface can be called, each piece of picture configuration information stored in a specified position is read, and N pieces of determined picture configuration information are obtained, wherein N is a positive integer greater than or equal to one. Meanwhile, the parameter i is initialized to 1 for determining whether the generation process of the HMI flowchart corresponding to each screen configuration information has been executed in sequence.

The picture configuration information mentioned in the method provided by the embodiment of the invention is that the content and the configuration information of each picture required to be displayed by the human-computer interaction equipment are planned in advance according to an actual control system, the configuration information of each picture is determined in advance based on the information of a pre-planned design drawing, bit number configuration, instrument equipment and the like, and each picture configuration information corresponds to one picture of the human-computer interaction equipment, namely corresponds to an HMI (human machine interface) flow chart. Each picture configuration information includes information such as a primitive and a station bit number of each corresponding field device in the picture. Each picture configuration information can be determined by manually sorting and storing various kinds of information planned in advance, or an information extraction strategy can be preset so as to intelligently extract corresponding information from various kinds of information planned in advance, generate each picture configuration information, and store each picture configuration information in a specified position in a file form. It should be noted that, in a specific engineering application, the determined screen configuration information may be multiple screen configuration information or only one screen configuration information, and when there are multiple screen configuration information, it is described that HMI flowcharts need to be generated in batch currently, and if there is only one screen configuration information, it is described that only one HMI flowchart needs to be generated currently. The number of the picture configuration information does not influence the realization function of the method provided by the embodiment of the invention.

The bit number mentioned in the method provided by the embodiment of the invention refers to a name used when a variable or constant data is quoted in a control system, the corresponding relation of each variable can be determined in the bit number configuration process, the bit number generally has a corresponding naming rule, and the length range, usable characters or unusable characters and the like of the bit number are specified in the rule.

S102: acquiring one piece of screen configuration information which does not generate a corresponding HMI flow chart at present from each piece of screen configuration information as the current screen configuration information;

in the method provided by the embodiment of the present invention, a piece of screen configuration information that is not currently generated corresponding to the HMI flowchart may be determined from the determined screen configuration information, and the method proceeds to step S103, and starts to execute the generation process of the HMI flowchart corresponding to the screen configuration information.

Optionally, in a specific implementation process, a generation order of each piece of screen configuration information may be set, and each piece of screen configuration information is acquired in order to generate the HMI flowchart corresponding thereto, for example, the generation order of the HMI flowchart corresponding to each piece of screen configuration information is represented by a file name corresponding to each piece of screen configuration information. In step S102, the screen configuration information corresponding to the current generation order may be acquired as the current screen configuration information, that is, the screen configuration information with the ith preset order is acquired.

Optionally, in a specific implementation process, the current screen configuration information may be obtained in a randomly selected manner without setting a generation sequence corresponding to each piece of screen configuration information. Specifically, in the process of acquiring the current screen configuration information, it is necessary to determine that all screen configuration information corresponding to the HMI flowchart is not currently generated, and randomly acquire one screen configuration information as the current screen configuration information from each screen configuration information not generated corresponding to the HMI flowchart.

S103: newly building a drawing, and determining the primitive information of each device contained in the current picture configuration information and the corresponding measuring point position number of each device;

in the method provided by the embodiment of the invention, a blank flow chart drawing can be newly established for the current picture configuration information, and the current picture configuration information is analyzed to determine the contained primitive information of each device and the corresponding measuring point bit number of each device.

The field devices are characterized in the HMI flow diagram by primitives, which, when displayed on a field control device, correspondingly dynamically represent the operating state of the field devices. The primitive information of each device included in each screen configuration information refers to information of a corresponding primitive, such as a primitive number of a primitive corresponding to each device, a primitive display position, and the like, according to each field device to be displayed in the HMI flowchart corresponding to the screen configuration information, which is planned in advance. The corresponding measuring point bit number of each device refers to the reference name of each variable related to the dynamic effect in the HMI flow chart during the operation process of the device, and is usually the variable measured by some signal measuring points in the device.

If the pressure value and the temperature value inside the reaction kettle need to be displayed in real time on the pixel corresponding to the reaction kettle, the pressure position number and the temperature position number of the equipment are contained in each measuring point position number corresponding to the equipment, the pressure position number is a name used for representing the pressure value measured by the pressure sensor in the reaction kettle in the configuration process, and the temperature position number is a name used for representing the temperature value measured by the temperature sensor in the reaction kettle in the configuration process. These bit numbers are usually predefined according to the actual naming convention.

S104: according to the primitive information of each device, determining a standard primitive corresponding to each device in a pre-constructed standard primitive library, and determining the one-to-one correspondence of each measuring point bit number corresponding to each device and each control bit number of the standard primitive corresponding to each measuring point bit number;

according to the method provided by the embodiment of the invention, the corresponding primitive can be preset for each device which is possibly required to be applied in the engineering according to the actual engineering application requirement, the primitive model is set for each primitive, each primitive is stored at the designated position as the standard primitive to construct the standard primitive library to be used as the general information for repeated calling. The primitives referred to herein, in addition to the graphic elements, also include configuration information that controls the dynamic display of the graphic elements.

In the method provided by the embodiment of the present invention, a standard primitive corresponding to each device may be determined in a primitive library based on the primitive model included in the primitive information of each device in the current picture configuration information, and a corresponding relationship between each measurement point bit number corresponding to each device and each control bit number of the standard primitive may be determined according to an association relationship between the measurement point bit number of each device and the control bit number of the primitive included in the picture configuration information. The control bit number of the standard primitive can be regarded as a configuration attribute, the specific bit number configured is a variable name for controlling data display or dynamic effect in the primitive, and in the initial configuration information of the standard primitive, the control bit number is not configured with an actually valid bit number.

S105: generating a standard primitive corresponding to each device on the current drawing according to the primitive display position in the primitive information of each device;

in the method provided by the embodiment of the present invention, the display position of the primitive corresponding to each device may be determined on the newly created drawing according to the primitive display position in the primitive information of each device, the standard primitive corresponding to the device may be called from the standard primitive library, and the graphic element of the standard primitive may be generated at the determined display position.

S106: aiming at each control bit number of each standard primitive in the current drawing, configuring the control bit number by using a measuring point bit number corresponding to the control bit number;

in the method provided by the embodiment of the invention, the control bit number of each standard primitive generated in the current drawing can be configured, and each control bit number in the configuration information is respectively configured to be the corresponding measuring point bit number, so that the control bit number of the standard primitive on the current drawing is configured to be the measuring point bit number of the equipment, namely the corresponding measuring point bit number is used for controlling the data display or dynamic effect of the primitive.

S107: if standard primitives corresponding to all equipment are generated on the current drawing and the control bit number of each standard primitive completes configuration by the corresponding measuring point bit number, generating an HMI (human machine interface) flow chart corresponding to the current picture configuration information based on the current drawing;

in the method provided by the embodiment of the invention, after the standard primitive corresponding to each device in the current picture configuration information is generated on the current drawing and the configuration of the control bit number is completed, a storage interface can be called to generate the HMI flow chart file corresponding to the current drawing, and the HMI flow chart file is stored to the designated position to generate the HMI flow chart corresponding to the current picture configuration information.

S108: judging whether i is equal to N;

in the method provided by the embodiment of the invention, after the flow chart corresponding to the current picture configuration information is generated, whether a preset parameter i is equal to N or not is judged to judge whether the current picture configuration information is in the determined N picture configuration information or not, and the last picture configuration information corresponding to the HMI flow chart needs to be generated, namely whether the HMI flow chart corresponding to each picture configuration information is sequentially generated or not is judged.

If i is equal to N, it indicates that the HMI flowcharts corresponding to each screen configuration information are sequentially generated at present, step S110 is executed, that is, the generation process of the HMI flowchart at this time is ended. If i is not equal to N, i is smaller than N, step S109 is executed.

S109: let i equal i + 1;

in the method provided by the embodiment of the present invention, if the current parameter i is not equal to N, one is added to the current parameter i to update the parameter i, and step S102 is performed to generate the corresponding HMI flowchart for the fact that the screen configuration information corresponding to the HMI flowchart is not generated yet.

S110: and finishing the generation process of the HMI flow chart.

Based on the method provided by the embodiment of the invention, a user can trigger the drawing system of the HMI by sending the trigger instruction to acquire the determined configuration information of each picture, call the standard primitive to draw on the corresponding drawing according to the configuration information of each picture, and configure the control bit number of the standard primitive by the measuring point bit number of the equipment so as to generate the HMI flow chart corresponding to the configuration information of each picture. By applying the method provided by the embodiment of the invention, the HMI flow chart corresponding to all the determined picture configuration information can be automatically generated, and in the generation process of the HMI flow chart, the user only needs to check and adjust the generated HMI flow chart without manually drawing the primitive or modifying the primitive configuration information, thereby saving a large amount of repeated working time and improving the generation efficiency of the HMI flow chart. Secondly, the method provided by the embodiment of the invention realizes primitive drawing by applying the standard primitive library, can be repeatedly called when each user manufactures the HMI flow chart, does not need to redevelop primitives during the previous design, has lower requirements on the user, and also reduces the time consumed by the user for drawing.

In order to better explain the method provided by the embodiment of the present invention, in conjunction with the flowchart shown in fig. 2, the embodiment of the present invention provides another method of an HMI flowchart, and on the basis of the method shown in fig. 1, the process for determining each piece of screen configuration information mentioned in step S101 includes:

s201: acquiring a measuring point and an equipment list of a preset control system;

in the method provided by the embodiment of the invention, a user can preset the measuring points and the equipment list of the control system, and when receiving the information identification instruction for determining the picture configuration information, the user can obtain the preset measuring points and the equipment list. The measuring points and equipment list refers to the measuring point information of all equipment and equipment contained in the control system.

S202: extracting information of the measuring points and the equipment list according to a preset information identification strategy to obtain a plurality of pieces of equipment corresponding to the measuring points and the equipment list and measuring point position numbers corresponding to each piece of equipment;

in the method provided by the embodiment of the invention, the information identification strategy can be preset through information such as the description of the position number, the numbering rule of the position number, the instrument specification and the like, and equipment information of the measuring points and all equipment in the equipment list, such as equipment names, equipment numbers, measuring point position numbers on the equipment, measuring point comments and the like, is extracted, so that each equipment corresponding to the list and each measuring point position number corresponding to each equipment are obtained.

S203: determining a standard primitive model corresponding to each device and a first placeholder corresponding to each measuring point bit number corresponding to each device according to preset association information of the devices and the standard primitives;

in the method provided by the embodiment of the invention, an equipment primitive table containing the corresponding relation between each standard primitive and equipment in the standard primitive library can be preset, wherein the association relation can be established by the equipment number and the primitive model, and a first placeholder corresponding to each measuring point bit number of each equipment is arranged and used for establishing the association relation between the measuring point bit number and the control bit number of the primitive. According to the associated information, the model of the standard primitive corresponding to each current device and the first placeholder corresponding to each measuring point bit number can be determined.

The placeholders mentioned in the embodiment of the invention are mainly intermediate media for establishing the incidence relation between the measuring point bit numbers and the control bit numbers, can be named according to the actual requirement setting standard, and each specific placeholder corresponds to one control bit number of one standard graphic element. The standard naming of the placeholder can include the code of the standard primitive and the dynamic effect code, and some special symbols are added to distinguish from the ordinary bit number (the special symbols do not appear in the ordinary bit number), and the following format can be adopted for setting: "special symbol" + standard primitive code _ part _ dynamic effect code + "special symbol". For example: @ MOTOR01_ STATUS _ COLOR @ refers to a placeholder for a control bit number for a dynamic effect of "display COLOR" (COLOR) for the "running state" (STATUS) of the standard primitive "MOTOR 01" (MOTOR 01). The first placeholder corresponding to the measurement point number refers to the placeholder corresponding to the control bit number to be configured by the measurement point number according to the preset design data.

S204: determining picture information and a primitive display position corresponding to each device according to preset picture planning information;

in the method provided by the embodiment of the invention, the display pictures can be designed according to the display requirements corresponding to the control system, the picture planning information is preset according to the design data, each display picture corresponds to one picture planning information, and the picture planning information comprises the equipment to be displayed in the picture, the display position of each equipment and the like. According to the preset picture planning information, the picture corresponding to each device and the corresponding display position can be determined. If the screen planning information of the screen 1 includes the device a, determining that the device a corresponds to the screen 1, and determining the display position of the device a recorded in the screen planning information of the screen 1 as the primitive display position corresponding to the device a.

S205: determining the standard primitive model and the primitive display position corresponding to each device as primitive information corresponding to the device;

in the method provided by the embodiment of the invention, after the standard primitive model and the primitive display position corresponding to each device are determined, the information is determined as the primitive information of the device.

S206: determining each measuring point position number corresponding to the equipment and a first placeholder corresponding to each measuring point position number as measuring point position number information corresponding to the equipment;

in the method provided by the embodiment of the invention, each measuring point bit number corresponding to each device and the first placeholder corresponding to each measuring point bit number are used as the measuring point bit number information corresponding to the device.

S207: determining each device corresponding to each picture according to the picture information corresponding to each device;

in the method provided by the embodiment of the present invention, each device corresponding to each picture planned and displayed in advance may be determined according to picture information corresponding to all devices in the control system, for example, if the device a corresponds to the picture 1, the device B corresponds to the picture 3, the device C corresponds to the picture 2, the device D corresponds to the picture 1, and the device E and the device F correspond to the picture 3, the picture 1 corresponds to the device a and the device D, and the picture 2 corresponds to the device C and the picture 3 corresponds to the device B, the device E and the device F. It should be noted that the correspondence relationship in the embodiment of the present invention is only schematic illustration, and the number of devices corresponding to a specific screen corresponds to an actual design requirement, which does not affect the method implementation function provided in the embodiment of the present invention.

S208: and determining the primitive information and the measuring point bit number information corresponding to each device corresponding to each picture as picture configuration information.

In the method provided by the embodiment of the invention, the picture configuration information corresponding to each picture is generated based on the primitive information and the measuring point bit number information corresponding to all the devices corresponding to each picture, so as to obtain the configuration information of each picture. In a specific implementation process, the picture configuration information can be stored in a form of a table, the device number of each device, the corresponding standard primitive model, the primitive display position, the measurement point position number, the first placeholder corresponding to the measurement point position number, and the like are all stored in fixed relative positions in the table, and information can be quickly extracted based on the relative positions in a subsequent application process.

Based on the method provided by the embodiment of the invention, based on preset design data, the related information of each device can be intelligently extracted, and the picture configuration information of each picture is generated so as to be used for generating the HMI flow chart in the subsequent process, and the design data does not need to be manually sorted to set the picture configuration information, so that the time consumed by drawing is further reduced, and the drawing efficiency is improved.

In the actual engineering application process, in the process of extracting information to obtain the picture configuration information, the relevant information obtained by identification can be checked or adjusted manually, so that the accuracy of the information is guaranteed.

Further, an embodiment of the present invention provides another method for generating an HMI flowchart, based on the method shown in fig. 2, in the method provided in the embodiment of the present invention, each control bit number of each standard primitive in the standard primitive library is configured in advance by a second placeholder corresponding to the control bit number, and the process of determining a one-to-one correspondence relationship between each measurement point bit number corresponding to each device and each control bit number of the standard primitive corresponding to the measurement point bit number in step S104 includes:

determining a first placeholder corresponding to each measuring point bit number corresponding to each device;

in the method provided by the embodiment of the present invention, each control bit number of each standard primitive in the standard primitive library is configured by its corresponding second placeholder, that is, a placeholder corresponding to the position of each control bit number in the initial configuration information of each standard primitive is configured correspondingly. For the detailed description of the placeholder, reference may be made to the above embodiments, which are not described herein again.

In the method provided by the embodiment of the invention, the first placeholder corresponding to each measuring point bit number corresponding to each device can be acquired from the picture configuration information.

Determining a second placeholder correspondingly configured to each control bit number of the standard primitive corresponding to each device;

in the method provided by the embodiment of the present invention, the second placeholder configured on each control bit number may be obtained in the initial configuration information of the standard primitive corresponding to the device.

Comparing a first placeholder corresponding to each measuring point bit number corresponding to each device with a second placeholder configured corresponding to each control bit number of a standard graphic element corresponding to the device, determining a second placeholder identical to the first placeholder corresponding to the measuring point bit number as a target placeholder, and determining a control bit number corresponding to the target placeholder as a control bit number corresponding to the measuring point bit number.

In the method provided by the embodiment of the invention, the placeholder corresponding to each measuring point bit number corresponding to the equipment is compared with the placeholder corresponding to each control bit number corresponding to the standard graphic element of the equipment, and the corresponding relation between the measuring point bit number and the control bit number which are the same as the corresponding placeholder is determined.

Based on the method provided by the embodiment of the invention, the corresponding relation between the measuring point bit number and the control bit number can be determined through the preset placeholder, the processing process is more convenient and quicker, the configuration information of the control bit number is convenient to modify in the subsequent process, and the processing efficiency of the drawing can be improved.

In order to better describe the method provided by the embodiment of the present invention, the embodiment of the present invention provides a method for generating an HMI flowchart, where on the basis of the above embodiment, the process of configuring, for each control bit number of each standard primitive in the drawing, mentioned in step S106, the control bit number by the measurement point bit number corresponding to the control bit number includes:

in the configuration information of each standard primitive, searching and replacing operations corresponding to each measuring point bit number are carried out, so that a second placeholder correspondingly configured to each control bit number of each standard primitive is replaced with the measuring point bit number corresponding to the control bit number;

and the search object of the search replacement operation corresponding to each measuring point bit number is a first placeholder corresponding to the measuring point bit number, and the replacement object is the measuring point bit number.

In the method provided by the embodiment of the invention, the configuration information of the control bit number can be modified into the corresponding measuring point bit number by executing the search and replacement operation in the configuration information of the standard primitive. As can be seen from the above description, the corresponding measurement point bit numbers and control bit numbers with the same placeholders have a corresponding relationship, i.e., the control bit numbers should be configured with the measurement point bit numbers. Therefore, when the first placeholder of one measuring point bit number is searched in the configuration information, the searched target is the same second placeholder, and the second placeholder is replaced by the measuring point bit number, so that the corresponding control bit number can be configured by the measuring point bit number. After the search and replacement operation corresponding to each measuring point bit number is executed, the corresponding measuring point bit number can be set at the position of each control bit number in the configuration information.

It should be noted that, what is provided in the embodiment of the present invention is only a specific implementation manner of finding and replacing, and in the specific implementation process, other matching manners may be adopted to modify the configuration information, and on the other hand, the placeholder is used to determine the association relationship and complete the modification of the configuration information, which is only a specific implementation manner provided for better explaining the method of the present invention, and in the specific implementation process, other manners such as directly presetting the corresponding relationship between the control bit number and the measurement point bit number may be implemented without affecting the implementation function of the method provided in the embodiment of the present invention.

Based on the method provided by the embodiment of the invention, quick and automatic matching can be carried out based on the placeholder, the change of the configuration information can be quickly completed, and the drawing efficiency can be further improved.

Optionally, in the method provided in each of the foregoing embodiments, the step of determining, in a standard primitive library pre-constructed according to the primitive information of each device, a standard primitive corresponding to each device in the primitive library mentioned in step S104 includes:

determining the standard primitive model in the primitive information of each device as the standard primitive model corresponding to the device;

determining the primitive model of each standard primitive in the standard primitive library;

and comparing the standard primitive model corresponding to each device with the primitive model of each standard primitive in the standard primitive library, and determining the standard primitive with the same primitive model as the standard primitive model corresponding to the device as the standard primitive corresponding to the device.

In the method provided by the embodiment of the invention, each standard primitive in the standard primitive library is preset with the corresponding primitive model. The model matching can be performed in the standard primitive library based on the standard primitive model corresponding to the equipment contained in the picture configuration information, and the standard primitive matched with the standard primitive model corresponding to the equipment is obtained from the standard primitive library and is used as the standard primitive corresponding to the equipment.

Based on the method provided by the embodiment of the invention, the standard primitive corresponding to the equipment is determined in the standard primitive library in a model comparison mode, so that the method is convenient and quick.

Further, on the basis of the method provided by the above embodiment, the embodiment of the present invention provides another method for generating an HMI flowchart. In an actual engineering application process, in a process of configuring a control bit number with a measurement point bit number, there may be a case where a measurement point bit number corresponding to a certain control bit number does not exist in information. If the specific bit number information of a certain measuring point bit number corresponding to the equipment is not identified during information extraction, the measuring point bit number is a null value in the picture configuration information, and the corresponding control bit number is configured to be the null value in the subsequent configuration process. Or the design data does not provide a measurement point bit number corresponding to a certain control bit number, so as to avoid configuration abnormality caused by subsequent configuration abnormality, in the specific implementation process of the method provided in the embodiment of the present invention, after the configuration information of each standard primitive in the drawing is modified, whether each control bit number is still configured by a placeholder can be determined, and if the control bit number is still configured by the placeholder, the placeholder is deleted, so that the content configured at the control bit number is null.

In the method provided in the embodiment of the present invention, after step S106 refers to each control position number for each standard primitive in the drawing, and configures the control position number with the measurement point position number corresponding to the control position number, the method further includes:

judging whether the configuration information of each control bit number of each standard primitive in the drawing is a null value or not, and determining the control bit number of which the configuration information is the null value as a target control bit number;

in the method provided by the embodiment of the invention, after the process of configuring the control bit number by the measurement point bit number corresponding to the control bit number is completed, the configuration information of the standard primitives in the drawing is traversed to judge whether the configuration at the control bit number of each standard primitive is a null value, and the control bit number configured by the null value at present is determined as the target control bit number.

Generating a user-defined measuring point bit number corresponding to the target control bit number according to a preset naming rule;

in the method provided by the embodiment of the invention, a naming rule can be preset to generate a self-defined measuring point bit number corresponding to the target control bit number, for example, a self-defined bit number name is generated by adding a prefix or a suffix on the basis of the existing bit number.

For example, the equipment reactor R101, the pressure level number with the station level number name "PI 3101", etc., and the matching standard primitive is selected as "reactor 01", which has two dynamic effects, one is to indicate the new state of triggering the interlock by red flashing, and the second is to indicate the current state of high interlock/normal by red/green fill color. And there is no corresponding bit number in the picture configuration information at present that can bear the measuring point bit number for controlling the two dynamic effects. The new bit number name can be formed by adding prefixes "fALM _" and "fPSHH _" before the existing test point bit number of the device according to the preset naming rule, wherein the use of "fALM _ PI 3101" corresponds to the control bit number for controlling the red flash dynamic effect of the primitive, and the use of "fPSHH _ PI 3101" corresponds to the control bit number for controlling the red/green fill color dynamic effect of the primitive.

And configuring the target control bit number by using the user-defined measuring point bit number corresponding to the target control bit number, and storing the user-defined measuring point bit number corresponding to the target control bit number into a preset user-defined variable file.

In the method provided by the embodiment of the invention, after the user-defined measuring point bit number corresponding to the target control bit number is generated, the control bit number is configured according to the corresponding user-defined measuring point bit number, and the generated user-defined measuring point bit number is stored in the specified user-defined variable file so as to be convenient for calling in the subsequent configuration process. As in the above example, the automatically generated variables "fALM _ PI 3101" and "fPSHH _ PI 3101" are recorded in the custom 1-byte variable (switching value) variable list in the "new variable table", and two variables named "fALM _ PI 3101" and "fPSHH _ PI 3101" may be added to the custom 1-byte variable (switching value) variable list in the configuration file in the subsequent lead-back configuration file.

Based on the method provided by the embodiment of the invention, the self-defined bit number can be generated for the control bit number which is not provided with the actual measuring point bit number currently according to the preset naming rule and is used for subsequent configuration. Under the condition that a user does not provide measuring point bit numbers corresponding to all the control bit numbers or information identification is lost, the control bit numbers can be normally configured, the follow-up normal configuration can be guaranteed, and the drawing efficiency is improved.

In a specific implementation process, the user can also be prompted to perform supplementary input on the missing bit number, and the bit number information supplemented by the user is recorded in the user-defined variable file, so that the method implementation function provided by the embodiment of the invention is not influenced.

Further, an embodiment of the present invention provides another method for generating an HMI flowchart, where on the basis of the above embodiment, in the method provided in the embodiment of the present invention, the process of generating the HMI flowchart corresponding to the current screen configuration information based on the drawing in step S107 includes:

executing storage operation on the drawing to obtain an HMI flow chart corresponding to the drawing, wherein the HMI flow chart is stored in a preset binary file format;

and determining the HMI flow chart corresponding to the drawing as the HMI flow chart corresponding to the current screen configuration information.

In the method provided by the embodiment of the invention, a storage interface of the HMI flow chart drawing software can be called, the current drawing is stored in a binary coding mode, and a corresponding HMI flow chart file is obtained, namely the HMI flow chart file generated in the embodiment of the invention is a binary format file. The generated file may be subsequently verified.

Based on the method provided by the embodiment of the invention, the generated HMI flow chart file is a binary format file, hacker attack or virus can not accurately change the binary file under the condition of no accurate algorithm, and random modification generally causes disordered pictures, so that verification fails, and the HMI flow chart file is very easy to perceive and can be processed in time. Therefore, by applying the method provided by the embodiment of the invention, the HMI flow chart file can be verified, the connection change of the graphic elements or the pictures caused by the damage of the file due to human or abnormal reasons can be prevented, and the system is prevented from being abnormal and causing loss due to the wrong judgment or wrong action of an operator.

Corresponding to the method for generating the HMI flowchart shown in fig. 1, an embodiment of the present invention further provides a device for generating an HMI flowchart, which is used to implement the method shown in fig. 1 specifically, and a schematic structural diagram of the device is shown in fig. 3, and includes:

a first obtaining unit 301, configured to obtain each determined screen configuration information when receiving a trigger instruction sent by a user;

a generating unit 302, configured to generate an HMI flowchart corresponding to each piece of screen configuration information in sequence, and end a generation process of the HMI flowchart of this time until all the HMI flowcharts corresponding to the screen configuration information are generated;

wherein the generating unit 302 includes:

a first determining subunit 303, configured to determine primitive information of each device included in current screen configuration information, and a measurement point bit number corresponding to each device;

a second determining subunit 304, configured to determine, according to the primitive information of each device, a standard primitive corresponding to each device in a pre-constructed standard primitive library, and determine a one-to-one correspondence relationship between each measurement point bit number corresponding to each device and each control bit number of the standard primitive corresponding thereto;

a first generating subunit 305, configured to generate a standard primitive corresponding to each device on a drawing corresponding to current screen configuration information according to a primitive display position in the primitive information of each device;

a configuration subunit 306, configured, for each control bit number of each standard primitive in the drawing, to configure the control bit number with a measurement point bit number corresponding to the control bit number;

a second generating subunit 307, configured to generate, based on the drawing, an HMI flowchart corresponding to the current screen configuration information when the standard primitives corresponding to all the devices have been generated on the drawing and the control bit number of each standard primitive has been configured by the measurement point bit number corresponding to the standard primitive.

Based on the device provided by the embodiment of the invention, a user can trigger the drawing system of the HMI by sending a trigger instruction to acquire each determined picture configuration information, call the standard primitive to draw on the corresponding drawing according to each picture configuration information, and configure the control bit number of the standard primitive by the measuring point bit number of the equipment so as to generate the HMI flow chart corresponding to each picture configuration information. By applying the device provided by the embodiment of the invention, the HMI flow chart corresponding to all the determined picture configuration information can be automatically generated, and in the generation process of the HMI flow chart, the user only needs to check and adjust the generated HMI flow chart without manually drawing the primitive or modifying the primitive configuration information, thereby saving a large amount of repeated working time and improving the generation efficiency of the HMI flow chart. Secondly, the standard primitive library is applied to realize primitive drawing in the device provided by the embodiment of the invention, and each user can repeatedly call when making the HMI flow chart without redeveloping the primitives in the previous design, so that the requirement on the user is lower, and the time consumed by the user for drawing is also reduced.

Optionally, on the basis of the above apparatus, the apparatus further includes:

the second acquisition unit is used for acquiring a preset measuring point of the control system and an equipment list;

the extracting unit is used for extracting information of the measuring points and the equipment list according to a preset information identification strategy to obtain a plurality of pieces of equipment corresponding to the measuring points and the equipment list and measuring point position numbers corresponding to each piece of equipment;

the device comprises a first determining unit, a second determining unit and a judging unit, wherein the first determining unit is used for determining a standard graphic primitive model corresponding to each device and a first placeholder corresponding to each measuring point bit number corresponding to each device according to preset association information of the devices and the standard graphic primitives;

the second determining unit is used for determining picture information and a graphic element display position corresponding to each device according to preset picture planning information;

the third determining unit is used for determining the standard primitive model and the primitive display position corresponding to each device as primitive information corresponding to the device;

a fourth determining unit, configured to determine, as the measurement point bit number information corresponding to the device, each measurement point bit number corresponding to the device and the first placeholder corresponding to each measurement point bit number;

a fifth determining unit, configured to determine, according to picture information corresponding to each device, each device corresponding to each picture;

and the sixth determining unit is used for determining the primitive information and the measuring point bit number information corresponding to each device corresponding to each picture as picture configuration information.

Optionally, on the basis of the foregoing apparatus, each control bit number of each standard primitive in the standard primitive library is configured in advance by a second placeholder corresponding to the control bit number, where the second determining subunit 304 includes:

the third determining subunit is used for determining a first placeholder corresponding to each measuring point bit number corresponding to each device;

a fourth determining subunit, configured to determine a second placeholder correspondingly configured to each control bit number of the standard primitive corresponding to each device;

and a fifth determining subunit, configured to compare a first placeholder corresponding to each measurement point bit number corresponding to each device with a second placeholder configured to correspond to each control bit number of a standard primitive corresponding to the device, determine a second placeholder identical to the first placeholder corresponding to the measurement point bit number as a target placeholder, and determine a control bit number corresponding to the target placeholder as a control bit number corresponding to the measurement point bit number.

Optionally, on the basis of the foregoing apparatus, the configuring subunit 306 includes:

the replacing subunit is used for performing searching and replacing operation corresponding to each measuring point bit number in the configuration information of each standard primitive so as to replace a second placeholder correspondingly configured to each control bit number of each standard primitive with the measuring point bit number corresponding to the control bit number;

and the search object of the search replacement operation corresponding to each measuring point bit number is a first placeholder corresponding to the measuring point bit number, and the replacement object is the measuring point bit number.

Optionally, on the basis of the foregoing apparatus, the second determining subunit 304 includes:

a sixth determining subunit, configured to determine, as a standard primitive model corresponding to the device, a standard primitive model in the primitive information of each device;

a seventh determining subunit, configured to determine a primitive model of each standard primitive in the standard primitive library;

and the eighth determining subunit is configured to compare the standard primitive model corresponding to each piece of equipment with the primitive model of each standard primitive in the standard primitive library, and determine a standard primitive with the same primitive model as the standard primitive model corresponding to the piece of equipment as the standard primitive corresponding to the piece of equipment.

Optionally, on the basis of the above apparatus, the apparatus further includes:

the judging unit is used for judging whether the configuration information of each control bit number of each standard primitive in the drawing is a null value or not, and determining the control bit number of which the configuration information is the null value as a target control bit number;

the naming unit is used for generating a self-defined measuring point bit number corresponding to the target control bit number according to a preset naming rule;

and the configuration unit is used for configuring the target control bit number by using the user-defined measuring point bit number corresponding to the target control bit number and storing the user-defined measuring point bit number corresponding to the target control bit number into a preset user-defined variable file.

Optionally, on the basis of the foregoing apparatus, the second generating subunit 307 includes:

the storage subunit is used for executing storage operation on the drawing to obtain an HMI (human machine interface) flow chart corresponding to the drawing, and the HMI flow chart is stored in a preset binary file format;

and the ninth determining subunit is configured to determine the HMI flowchart corresponding to the drawing as the HMI flowchart corresponding to the current screen configuration information.

The embodiment of the invention also provides a storage medium, which comprises stored instructions, wherein when the instructions are executed, the equipment where the storage medium is located is controlled to execute the generation method of the HMI flowchart.

An electronic device is provided in an embodiment of the present invention, and the structural diagram of the electronic device is shown in fig. 4, which specifically includes a memory 401 and one or more instructions 402, where the one or more instructions 402 are stored in the memory 401 and configured to be executed by one or more processors 403 to perform the following operations for executing the one or more instructions 402:

when a trigger instruction sent by a user is received, acquiring the determined configuration information of each picture;

sequentially generating an HMI (human machine interface) flow chart corresponding to each piece of screen configuration information, and ending the generation process of the HMI flow chart until all the HMI flow charts corresponding to the pieces of screen configuration information are generated;

the generation process of the HMI flow chart corresponding to each piece of screen configuration information comprises the following steps:

determining the primitive information of each device contained in the current picture configuration information and the position number of each measuring point corresponding to each device;

according to the primitive information of each device, determining a standard primitive corresponding to each device in a pre-constructed standard primitive library, and determining the one-to-one correspondence of each measuring point bit number corresponding to each device and each control bit number of the standard primitive corresponding to the measuring point bit number;

generating a standard primitive corresponding to each device on a drawing corresponding to the current picture configuration information according to a primitive display position in the primitive information of each device;

aiming at each control bit number of each standard primitive in the drawing, configuring the control bit number by using a measuring point bit number corresponding to the control bit number;

and when the standard primitives corresponding to all the equipment are generated on the drawing, and the control bit number of each standard primitive completes configuration by the corresponding measuring point bit number, generating an HMI (human machine interface) flow chart corresponding to the current picture configuration information based on the drawing.

The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, the system or system embodiments are substantially similar to the method embodiments and therefore are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for related points. The above-described system and system embodiments are only illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.

Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

23页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种应用程序在不同环境自适应发布系统及方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!