A method, device, computer storage medium and terminal for generating a page file

By integrating the VBA development environment into the configuration software, creating and editing VBA projects for each page file, the problem of the DCS system being unable to meet the page requirements of different nuclear power plants was solved, improving page design efficiency and applicability.

CN120909586BActive Publication Date: 2026-01-23BEIJING HELISHI CONTROL TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511087546.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2026-01-23
Estimated Expiration
2045-08-04

AI Technical Summary

Technical Problem

In existing technologies, DCS systems cannot meet the personalized needs of different nuclear power plants for page styles and content, resulting in low efficiency in graphic page design and serious waste of resources.

Method used

The VBA development environment is integrated into the configuration software to create a corresponding VBA project for each page file, import the page component files and edit them to generate page files that meet the requirements of the DCS system.

Benefits of technology

By using VBA technology for isolation and editing, the difficulty of page development is reduced, the design efficiency and applicability of DCS pages are improved, and the personalized needs of different nuclear power plants are met.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120909586B_ABST
    Figure CN120909586B_ABST
Patent Text Reader

Abstract

A method, device, computer storage medium and terminal for generating a page file, the embodiment of the present disclosure integrates a VBA development environment in configuration software, and creates a corresponding VBA project for each page file, thereby realizing isolation of the function of the page file from the configuration software, reducing the difficulty of page development through the isolation of the page file and the configuration software; importing a page composition file into the VBA project, and providing a basis for editing of the page composition file based on VBA technology, thereby providing an architectural basis for secondary development of a DCS page; a page developer edits the editable page composition file imported into the VBA project in a VBA environment according to pre-determined page composition information of the DCS, thereby providing a basis for generating a DCS page of an operator station in different industrial sites, and different DCS pages only need to be edited through the editable page composition file, thereby reducing the time and human resource consumption of DCS page development and improving the efficiency of the DCS page.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the distributed control technology, in particular to a method, device, computer storage medium and terminal for generating a page file. BACKGROUND

[0002] With the development of science and technology, the distributed control system (DCS) is widely applied to power, chemical industry, nuclear power, new energy and environmental protection and other fields. The field process of each field is different, and different pages need to be configured for displaying DCS alarms, logs, trends and field states; in addition, in the same field, such as the nuclear power field, different nuclear power stations have different requirements for the style and content of the page. In the related art, the DCS provides a fixed set of graphic pages including basic display functions such as alarms, logs, trends and lists. This implementation cannot meet the different page requirements of different nuclear power stations; designing corresponding graphic pages for different nuclear power stations requires a large amount of time and resources, and the efficiency is extremely low. How to improve the design quality of the graphic pages of the nuclear power station has become a problem to be solved. SUMMARY

[0003] The embodiment of the present application provides a method for generating a page file, comprising:

[0004] integrating a VBA development environment in the configuration software, and creating a corresponding VBA project for each page file created in advance;

[0005] in each VBA project, importing a corresponding page composition file, wherein the page composition file is the composition of the page file, the page composition file includes an editable document class submodule and one or more type library files, and further includes a page composition definition submodule and a page composition calling submodule created in advance according to the composition of the distributed control system (DCS), the page composition calling submodule is called through the document class submodule, the document class submodule includes one or more event response functions for flow control of the execution of the page file, and the type library file contains an interface function set for implementing the functional components included in the DCS;

[0006] editing the editable page composition file imported into the VBA project according to the page composition information of the DCS determined in advance, so as to generate a page file deployed on an operator station.

[0007] On the other hand, the embodiment of the present application also provides a computer storage medium, the computer storage medium stores a computer program, and the computer program is executed by a processor to implement the above-mentioned method for generating a page file.

[0008] In still another aspect, the embodiment of the present application also provides a terminal, comprising a memory and a processor, the memory stores a computer program; wherein,

[0009] The processor is configured to execute a computer program in the memory.

[0010] The computer program, when executed by the processor, implements the method for generating a page file as described above.

[0011] In still another aspect, the embodiments of the present application further provide an apparatus for generating a page file, comprising:

[0012] The embodiments of the present disclosure integrate the VBA development environment in the configuration software, and create a corresponding VBA project for each page file, so as to realize the isolation of the function of the page file from the configuration software. Through the isolation of the page file and the configuration software, the difficulty of page development is reduced. The page composition file is imported into the VBA project, and the editing of the page composition file is provided based on the VBA technology, so as to provide an architectural basis for the secondary development of the DCS page. The page developer edits the editable page composition file imported into the VBA project in the VBA environment according to the pre-determined page composition information of the DCS, so as to provide a basis for generating the DCS page of the operator station in different industrial sites. Different DCS pages only need to be edited by editing the editable page composition file, so as to reduce the time and human resource consumption of the DCS page development, and improve the efficiency of the DCS page.

[0013] Other features and advantages of the present application will be set forth in the following description, and in part will become apparent to those skilled in the art from the description, or can be learned by practice of the present application. Other advantages of the present application will be realized and attained by the methods and systems particularly pointed out in the written description and claims hereof. BRIEF DESCRIPTION OF DRAWINGS

[0014] The accompanying drawings are included to provide a further understanding of the technical solutions of the present application, and constitute a part of the specification, and are used to explain the technical solutions of the present application together with the embodiments of the present application, and do not constitute a limitation to the technical solutions of the present application.

[0015] Figure 1 A flow chart of the method for generating a page file according to the embodiments of the present disclosure;

[0016] Figure 2 A structural block diagram of the apparatus for generating a page file according to the embodiments of the present disclosure. DETAILED DESCRIPTION

[0017] This application describes several embodiments, but these descriptions are exemplary and not restrictive, and it will be apparent to those skilled in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with, or may replace, any feature or element of any other embodiment.

[0018] This application includes and contemplates combinations of features and elements known to those skilled in the art. The embodiments, features, and elements disclosed in this application can also be combined with any conventional features or elements to form unique inventive solutions. Any feature or element of any embodiment can also be combined with features or elements from other inventive solutions to form another unique inventive solution. Therefore, it should be understood that any feature shown and / or discussed in this application can be implemented individually or in any suitable combination. Therefore, the embodiments are not limited except by the limitations imposed by the appended claims and their equivalents. Furthermore, various modifications and changes can be made within the scope of the appended claims.

[0019] Furthermore, in describing representative embodiments, the specification may have presented methods and / or processes as a specific sequence of steps. However, the method or process should not be limited to the specific order of steps described herein, to the extent that it does not depend on such a specific order. As will be understood by those skilled in the art, other sequences of steps are also possible. Therefore, the specific order of steps set forth in the specification should not be construed as a limitation of the claims. Moreover, the claims concerning the method and / or process should not be limited to the steps performed in the written order, and those skilled in the art will readily understand that these orders can be varied and still remain within the spirit and scope of the embodiments of this application.

[0020] Figure 1 A flowchart of the method for generating page files for embodiments of this disclosure is shown below. Figure 1 As shown, it includes:

[0021] Step 101: Integrate the VBA development environment into the configuration software, and create a corresponding VBA project for each pre-created page file;

[0022] Step 102: In each VBA project, import the corresponding page composition file. The page composition file is the composition of the page file. The page composition file includes an editable document class submodule and one or more type library files. It also includes a page composition definition submodule and a page composition calling submodule that are pre-created according to the composition of the distributed control system (DCS). The page composition calling submodule is called through the document class submodule. The document class submodule includes one or more pre-defined event response functions that control the execution of the page file. The type library files contain a set of interface functions for implementing the functional components included in the DCS.

[0023] Step 103: Based on the pre-determined page composition information of the DCS, edit the editable page composition file imported into the VBA project to generate the page file deployed on the operator station.

[0024] This embodiment integrates a VBA development environment into the configuration software and creates a corresponding VBA project for each page file, thus isolating the functionality of the page files from the configuration software. This isolation reduces the difficulty of page development. Importing the page component files into the VBA project provides a foundation for editing these files based on VBA technology, offering an architectural basis for secondary development of DCS pages. Page developers can edit the editable page component files imported into the VBA project within the VBA environment, based on pre-determined DCS page component information. This provides a foundation for generating DCS pages for operator stations in different industrial settings. Different DCS pages only require editing the editable page component files, reducing the time and manpower consumption for DCS page development and improving DCS page efficiency.

[0025] This disclosure discloses a method for generating page files based on VBA. The page files are generated through configuration graphics and VBA projects. Without modifying the configuration software, the configured page files can meet the different display requirements of operator stations in different nuclear power plants. For example, in a second-phase renovation project of a nuclear power plant, the alarm list is required to be displayed with a black background, 30 lines of information per page, and automatically scroll up 10 lines after the screen is full. In Units 1 and 2 of another nuclear project, the alarm list is required to be displayed with gray alarms, 20 lines of information per page, and automatically scroll up 5 lines of information after the screen is full. Using the method of this disclosure, it is only necessary to edit the configuration page files through VBA projects and adjust the background color, number of displayed items, and number of scrolling items in the page files in the VBA projects to meet the applicability requirements of page display for different nuclear power plants, thereby improving system stability and ensuring the maintainability of the display pages.

[0026] The configuration software disclosed herein is a dedicated software for data acquisition and process control. It serves as the software platform and development environment for the monitoring layer in industrial automation systems. Users can flexibly build and configure the human-machine interface (HMI) and monitoring and control logic functions of industrial automatic control systems without writing computer programs. This disclosure allows configuration using page files for individual functions as the configuration unit. Each function's page file is defined as an independent file, such as process system alarm pages, red alarm pages, yellow alarm pages, full log pages, operation log pages, basic system lists, analog quantity lists, and switch quantity lists. Page files can be created and edited offline using the configuration software. The edited page file can be saved as a single file, downloaded to the operator station, and then loaded and invoked by the operator station's online software.

[0027] In one exemplary instance, after creating a page file, the configuration software of this embodiment integrates a VBA development environment through APC technology. The configuration software generates a corresponding VBA project for each page file; the VBA project of the page file can be opened and edited in the VBA development environment integrated with the configuration software.

[0028] In step 101 of this embodiment, the page file contains pre-drawn graphic objects. These graphic objects include basic objects, configured using configuration software and referring to related technologies, such as graphic element objects, text objects, line objects (straight lines, arcs, and curves), and basic graphic objects (rectangles, circles, and polygons, etc.). They may also include composite objects composed of more than one type of basic object. For example, a composite object may include an object that combines various basic objects to form a single object containing both graphics and text, such as a button or icons corresponding to various devices (e.g., icons corresponding to handheld devices). The number of graphic objects in the page of this embodiment can be determined by the developer's configuration. Graphic objects are divided into basic objects and composite objects. Correspondingly, the information of a basic object includes: object ID number, object name, pen width, pen color, fill color, rotation angle, object's length and width dimensions, configured characteristic information on the object, and graphic blinking information. The information of a composite object includes: the basic objects contained within the composite object, and information about the basic objects contained within the contained basic objects.

[0029] Taking the octagonal page for key nuclear reactor parameters as an example: Create a page file for the Safety Parameter Display System (SPDS), add a chart element object (for drawing the octagon and coordinate system) to the page file, add 8 text objects to display the current values ​​of the eight key parameters (nuclear power, primary loop pressure, primary loop humidity, primary loop radioactivity, containment pressure, cold helium temperature, hot helium temperature, and primary loop flow ratio), and draw a button graphic object (composite object) to implement a page file with detailed information on the eight points that pops up when the left mouse button is clicked (this is another page). In the VBA project corresponding to the page file, add the following submodules: DataRead (responsible for calling the interface provided by the server to read point values ​​from the real-time server); PointDefine (defines eight point variables and calculates the coordinates of the eight points' positions in the chart control drawn by the chart element object); and LineDraw (responsible for calling the interface functions provided by the chart control to draw the positions of the eight points in the chart control). Each submodule defines multiple variables, arrays, and function sets, and imports the mathematical calculation type library file from the VBA project to collaboratively complete the functions of the above submodules. After adding the submodules to the VBA project, edit the document class submodule. In its event response function for displaying security parameters, call the LineDraw submodule's function to initialize the chart control; call the PointDefine submodule's function to initialize variable values; call the DataRead submodule's function to read the current values ​​and upper and lower limits of the eight key variables; call the LineDraw submodule's function to draw the background of the octagon; and in the event response function, call the LineDraw submodule's function to draw the real-time octagon. This embodiment adds a button response function to a button object that pops up 8 points of detailed information on SPDS. For example, if the button object is called Detail, then the Detail_OnClick() event response function is edited, and an operation to open the small page of key parameter detailed information is added in the Detail_OnClick() event response function.

[0030] The page file in this embodiment may include: basic page composition information (page type, name, version, creation time, size, and background color, etc.), graphic objects in the page file, a document class submodule imported into the VBA project, and one or more type library files. It also includes a page composition definition submodule and a page composition calling submodule that are pre-created according to the composition of the distributed control system (DCS).

[0031] In one exemplary instance, the document class submodule in this disclosure is generated based on the page base code, which includes one or more predefined event response functions that control the execution flow of the page file; the event response functions can be generated by referring to relevant technologies and using an editor commonly used by those skilled in the art.

[0032] In this embodiment of the disclosure, the event response function for mouse movement in the basic page code implements the following processing:

[0033] ExeHSTriggerFeature nID, 4, 0, x, y / / Runs the interactive feature call submodule; parameter 4 represents mouse movement.

[0034] If nID = -1 Then / / If the mouse is not moving over any graphical object

[0035] MACSGraphView.HideTip / / Hides the tooltip information on the page (tooltip information is a small label that indicates the function of various graphical objects on the page when the mouse hovers over them).

[0036] EndIf.

[0037] In one exemplary instance, the interface function set of this disclosure is used to extend the collection of various functions by adding type library files to a VBA project. This disclosure can provide multiple types of interface function sets through configuration software; the interface function set in this disclosure can include page display function sets (such as displaying text content, displaying line colors, setting the blinking frequency of graphic elements, and redrawing the page) and page interaction function sets (such as opening another page, popping up another panel, and popping up prompts); the interface function set of this disclosure is used to be called in the above steps to complete various dynamic displays.

[0038] In one exemplary instance, embodiments of this disclosure may import page composition files in the following order: first, import the document class submodule; then, import the type library; and finally, import the page composition definition submodule and the page composition calling submodule.

[0039] Importing type library files into a VBA project in this disclosure embodiment may include: adding type library files related to functional components included in the DCS to the page file; the type library files may include operating system type library files and custom type library files, and the custom type library files may come from components developed according to DCS requirements; for example, if the requirement is to implement network printer diagnostic functions, and a network printer diagnostic component has been developed, the type library file of this component can be imported into the printer diagnostic page, and the current status of the printer can be obtained by calling the interface provided by the printer diagnostic component. The type library files imported in this disclosure embodiment may include: type library files for communication with the server, type library files for communication functions between operator stations, type library files for printer diagnostics, and type library files for trend display, etc.; this disclosure embodiment enables secondary editing of the page file through a VBA project, and other function-related type library files can be added to the page file.

[0040] In one exemplary instance, the page composition definition submodule of this disclosure embodiment may include a dynamic characteristic definition submodule and an interactive characteristic definition submodule; correspondingly, the page composition invocation submodule may include a dynamic characteristic invocation submodule and an interactive characteristic invocation submodule.

[0041] In this embodiment of the disclosure, a definition submodule can be formed in the VBA project import page using configuration software to add corresponding dynamic and interactive characteristics to the graphical object; correspondingly, a call submodule can be formed in the page to call the dynamic and interactive characteristics added to the graphical object.

[0042] This disclosure embodiment can define frequently used display functions as dynamic characteristic sets based on configuration software. The dynamic characteristic sets can also be defined through a dedicated window provided by the configuration software. The dynamic characteristics defined by the dynamic characteristic definition submodule in this disclosure embodiment can include one or any combination of the following: color-changing characteristics (e.g., setting the color of a graphic object or a combined object when the point value of the DCS system meets a certain condition), text characteristics (setting the text value of a graphic object on the page), blinking characteristics (setting the blinking state of a graphic object according to the various conditions of the point value of the DCS system), hiding characteristics, filling characteristics, rotation characteristics, horizontal movement characteristics, operation enable characteristics, analog value characteristics, and switch value characteristics.

[0043] This disclosure allows for the customization of dynamic characteristics based on actual usage, enabling their use within graphical objects contained in a configured page file. This disclosure also allows saving the defined file as a page composition definition submodule using configuration software, and then importing this page composition definition submodule into the VBA project after creating the page file and VBA project.

[0044] The embodiments of this disclosure define dynamic features in the dynamic feature definition submodule. These features are invoked through the calling functions contained in the dynamic feature definition submodule. The calling functions can be generated by referring to relevant technologies based on existing functions of the configuration software. The calling functions can be used to call the dynamic features of the graphical objects configured in the page file. For example, in the page file, fill features or analog value display features can be configured for the graphical objects.

[0045] This disclosure embodiment can define frequently used interactive functions as interactive feature sets based on configuration software. Interactive feature sets can also be defined through a dedicated window provided by the configuration software. The interactive features defined by the interactive feature definition submodule in this disclosure embodiment can include one or any combination of the following: button press feature (dynamically displaying the button effect when the button is pressed), button release feature (dynamically displaying the button effect when the button is released), pop-up window feature (pop-up a new window when the mouse is moved), background image switching feature (switching a background image when the mouse is moved), open IO device graph feature (opening a module list graph of a control station), pop-up menu feature (implementing a drop-down menu display function), and display tooltip feature (displaying descriptive information when the mouse moves over a graphic object on the page). This disclosure embodiment can save the defined file as an interactive feature definition submodule using configuration software. When a page file is created, this interactive feature definition submodule is imported into the VBA project corresponding to the page file.

[0046] The interactive features in this embodiment can be invoked through calling functions included in the interactive feature calling submodule. These calling functions can be generated using existing functions in the configuration software, referencing related technologies. By calling these functions, the interactive features of graphical objects configured in the page file can be invoked. For example, the interactive features of the mouse can be configured on a graphical object in the page file when the mouse moves over the object, and the interactive feature of a small panel appearing when the left mouse button is clicked can be set.

[0047] According to the basic framework of DCS, the VBA project corresponding to the page file includes several page composition definition submodules and page composition calling submodules. When creating the page file, some submodules can be directly generated. During the page development process, one or more page composition definition submodules and page composition calling submodules can be added through the VBA project.

[0048] In this embodiment of the disclosure, for graphical objects added to the page file, the page editor can edit the event-driven functions of the graphical objects as needed. Through configuration software, the corresponding event response functions of each graphical object can be registered in the VBA project, that is, various event response functions can be implemented in the VBA environment.

[0049] In one exemplary instance, the event response function in this disclosure embodiment may include one or any combination of the following: an event response function for clicking a graphic object with the mouse (which may be represented as OnClick()); an event response function for double-clicking a graphic object with the left mouse button (which may be represented as OnLButtonDBClick()); an event response function for pressing the left mouse button on a graphic object (which may be represented as OnLButtonDown()); an event response function for releasing the left mouse button after clicking on a graphic object (which may be represented as OnLButtonUp()); an event response function for pressing the right mouse button on a graphic object (which may be represented as OnRButtonDown()); an event response function for releasing the right mouse button after clicking on a graphic object (which may be represented as OnRButtonUp()); and an event response function for moving the mouse on a graphic object (which may be represented as OnMouseMove()).

[0050] In one exemplary embodiment, this disclosure allows editing of an editable page composition file by receiving parameters from an externally inputted file, thereby generating a page file deployed at an operator station. In this embodiment, the page file is edited by a page editor based on parameters of pre-determined graphic objects. The configuration software provides editing functionality, supporting the generation of various page files that meet on-site requirements. This disclosure also saves the edited page file, saving the configured page file to a separate, custom-formatted file.

[0051] In one exemplary instance, the method of this disclosure embodiment further includes:

[0052] Load the event interface set corresponding to each pre-created page file into the operator station's operating software;

[0053] After the operator station runs the generated page file, when it listens for a page message, it runs the corresponding event response function in the VBA project through the loaded event interface set.

[0054] In one exemplary instance, this embodiment of the disclosure runs the event response function corresponding to the page message in the VBA project through the loaded event interface set, including:

[0055] When a page message is detected, the corresponding message response function for the page message pre-loaded in the running software is entered;

[0056] The message response function calls the event trigger function corresponding to the page message;

[0057] Based on the invoked event triggering function, the event response function corresponding to the page message in the document class submodule of the imported VBA project is executed.

[0058] Optionally, the page called through the event response function in the document class submodule constitutes the calling submodule.

[0059] The event response function set in the document class submodule of this disclosure corresponds to the event interface set provided by the operator station for the page file (the configuration software also provides the same interface set). The event interface set in this disclosure is defined to implement the event response functions and is used to implement the calling function of the page component calling submodule in the page file. The event interface set may include one or any combination of the following function sets: an event function for opening the page file (which can be represented as Open()); an event function for starting the page (which can be represented as OnStartOnLine()); an event function for the periodic execution of the page (which can be represented as OnLineTimer()); and an event function for stopping the periodic execution of the page (which can be represented as OnLineTimer()). The event functions for the following events are: OnStopOnLine(); OnLButtonDown(); OnLButtonUp(); OnRButtonDown(); OnRButtonUp(); OnLButtonDBClick(); and OnMouseMove().

[0060] This embodiment of the disclosure defines an event interface set through configuration software (this embodiment defines functions in the event interface set based on COM technology). The event interface set contains an event triggering function corresponding to each interface (for example, the OnMouseMove interface corresponds to the Fire_OnMouseMove function). Correspondingly, the operator station main program also stores and loads the same event interface set and event triggering functions. When the operator station main program loads and runs the page file, it listens for page messages. When a certain page message is heard (for example, the mouse movement MouseMove message), it enters the message response function corresponding to the page message. The message response function calls the event triggering function (the OnMouseMove message corresponds to the Fire_OnMouseMove function). The event triggering function triggers the event corresponding to the page message to the VBA project of the page file. The document class submodule imported into the VBA project is run, and the event response function in the document class submodule is used for response processing (the mouse movement event response function).

[0061] In one exemplary instance, the message response function of this disclosure embodiment can be edited and generated by a technician using the configuration software on an engineering workstation, according to the event triggering function to be called as needed.

[0062] In one exemplary instance, an embodiment of this disclosure describes how an operator station sets up a process for running a generated page file in the online main program, including:

[0063] The event function set for the page document is executed during the page file's runtime, triggering the VBA project to run the page component files within the VBA project. The event function set for graphics objects is executed during page execution; if a corresponding event for a graphics object is generated, it is triggered in the VBA project to run the event response functions defined for that graphics object within the VBA project.

[0064] After the page file is loaded and started, the dynamic characteristics of the graphical objects on the page are displayed according to the edited page component files, and the interactive characteristics of the graphical objects are displayed according to user operations. The page file operation process includes:

[0065] Step S1: The operating software on the operator station loads the page file into memory to run the page file;

[0066] Step S2: Run the software to trigger the event function (Open()) of the page file in the event interface set of the page file; When the event function of opening the page file is triggered in this embodiment of the disclosure, the page file execution will switch to the VBA project and execute the event function of opening the page file in the document class submodule; The processing of the event function of opening the page file in this embodiment of the disclosure may include obtaining the basic page composition information (page name) of the page file in the VBA environment.

[0067] Step S3: The configuration software triggers the event function (OnStartOnLine()) of the startup page of the page file. After the event function of the startup page is triggered in this embodiment of the disclosure, the program execution process will jump to the VBA project and execute the event function of the startup page in the event interface set. The processing of the event function of the startup page is the initialization process of the corresponding VBA project, which may include the initialization operation of each variable used by the page file.

[0068] Step S4: After initializing the VBA project for the page file, perform periodic processing operations on the page file. In this embodiment, the periodic processing of the page file may include: 1. Periodically calling periodic event response functions in the VBA project; 2. Triggering event response functions in the VBA project based on detected event messages acting on the page file; 3. Periodically drawing graphical objects on the graphics page; 4. Processing calls to interface functions included in the interface function set by the VBA project. In this embodiment, the above periodic processing can be executed in parallel.

[0069] 1. Periodically calling periodic event response functions in a VBA project can include:

[0070] The timeout period for the event function (OnLineTimer()) that runs periodically on the page is determined. In this embodiment of the invention, the graphics software triggers the execution of OnLineTimer() in the imported VBA project periodically. The processing performed when OnLineTimer() is executed in this embodiment of the invention includes various operations for reading and displaying data periodically on the page. The period can be set when the page file is created.

[0071] If the timeout period of OnLineTimer() expires, the event handling function defined in VBA's OnLineTimer() will be executed.

[0072] In the event response function of OnLineTimer() in this embodiment, functions in the dynamic characteristic definition submodule can be called to call the dynamic characteristics configured on all graphical objects, thereby realizing the dynamic display of various effects of graphical objects.

[0073] This embodiment of the disclosure can call the ReDraw interface function of the graphics software, which redraws the dynamically configured graphic objects to ensure their dynamic display effect. Here, the ReDraw interface function is an interface function in the set of interface functions provided by the document class submodule of the graphics software, and its function is to redraw the display of various graphic objects on the page.

[0074] 2. When an event handler function in a VBA project is triggered based on an event message detected on the page file, the event messages on the page file can include: mouse move messages, left mouse click messages, right mouse click messages, and left mouse double click messages. These are explained below by category:

[0075] When the configuration software detects a mouse movement message, it triggers the event response function (OnMouseMove()) in the VBA project to indicate that the mouse is moving on a graphical object. In this embodiment, different graphical objects will correspond to different OnMouseMove() functions. If there is a processing procedure in the VBA project, the processing defined in VBA will be executed.

[0076] When the configuration software detects a left mouse click message, it triggers the following event response functions in the VBA project to perform the corresponding processing: the event response function for clicking the graphic object (OnClick()); the event response function for pressing the left mouse button on the graphic object (OnLButtonDown()); and the event response function for releasing the left mouse button after clicking the graphic object (OnLButtonUp()).

[0077] When the configuration software detects a right-click message, it triggers the following event response functions in the VBA project to perform the corresponding processing: the event response function for pressing the right mouse button on a graphic object (OnRButtonDown()); the event response function for releasing the right mouse button after clicking on a graphic object (OnRButtonUp()).

[0078] When the configuration software detects a double-click message on the left mouse button, it triggers the following event response function in the VBA project to perform the corresponding processing: the event response function OnLButtonDBClick() for double-clicking a graphical object on the left mouse button.

[0079] 3. Periodically refresh the page and draw all graphic objects on the page; During the operation of the configuration software in this embodiment, the page will be periodically refreshed to draw the dynamic display effects of all graphic objects in real time; including the display of numerical values ​​of various graphic objects, color changes, and flashing effects.

[0080] 4. Continuously process VBA project calls to interface functions provided by the configuration software; the configuration software in this embodiment provides a set of interface functions for VBA project calls. The set of interface functions includes all functions that need to be processed by the graphics software, such as modifying the attribute values ​​of various graphic objects and opening or closing pages.

[0081] If the configuration software receives a call to the page close interface function from the VBA project, it will execute the OnStopOnLine() event handling process defined in the VBA project to clean up the page resources and close the page.

[0082] If the configuration software receives a call from the VBA project to an interface other than closing the page, the configuration software will determine whether the interface processing includes an operation to close the page. If it does, after performing other operations besides closing, the software will also execute the OnStopOnLine() event handler defined in the VBA project to clean up page resources and close the page. If the called interface function does not involve closing the page, the corresponding interface processing will be executed.

[0083] This disclosure also provides a computer storage medium storing a computer program, which, when executed by a processor, implements the above-described method for generating a page file.

[0084] This disclosure also provides a terminal, including: a memory and a processor, wherein the memory stores a computer program; wherein,

[0085] The processor is configured to execute computer programs in memory;

[0086] When a computer program is executed by a processor, it implements the method described above for generating a page file.

[0087] Figure 2 A structural block diagram of the apparatus for generating page files according to embodiments of this disclosure is shown below. Figure 2 As shown, it includes: creating a cell, importing a cell, and generating a cell; wherein,

[0088] The creation unit is set to integrate the VBA development environment into the configuration software and create a corresponding VBA project for each pre-created page file;

[0089] The import unit is set as follows: In each VBA project, the corresponding page composition file is imported. The page composition file is the composition of the page file. The page composition file includes an editable document class submodule and one or more type library files. It also includes a page composition definition submodule and a page composition calling submodule that are pre-created according to the composition of the distributed control system (DCS). The page composition calling submodule is called through the document class submodule. The document class submodule includes one or more predefined event response functions that control the execution of the page file. The type library files contain a set of interface functions for implementing the functional components included in the DCS.

[0090] The generation unit is configured to: edit the editable page composition files imported into the VBA project based on the pre-determined page composition information of the DCS, in order to generate page files deployed on the operator station.

[0091] In one exemplary instance, the page composition definition submodule in this disclosure embodiment includes: a dynamic characteristic definition submodule and / or an interaction characteristic definition submodule;

[0092] When the page composition definition submodule includes a dynamic feature definition submodule, the page composition calling submodule includes a dynamic feature calling submodule; when the page composition definition submodule includes an interaction feature definition submodule, the page composition calling submodule includes an interaction feature calling submodule.

[0093] In an exemplary instance, when the page composition definition submodule of this disclosure includes a dynamic characteristic definition submodule, the dynamic characteristics defined by the dynamic characteristic definition submodule include one or any combination of the following: color-changing characteristics, text characteristics, blinking characteristics, hiding characteristics, filling characteristics, rotation characteristics, horizontal movement characteristics, operation enable characteristics, analog value characteristics, and switch value characteristics.

[0094] In one exemplary instance, when the page composition definition submodule of this disclosure includes an interaction feature definition submodule, the interaction features defined by the interaction feature definition submodule include one or any combination of the following: button press feature, button release feature, window exit feature, background image switching feature, I / O device image opening feature, menu exit feature, and prompt display feature.

[0095] In one exemplary instance, the event response function in this disclosure includes one or any combination of the following:

[0096] Event response functions for: clicking a graphic object with the mouse; double-clicking a graphic object with the left mouse button; pressing the left mouse button on a graphic object; clicking and releasing the left mouse button on a graphic object; pressing the right mouse button on a graphic object; clicking and releasing the right mouse button on a graphic object; and moving the mouse over a graphic object.

[0097] In one exemplary instance, the processing unit of this disclosure is configured as follows:

[0098] The operator station's operating software loads the pre-created event interface set corresponding to each page file, so that after the operator station runs the generated page file, when it listens for a page message, it runs the event response function in the VBA project corresponding to the page message through the loaded event interface set.

[0099] In this embodiment of the disclosure, the operator station runs the event response functions corresponding to page messages in the VBA project through the loaded event interface set, including:

[0100] When a page message is detected, the corresponding message response function is executed. The message response function is pre-edited and generated by the configuration software on the engineer's workstation.

[0101] The message response function is executed to call the event trigger function corresponding to the page message;

[0102] Based on the invoked event triggering function, the event response function corresponding to the page message in the document class submodule of the imported VBA project is executed.

[0103] In one exemplary instance, the event interface set in this disclosure includes a set of functions that are one or any combination of the following:

[0104] Event functions for opening the page file; event functions for starting the page; event functions for the page's cycle running; event functions for stopping the page's cycle running; event functions for pressing the left mouse button on the page; event functions for releasing the left mouse button on the page; event functions for pressing the right mouse button on the page; event functions for releasing the right mouse button on the page; event functions for double-clicking the mouse on the page; event functions for moving the mouse on the page.

[0105] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term "computer storage medium" includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

Claims

1. A method for generating a page file, characterized in that, include: Integrate the VBA development environment into the configuration software and create a corresponding VBA project for each pre-created page file; In each VBA project, import the corresponding page composition file. The page composition file is the composition of the page file. The page composition file includes an editable document class submodule and one or more type library files. It also includes a page composition definition submodule and a page composition calling submodule that are pre-created according to the composition of the distributed control system (DCS). The page composition calling submodule is called through the document class submodule. The document class submodule includes one or more predefined event response functions that control the execution of the page file. The type library files contain a set of interface functions for implementing the functional components included in the DCS. Based on the pre-determined page composition information of the DCS, the editable page composition files imported into the VBA project are edited to generate page files deployed on the operator station.

2. The method according to claim 1, characterized in that: The page composition definition submodule includes: dynamic characteristic definition submodule and / or interactive characteristic definition submodule; When the page composition definition submodule includes a dynamic feature definition submodule, the page composition calling submodule includes a dynamic feature calling submodule; when the page composition definition submodule includes an interaction feature definition submodule, the page composition calling submodule includes an interaction feature calling submodule.

3. The method according to claim 2, characterized in that: When the page composition definition submodule includes a dynamic characteristic definition submodule, the dynamic characteristics defined by the dynamic characteristic definition submodule include one or any combination of the following: color-changing characteristic, text characteristic, blinking characteristic, hiding characteristic, filling characteristic, rotation characteristic, horizontal movement characteristic, operation enable characteristic, analog value characteristic, and switch value characteristic. When the page composition definition submodule includes an interaction feature definition submodule, the interaction features defined by the interaction feature definition submodule include one or any combination of the following: button press feature, button release feature, window exit feature, background image switching feature, I / O device image opening feature, menu exit feature, and prompt display feature.

4. The method according to any one of claims 1 to 3, characterized in that, The event response function includes one or any combination of the following: Event response functions for: clicking a graphic object with the mouse; double-clicking a graphic object with the left mouse button; pressing the left mouse button on a graphic object; clicking and releasing the left mouse button on a graphic object; pressing the right mouse button on a graphic object. The event handler function for when the mouse right-clicks on a graphic object and then lifts off; Event response functions for mouse movement over graphical objects.

5. The method according to any one of claims 1 to 3, characterized in that, After generating the page file deployed on the operator station, the method further includes: The pre-created event interface set for each page file is loaded into the operating software of the operator station; After the operator station runs the generated page file, when it listens for a page message, it runs the event response function in the VBA project corresponding to the page message through the loaded event interface set.

6. The method according to claim 5, characterized in that, The process of running the event response functions in the VBA project corresponding to page messages through the loaded event interface set includes: When the page message is detected, the message response function corresponding to the page message is executed, wherein the message response function is pre-edited and generated by the configuration software; The message response function is executed to call the event triggering function corresponding to the page message; Based on the event triggering function being called, the event response function corresponding to the page message in the document class submodule of the imported VBA project is executed.

7. The method according to claim 6, characterized in that, The event interface set includes one or any combination of the following functions: Event functions for opening the page file; event functions for starting the page; event functions for the page's cycle running; event functions for stopping the page's cycle running; event functions for pressing the left mouse button on the page; event functions for releasing the left mouse button on the page; event functions for pressing the right mouse button on the page; event functions for releasing the right mouse button on the page; event functions for double-clicking the mouse on the page; event functions for moving the mouse on the page.

8. A computer storage medium storing a computer program that, when executed by a processor, implements the method for generating a page file as described in any one of claims 1 to 7.

9. A terminal, comprising: A memory and a processor, wherein the memory stores a computer program; wherein, The processor is configured to execute computer programs in memory; When the computer program is executed by the processor, it implements the method for generating a page file as described in any one of claims 1 to 7.

10. An apparatus for generating a page file, characterized in that, include: Creating cells, importing cells, and generating cells; among them, The creation unit is set to integrate the VBA development environment into the configuration software and create a corresponding VBA project for each pre-created page file; The import unit is set as follows: In each VBA project, the corresponding page composition file is imported. The page composition file is the composition of the page file. The page composition file includes an editable document class submodule and one or more type library files. It also includes a page composition definition submodule and a page composition calling submodule that are pre-created according to the composition of the distributed control system (DCS). The page composition calling submodule is called through the document class submodule. The document class submodule includes one or more predefined event response functions that control the execution of the page file. The type library files contain a set of interface functions for implementing the functional components included in the DCS. The generation unit is configured to: edit the editable page composition files imported into the VBA project based on the pre-determined page composition information of the DCS, in order to generate page files deployed on the operator station.

Citation Information

Patent Citations

  • Automatic conversion method for behavior control scripting language

    CN103529773A

  • VBA-based DCS monomer test case automatic generation method

    CN110502441A