TWI806783B - Method of editing report for scada system - Google Patents

Method of editing report for scada system Download PDF

Info

Publication number
TWI806783B
TWI806783B TW111137164A TW111137164A TWI806783B TW I806783 B TWI806783 B TW I806783B TW 111137164 A TW111137164 A TW 111137164A TW 111137164 A TW111137164 A TW 111137164A TW I806783 B TWI806783 B TW I806783B
Authority
TW
Taiwan
Prior art keywords
report
editing
menu
data
scada system
Prior art date
Application number
TW111137164A
Other languages
Chinese (zh)
Other versions
TW202416152A (en
Inventor
楊世睿
王義昕
Original Assignee
台達電子工業股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 台達電子工業股份有限公司 filed Critical 台達電子工業股份有限公司
Priority to TW111137164A priority Critical patent/TWI806783B/en
Application granted granted Critical
Publication of TWI806783B publication Critical patent/TWI806783B/en
Publication of TW202416152A publication Critical patent/TW202416152A/en

Links

Images

Landscapes

  • Testing And Monitoring For Control Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A report editing method for a supervisory control and data acquisition (SCADA) system is disclosed and includes following steps: when a window interface is triggered to open, determining whether a binding label exists in a register of a variable library of the SCADA system; when the binding label exists, reading report data corresponding to the binding label from an edited-data file to import the report data to the window interface; when the binding label does not exist, obtaining multiple items of report information through the window interface to create and store new report data in the edited-data file; and writing a new binding label corresponding to the new report data to the variable library to bind the window interface with the new report data.

Description

用於SCADA系統的報表編輯方法 Report Editing Method Used in SCADA System

本發明涉及SCADA系統,尤其涉及SCADA系統使用的報表編輯方法。 The invention relates to a SCADA system, in particular to a report editing method used by the SCADA system.

資料採取與監控(Supervisory Control and Data Acquisition,SCADA)系統是一種具有程序監控與資料收集能力的系統,一般被應用在各種環境、產線、系統或裝置中,讓管理者可以監控、收集並匯出所需的資料。 Data acquisition and monitoring (Supervisory Control and Data Acquisition, SCADA) system is a system with program monitoring and data collection capabilities, generally used in various environments, production lines, systems or devices, allowing managers to monitor, collect and report Provide the required information.

現行的SCADA系統僅具備將資料庫中的歷史資料匯出以生成固定格式的報表的功能,而無法讓使用者任意地進行匯出條件的設定(頂多允許使用者設定時間參數)。舉例來說,即使一條生產線可被用來生產多項產品,但現行的SCADA系統只能依據使用者選擇的報表種類(例如日報表、周報表等)生成多項產品的綜合報表。意即,報表內容只能對應至生產線的總產量,但無法以產品來進行區分。 The current SCADA system only has the function of exporting the historical data in the database to generate a report in a fixed format, and cannot allow users to arbitrarily set export conditions (at most, allow users to set time parameters). For example, even though a production line can be used to produce multiple products, the current SCADA system can only generate comprehensive reports for multiple products according to the report type selected by the user (such as daily report, weekly report, etc.). That is to say, the content of the report can only correspond to the total output of the production line, but cannot be distinguished by product.

另外,在現行的SCADA系統中,使用者也無法透過視窗介面來對已編輯完成的報表進行資料的複製與修改,亦無法即時新增或刪減報表欄位。 In addition, in the current SCADA system, the user cannot copy and modify the data of the edited report through the window interface, nor can it add or delete report fields in real time.

再者,若使用者欲對資料庫中的歷史資料做條件查詢,通常需在SCADA系統的腳本程式中加入結構化查詢語言(Structured Query Language,以下簡稱SQL)條件式,藉此透過SQL程式來對資料庫中的歷史資料進行條件查詢。然而,若用戶端的管理者或工程師不具備SQL撰寫能力,即無法藉由上述方式來新增SQL條件式。並且,SCADA系統的視窗介面上具有多個物件(例如按鍵、下拉式選單等),而透過上述方式所新增的SQL程式將會散落在不同物件的腳本程式中。如此一來,實途增程式維護的困難度。 Furthermore, if the user wants to perform conditional query on the historical data in the database, it is usually necessary to add a structured query language (Structured Query Language, hereinafter referred to as SQL) conditional expression in the script program of the SCADA system, so as to use the SQL program to Perform conditional query on historical data in the database. However, if the manager or engineer of the client does not have the ability to write SQL, it is impossible to add SQL conditional expressions through the above method. Moreover, there are multiple objects (such as buttons, drop-down menus, etc.) on the window interface of the SCADA system, and the SQL programs added through the above method will be scattered in the script programs of different objects. In this way, the difficulty of program maintenance is increased in practice.

本發明的主要目的,在於提供一種SCADA系統的報表編輯方法,可以讓視窗介面自動匯入綁定的已編輯報表,並且允許使用者對已編輯報表再次進行編輯。 The main purpose of the present invention is to provide a report editing method of a SCADA system, which can allow the window interface to automatically import the bound edited report, and allow the user to edit the edited report again.

為了達成上述的目的,本發明的報表編輯方法包括下列步驟:a)於開啟一視窗介面時,判斷一變數辭典的一暫存器中是否存在一綁定標籤;b)於存在該綁定標籤時,根據該綁定標籤查詢一編輯檔案以讀取該綁定標籤對應的一筆報表資料,並匯入該報表資料至該視窗介面;c)於不存在該綁定標籤時,透過該視窗介面獲得多個報表元件以創建並儲存一筆新報表資料至該編輯檔案,其中該多個報表元件包括一報表名稱、一報表種類、一資料表及多個參數欄位;及d)寫入該新報表資料對應的一新綁定標籤至該變數辭典,以綁定該視窗介面與該新報表。 In order to achieve the above-mentioned purpose, the report editing method of the present invention includes the following steps: a) when opening a window interface, determine whether a binding tag exists in a temporary register of a variable dictionary; b) when the binding tag exists, Query an edit file according to the binding tag to read a report data corresponding to the binding tag, and import the report data to the window interface; c) When the binding tag does not exist, through the window interface Obtain a plurality of report elements to create and save a new report data to the edit file, wherein the plurality of report elements include a report name, a report type, a data table and a plurality of parameter fields; and d) write the new A new binding tag corresponding to the report data is added to the variable dictionary to bind the window interface and the new report.

本發明相較於相關技術所能達到的技術功效在於,SCADA系統可以在預載階段自動將綁定的已編輯報表匯入視窗介面內的各個編輯區中,藉此便於使用者直接匯出報表資料或是對已編輯報表進行再次編輯。 Compared with the related technology, the technical effect of the present invention is that the SCADA system can automatically import the bound edited report into each editing area in the window interface during the preloading stage, so that the user can directly export the report Data or edit the edited report again.

1:SCADA系統 1: SCADA system

2:視窗腳本程式 2: Windows script program

20:視窗介面 20: Windows interface

21:報表元件編輯區 21: Report component editing area

211:報表名稱欄位 211: Report name field

212:報表種類選單 212: Report type menu

213:歷史報表選單 213: Historical report menu

214:資料表選單 214: Data sheet menu

215~218:按鍵 215~218: button

22:欄位編輯區 22: Field editing area

221:欄位選單 221: Field menu

222:編輯欄位預覽 222:Edit field preview

223~228:按鍵 223~228: button

23:時間編輯區 23: Time editing area

24:過濾編輯區 24: Filter editing area

25:已綁定報表顯示區 25: Bound report display area

26:報表顯示區 26: Report display area

3:報表模組 3: Report module

4:資料庫 4: Database

41:編輯檔案 41: Edit File

411:報表資料 411: Report data

412:新報表資料 412: New report data

42:機台檔案 42: Machine file

5:變數辭典 5: variable dictionary

S31~S36、S81~S87、S91~S98、S101~S112:編輯步驟 S31~S36, S81~S87, S91~S98, S101~S112: editing steps

圖1為本發明的系統架構圖的實施例。 FIG. 1 is an embodiment of a system architecture diagram of the present invention.

圖2為本發明的視窗介面示意圖的實施例。 FIG. 2 is an embodiment of a schematic diagram of a window interface of the present invention.

圖3為本發明的編輯流程圖的實施例。 Fig. 3 is an embodiment of the editing flowchart of the present invention.

圖4為本發明的綁定查詢示意圖的實施例。 FIG. 4 is an embodiment of a schematic diagram of a binding query in the present invention.

圖5為本發明的編輯檔案的示意圖的實施例。 FIG. 5 is an embodiment of a schematic diagram of an edited file in the present invention.

圖6為本發明的報表欄位示意圖的實施例。 FIG. 6 is an embodiment of a report field diagram of the present invention.

圖7為本發明的報表新增示意圖的實施例。 FIG. 7 is an embodiment of a schematic diagram of report addition in the present invention.

圖8為本發明的系統操作流程圖的實施例。 FIG. 8 is an embodiment of the system operation flowchart of the present invention.

圖9為本發明的圖8的系統操作流程在預載階段的實施例。 FIG. 9 is an embodiment of the operation flow of the system in FIG. 8 in the preloading stage of the present invention.

圖10為本發明的圖8的系統操作流程在編輯階段的實施例。 FIG. 10 is an embodiment of the operation flow of the system in FIG. 8 in the editing stage of the present invention.

茲就本發明之一較佳實施例,配合圖式,詳細說明如後。 A preferred embodiment of the present invention will be described in detail below in conjunction with the drawings.

本發明揭露了一種資料採取與監控(Supervisory Control and Data Acquisition,SCADA)系統的報表編輯方法(以下簡稱編輯方法)。 The present invention discloses a report editing method (hereinafter referred to as the editing method) of a Supervisory Control and Data Acquisition (SCADA) system.

請參閱圖1,其為本發明的SCADA系統1架構圖的實施例。如圖1所示,針對軟體架構,本發明的SCADA系統1包括視窗腳本程式2、多個 報表模組3以及資料庫4。視窗腳本程式2包括多個編輯區21~24的功能模組,用以接收使用者的字元輸入和選單操作。多個報表模組3對應多個編輯區21~24,用以根據多個編輯區21~24接收到的輸入字元和選單來接入(access)資料庫4。視窗腳本程式2還包括顯示區25、26的功能模組,顯示區25用以顯示已綁定的報表名稱,且顯示區26用以顯示從資料庫4回傳的機台原始資料。 Please refer to FIG. 1 , which is an embodiment of a structure diagram of a SCADA system 1 of the present invention. As shown in Figure 1, for software framework, SCADA system 1 of the present invention comprises window script program 2, a plurality of Report module 3 and database 4. The window script program 2 includes a plurality of function modules in the editing areas 21-24 for receiving character input and menu operations from the user. Multiple report modules 3 correspond to multiple editing areas 21-24, and are used to access the database 4 according to the input characters and menus received by the multiple editing areas 21-24. The window script program 2 also includes functional modules of the display areas 25 and 26 , the display area 25 is used to display the bound report name, and the display area 26 is used to display the machine original data returned from the database 4 .

針對硬體架構(未繪於圖示),SCADA系統1包括至少一個人電腦以及一資料中心。個人電腦包括一處理器、一記憶體、一使用者輸入介面及一顯示器。視窗腳本程式2及多個報表模組3可編譯為程式碼而儲存於記憶體中。處理器耦接於記憶體、使用者輸入介面及顯示器,用以透過使用者輸入介面接收字元輸入和選單操作,並根據使用者輸入執行視窗腳本程式2及多個報表模組3以產生處理結果。顯示器用以呈現多個編輯區21~24及顯示區25、26相關的畫面,並將處理器執行視窗腳本程式2所產生的處理結果呈現於畫面中。資料中心可以是一雲端硬碟或一雲端伺服器,用以實現資料庫4;於一實施例中,個人電腦內建的記憶體可用以實現資料庫4。 Regarding the hardware structure (not shown in the figure), the SCADA system 1 includes at least one personal computer and a data center. The personal computer includes a processor, a memory, a user input interface and a display. The window script program 2 and multiple report modules 3 can be compiled into program codes and stored in the memory. The processor is coupled to the memory, the user input interface and the display, and is used to receive character input and menu operations through the user input interface, and execute the window script program 2 and multiple report modules 3 according to the user input to generate processing result. The display is used for presenting multiple editing areas 21-24 and related pictures of the display areas 25, 26, and presenting the processing results generated by the processor executing the window script program 2 on the pictures. The data center can be a cloud hard disk or a cloud server to realize the database 4; in one embodiment, the built-in memory of the personal computer can be used to realize the database 4.

資料庫4包括編輯檔案41及機台檔案42。於一實施例中,編輯檔案41用來記錄並儲存已編輯報表的報表資料,而機台檔案42用來記錄並儲存SCADA系統1的原始資料(raw data),例如產線上的多個機台的統計資料、歷史資料等。 The database 4 includes editing files 41 and machine files 42 . In one embodiment, the editing file 41 is used to record and store the report data of the edited report, and the machine file 42 is used to record and store the raw data (raw data) of the SCADA system 1, such as multiple machines on the production line statistics, historical data, etc.

請參閱圖2,其為本發明的視窗介面20示意圖的實施例。如圖2所示,當視窗腳本程式2執行時,可開啟視窗介面20,視窗介面20顯示多個編 輯區21~24,使用者可透過編輯區21~24輸入字元或操作選單,以編輯多種報表。 Please refer to FIG. 2 , which is an embodiment of a schematic diagram of a window interface 20 of the present invention. As shown in Figure 2, when the window script program 2 is executed, the window interface 20 can be opened, and the window interface 20 displays a plurality of editors. Editing areas 21~24, users can input characters or operate menus through editing areas 21~24 to edit various reports.

具體地,編輯區21~24用來將接收到的字元或選單內容輸入到視窗腳本程式2中對應的功能模組、函數或子程式,以呼叫報表模組3接入資料庫4,進而從資料庫4中獲得對應的資料。於一實施例中,視窗腳本程式2可執行於多個視窗介面20中,讓使用者在多個視窗介面20編輯並匯出多個報表。 Specifically, the editing areas 21-24 are used to input the received characters or menu content into the corresponding function module, function or subroutine in the window script program 2, so as to call the report module 3 to access the database 4, and then Get the corresponding data from database 4. In one embodiment, the window script program 2 can be executed in multiple window interfaces 20 , allowing users to edit and export multiple reports on the multiple window interfaces 20 .

值得注意的是,報表模組3是以SQL為基礎而建立的,透過SQL函數或指令,報表模組3可以依據使用者設定的條件來查詢資料庫4,以獲得所需的資料。透過報表模組3的建立,使用者不需要具備SQL的編碼能力,就可以直接使用視窗腳本程式2上的編輯區21~24來對SCADA系統1的資料庫4進行條件式查詢。如此一來,有利於使用者對報表的格式、欄位及內容進行編輯。並且,當系統管理員或開發者需要對SQL程式進行維護時,只需要對報表模組3進行更新即可,不需要遍尋視窗腳本程式2中的各個編輯區21~24的程式碼。藉此,有效提高了程式維護的便利性。 It is worth noting that the report module 3 is established based on SQL. Through SQL functions or commands, the report module 3 can query the database 4 according to the conditions set by the user to obtain the required data. Through the establishment of the report module 3, the user does not need to have SQL coding ability, and can directly use the editing areas 21-24 on the window script program 2 to perform conditional query on the database 4 of the SCADA system 1. In this way, it is beneficial for the user to edit the format, columns and content of the report. Moreover, when the system administrator or developer needs to maintain the SQL program, it is only necessary to update the report module 3, and there is no need to search for the program codes in each editing area 21-24 in the window script program 2. In this way, the convenience of program maintenance is effectively improved.

如圖2所示,視窗介面20顯示了報表元件編輯區21、欄位編輯區22、時間編輯區23、過濾編輯區24、已綁定報表顯示區25及報表顯示區26。於圖2的實施例中,多個編輯區21~24包括輸入欄位以及下拉式選單,但不以此為限。 As shown in FIG. 2 , the window interface 20 displays a report component editing area 21 , field editing area 22 , time editing area 23 , filter editing area 24 , bound report display area 25 and report display area 26 . In the embodiment of FIG. 2 , the multiple editing areas 21-24 include input fields and drop-down menus, but not limited thereto.

報表元件編輯區21用以接收字元輸入和選單操作,包括報表名稱欄位211、報表種類選單212、歷史報表選單213及資料表選單214。報表名稱欄位211為輸入欄位,用以讓使用者輸入報表名稱。報表種類選單212、歷史報表選單213及資料表選單214為下拉式選單,但不以此為限。報表種類選單 212用以讓使用者選擇所需的報表種類,例如為日報表、周報表、月報表、時間間隔報表、稼動率報表、直通率報表、良率報表及產能利用率報表等。歷史報表選單213用以讓使用者選擇先前已生成並儲存的歷史報表。資料表選單214用以讓使用者選擇所需的報表種類或歷史報表所對應的資料表。資料表對應至SCADA系統1的所在環境(例如工廠)中的一個特定產品類別(例如溫控器或馬達螺桿等),因而不同的資料表會包括不同數量及種類的參數欄位,各個參數欄位分別記錄例如產品密度、產品厚度、產品寬度、能耗、生產力及線速度等參數,但不以此為限。 The report component editing area 21 is used to receive character input and menu operations, including a report name field 211 , a report type menu 212 , a historical report menu 213 and a data table menu 214 . The report name field 211 is an input field for allowing the user to input a report name. The report type menu 212, the historical report menu 213 and the data table menu 214 are drop-down menus, but not limited thereto. Report Type Menu 212 is used to allow the user to select the desired report type, for example, daily report, weekly report, monthly report, time interval report, utilization rate report, through-through rate report, yield rate report, capacity utilization rate report, etc. The historical report menu 213 is used for allowing the user to select a previously generated and stored historical report. The data table menu 214 is used to allow the user to select the required report type or the data table corresponding to the historical report. The data sheet corresponds to a specific product category (such as a thermostat or a motor screw, etc.) in the environment where the SCADA system 1 is located (such as a factory), so different data sheets will include different numbers and types of parameter columns, and each parameter column Bits respectively record parameters such as product density, product thickness, product width, energy consumption, productivity and line speed, but not limited thereto.

報表元件編輯區21還包括多個按鍵215、216、217、218。按鍵215用以觸發視窗腳本程式2根據報表名稱欄位211、報表種類選單212、歷史報表選單213及資料表選單214的設定來綁定報表,使得已綁定報表顯示區25顯示已綁定報表的名稱。按鍵216用以解除綁定報表。按鍵217用以清除報表名稱欄位211、報表種類選單212、歷史報表選單213及資料表選單214的設定,以及清除編輯檔案41中的一筆報表資料411(繪於圖5)。按鍵218用以儲存視窗介面20中目前的所有輸入資料到編輯檔案41。 The report component editing area 21 also includes a plurality of buttons 215 , 216 , 217 , 218 . The button 215 is used to trigger the window script program 2 to bind the report according to the setting of the report name column 211, the report type menu 212, the historical report menu 213 and the data table menu 214, so that the bound report display area 25 displays the bound report The name. Button 216 is used to unbind the report. The button 217 is used to clear the setting of the report name column 211, the report type menu 212, the historical report menu 213 and the data table menu 214, and clear a report data 411 in the editing file 41 (drawn in FIG. 5 ). The button 218 is used to save all current input data in the window interface 20 to the editing file 41 .

欄位編輯區22用以接收選單操作,包括欄位選單221及編輯欄位預覽222。欄位選單221提供多個參數或項目讓使用者選擇,並將使用者選擇的參數或項目添加到編輯欄位預覽222中,藉此編輯並預覽一個報表的多個參數欄位。 The column editing area 22 is used for receiving menu operations, including a column menu 221 and an edit column preview 222 . The field menu 221 provides multiple parameters or items for the user to select, and the parameters or items selected by the user are added to the edit field preview 222, thereby editing and previewing multiple parameter fields of a report.

欄位編輯區22還包括多個按鍵223~228。按鍵223用以將欄位選單221包括的參數或項目全部匯入編輯欄位預覽222。按鍵224用以將編輯欄位預覽222顯示的參數或項目全部清空(empty)。按鍵225用以從編輯欄位預 覽222刪除欄位選單221選擇的參數或項目。按鍵226用以從編輯欄位預覽222將欄位選單221選擇的參數或項目向前位移,以調整項目排序。按鍵227用以觸發視窗腳本程式2根據報表元件編輯區21、欄位編輯區22、時間編輯區23、過濾編輯區24的設定,從資料庫4查詢對應的報表資料,並將查詢結果顯示於報表顯示區26。按鍵228用以觸發視窗腳本程式2匯出報表。 The column editing area 22 also includes a plurality of buttons 223 - 228 . The button 223 is used to import all the parameters or items included in the field menu 221 into the edit field preview 222 . The button 224 is used to empty all the parameters or items displayed in the edit field preview 222 . Button 225 is used to preview from the edit field View 222 deletes the parameter or item selected in column menu 221. The button 226 is used to move forward the parameter or item selected in the field menu 221 from the edit field preview 222 to adjust the order of the items. The button 227 is used to trigger the window script program 2 to query the corresponding report data from the database 4 according to the settings of the report element editing area 21, column editing area 22, time editing area 23, and filter editing area 24, and display the query results on Report display area 26 . The button 228 is used to trigger the window script program 2 to export the report.

時間編輯區23用以設定一過濾時間,過濾時間是一個特定時間或是一段時間區間,藉此過濾匯出報表的時間範圍。 The time editing area 23 is used to set a filter time, and the filter time is a specific time or a period of time, so as to filter the time range of the exported report.

過濾編輯區24用以對欄位選單221選擇的一或多個參數或項目設定過濾條件(例如大於、等於或小於特定數值的多個組合等),藉此過濾匯出報表的數值範圍。 The filter editing area 24 is used to set filter conditions (such as multiple combinations greater than, equal to or less than a specific value) for one or more parameters or items selected in the field menu 221, thereby filtering the value range of the exported report.

報表顯示區26用以顯示編輯欄位預覽222的設定及報表模組3的查詢結果。詳細來說,視窗腳本程式2根據報表元件編輯區21、欄位編輯區22、時間編輯區23、過濾編輯區24的設定,透過報表模組3從資料庫4查詢對應的報表資料,並將查詢結果顯示於報表顯示區26(如圖2的下半部所示)。 The report display area 26 is used for displaying the setting of the editing field preview 222 and the query result of the report module 3 . Specifically, the window script program 2 queries the corresponding report data from the database 4 through the report module 3 according to the settings of the report element editing area 21, field editing area 22, time editing area 23, and filter editing area 24, and sends The query result is displayed in the report display area 26 (as shown in the lower part of FIG. 2 ).

惟,上述僅為本發明的一個具體實施範例,於其他實施例中,使用者可以根據需求進行以下操作中的任意組合,包括設定報表的欄位、直接匯出歷史報表、設定過濾條件、設定時間參數、編輯歷史報表及創建新報表。 However, the above is only a specific implementation example of the present invention. In other embodiments, the user can perform any combination of the following operations according to the requirements, including setting the fields of the report, directly exporting the historical report, setting the filter condition, setting Time parameters, editing historical reports and creating new reports.

本發明的其中一個技術特徵在於,當使用者透過報表元件編輯區21、欄位編輯區22、時間編輯區23與過濾編輯區24完成一個編輯報表後,可儲存該編輯報表的報表資料和綁定標籤至編輯檔案41並綁定視窗介面20與綁定標籤。當使用者再次執行此視窗腳本程式2時,SCADA系統1可以根據已存在的綁定標籤來查詢編輯檔案41以獲得對應的報表資料,並且自動匯入綁定標 籤對應的多個報表元件至視窗介面20的多個編輯區21~24。藉此,使用者不需要從空白報表開始編輯一個新報表。並且,透過視窗介面20上的多個編輯區21~24,使用者可以對已編輯報表進行再次編輯,以實現更彈性化的報表使用情境。 One of the technical features of the present invention is that after the user finishes editing a report through the report element editing area 21, field editing area 22, time editing area 23 and filter editing area 24, the report data and bindings of the edited report can be stored. Set the label to the edit file 41 and bind the window interface 20 with the binding label. When the user executes the window script program 2 again, the SCADA system 1 can query and edit the file 41 according to the existing binding tags to obtain corresponding report data, and automatically import the binding tags Mark the corresponding multiple report components to the multiple editing areas 21-24 of the window interface 20. In this way, users do not need to start editing a new report from a blank report. Moreover, through the multiple editing areas 21-24 on the window interface 20, the user can re-edit the edited report, so as to realize a more flexible use situation of the report.

請參閱圖3,其為本發明的編輯流程圖的實施例。圖3的編輯流程可應用於如圖1所示的SCADA系統1,並且透過如圖1所示的視窗腳本程式2與圖2所示的視窗介面20來實現。 Please refer to FIG. 3 , which is an embodiment of the editing flowchart of the present invention. The editing flow shown in FIG. 3 can be applied to the SCADA system 1 shown in FIG. 1 and realized through the window script program 2 shown in FIG. 1 and the window interface 20 shown in FIG. 2 .

如圖3所示,由SCADA系統1的視窗腳本程式2判斷變數辭典的暫存器是否存在綁定標籤(步驟S31)。意即,視窗腳本程式2判斷變數辭典是否為空值(Null)或存在無效字串(例如###)。若變數辭典為空值或存在無效字串,代表不具有綁定標籤;若變數辭典存在有效字串,代表存在綁定標籤。 As shown in FIG. 3 , the window script program 2 of the SCADA system 1 judges whether there is a binding tag in the register of the variable dictionary (step S31 ). That is, the window script program 2 judges whether the variable dictionary is empty (Null) or there is an invalid character string (such as ###). If the variable dictionary is empty or there is an invalid string, it means that there is no binding tag; if there is a valid string in the variable dictionary, it means that there is a binding tag.

於一實施例中,綁定標籤是以字串(string)型態記錄於變數辭典中。若變數辭典中存在綁定標籤,代表資料庫4儲存了一個已綁定報表。若變數辭典中不存在綁定標籤,代表資料庫4沒有儲存已綁定報表。 In one embodiment, the binding tag is recorded in the variable dictionary as a string. If there is a binding tag in the variable dictionary, it means that the database 4 stores a bound report. If there is no binding tag in the variable dictionary, it means that the database 4 does not store the bound report.

若變數辭典中不存在綁定標籤,則使用者需要從空白報表創建一筆新報表資料。於不存在綁定標籤時,由視窗腳本程式2透過視窗介面20接收使用者的操作,獲得使用者輸入或設定的多個報表元件(步驟S32),以從空白報表創建一份新報表。於使用者輸入與設定完成後,視窗腳本程式2儲存多個報表元件為一筆新報表資料至編輯檔案41(步驟S33)。並且,視窗腳本程式2寫入新報表資料對應的新綁定標籤至變數辭典(步驟S34),以綁定視窗介面20與新報表資料。報表資料及新報表資料分別包括多個報表元件,多個報表元件包括一報表名稱、一報表種類、一資料表及多個參數欄位。 If there is no binding tag in the variable dictionary, the user needs to create a new report data from a blank report. When there is no binding tag, the window script program 2 receives the user's operation through the window interface 20, and obtains a plurality of report elements input or set by the user (step S32), so as to create a new report from the blank report. After the user input and setting are completed, the window script program 2 stores a plurality of report elements as a new report data to the edit file 41 (step S33). And, the window script program 2 writes a new binding tag corresponding to the new report data into the variable dictionary (step S34 ), so as to bind the window interface 20 and the new report data. The report data and the new report data respectively include a plurality of report elements, and the plurality of report elements include a report name, a report type, a data table and a plurality of parameter fields.

若於步驟S31判斷存在綁定標籤時,視窗腳本程式2根據綁定標籤查詢SCADA系統1的編輯檔案41以讀取綁定標籤對應的報表資料(步驟S35)。並且,視窗腳本程式2自動匯入報表資料的多個報表元件至視窗介面20的多個編輯區21~24(步驟S36)。藉此,使用者不需要從空白報表創建一份新報表。 If it is determined in step S31 that there is a binding tag, the window script program 2 queries the editing file 41 of the SCADA system 1 according to the binding tag to read the report data corresponding to the binding tag (step S35 ). Moreover, the window script program 2 automatically imports multiple report elements of the report data to the multiple editing areas 21-24 of the window interface 20 (step S36). This way, users do not need to create a new report from a blank report.

於一實施例中,綁定標籤為報表資料的報表名稱。當使用者完成一份編輯報表並且按下綁定按鍵215後,視窗腳本程式2寫入當前的報表名稱至變數辭典的暫存器,以完成綁定動作。 In one embodiment, the binding tag is a report name of the report data. When the user finishes editing a report and presses the binding button 215, the window script program 2 writes the name of the current report into the register of the variable dictionary to complete the binding action.

請參閱圖4,其為本發明的綁定查詢示意圖的實施例。於圖4的實施例中,SCADA系統1的變數辭典5的暫存器中記錄了一個報表名稱(圖4中以test_week_report為例)。在預載階段中,視窗腳本程式2會先依據報表名稱(即,綁定標籤)查詢編輯檔案41,以讀取此報表名稱對應的多個報表元件,並且匯入多個報表元件至視窗介面20。例如,報表名稱欄位211匯入了報表名稱test_week_report,報表種類選單212匯入了周報表,歷史報表選單213匯入了test_week_report,資料表選單214匯入了DIV_test1021,編輯欄位預覽222匯入了產品密度(product_D)、產品厚度(product_T)、產品寬度(product_W)、能耗(elect_show)、產能(Production)及線速度(Line_Speed)等項目。過濾編輯區24匯入了“產品密度等於1000(product_D=1000)”及“產品厚度大於等於100(product_T>=100)”的條件。藉此,使用者不需要從空白報表創建一份新報表。 Please refer to FIG. 4 , which is an embodiment of a schematic diagram of a bound query in the present invention. In the embodiment of FIG. 4 , a report name (test_week_report is taken as an example in FIG. 4 ) is recorded in the temporary register of the variable dictionary 5 of the SCADA system 1 . In the preloading stage, the window script program 2 will first query and edit the file 41 according to the report name (ie, the binding label), so as to read the multiple report elements corresponding to the report name, and import the multiple report elements into the window interface 20. For example, the report name field 211 imports the report name test_week_report, the report type menu 212 imports the weekly report, the historical report menu 213 imports test_week_report, the data table menu 214 imports DIV_test1021, and the edit field preview 222 imports Items such as product density (product_D), product thickness (product_T), product width (product_W), energy consumption (elect_show), production capacity (Production) and line speed (Line_Speed). The filtering editing area 24 imports the conditions of "product density is equal to 1000 (product_D=1000)" and "product thickness is greater than or equal to 100 (product_T>=100)". This way, users do not need to create a new report from a blank report.

請參閱圖5,其為本發明的編輯檔案41的示意圖的實施例。如圖5所示,編輯檔案41包括多個資料列(row),每一資料列中分別記錄一筆報表資料411。報表資料411包括時間戳記、報表名稱、編輯欄位、報表種類、 資料表及過濾條件等資料欄位。本領域的技術人員可根據實際需求增加或刪減報表資料411包括的資料欄位,但不以上述為限。 Please refer to FIG. 5 , which is an embodiment of the schematic diagram of the editing file 41 of the present invention. As shown in FIG. 5 , the editing file 41 includes a plurality of data rows (rows), each of which records a report data 411 respectively. Report data 411 includes time stamp, report name, edit field, report type, Data fields such as data tables and filter conditions. Those skilled in the art can add or delete data fields included in the report data 411 according to actual needs, but not limited to the above.

概念上,一筆報表資料411中的多個報表元件可視為多個綁定在一起的標籤組,相互之間存有綁定關係。視窗腳本程式2可透過綁定標籤(即,報表名稱)於編輯檔案41中查詢到相關的標籤組(即,時間戳記、編輯欄位、報表種類、資料表及過濾條件等報表元件),接著將一筆報表資料411中的所有標籤匯入到對應的函數,使得視窗介面20可顯示相對應的匯入結果。 Conceptually, a plurality of report elements in a report data 411 can be regarded as a plurality of bound label groups, and there is a binding relationship between them. The window script program 2 can query the relevant label group (ie, report elements such as time stamp, edit field, report type, data table and filter condition) in the edit file 41 through the bound label (ie, report name), and then Import all tags in a report data 411 into the corresponding function, so that the window interface 20 can display the corresponding import result.

詳細來說,視窗腳本程式2判斷SCADA系統1的變數辭典5的暫存器中存在綁定標籤test_week_report(圖3的步驟S31)。接著在預載階段中,視窗腳本程式2根據綁定標籤test_week_report查詢編輯檔案41,以讀取與其綁定的報表資料411(圖3的步驟S35)。並且,視窗腳本程式2自動匯入報表資料411的多個報表元件至視窗介面20的多個編輯區21~24(圖3的步驟S36)。例如,將報表名稱匯入歷史報表選單213、將報表種類匯入報表種類選單212、將資料表匯入資料表選單214,將多個參數欄位匯入欄位選單221及編輯欄位預覽222,將至少一過濾條件匯入過濾編輯區24,及將過濾時間匯入時間編輯區23。 Specifically, the Windows script program 2 judges that the bound label test_week_report exists in the register of the variable dictionary 5 of the SCADA system 1 (step S31 of FIG. 3 ). Then in the preloading stage, the window script program 2 queries the editing file 41 according to the binding tag test_week_report to read the bound report data 411 (step S35 in FIG. 3 ). Moreover, the window script program 2 automatically imports the multiple report elements of the report data 411 into the multiple editing areas 21-24 of the window interface 20 (step S36 in FIG. 3 ). For example, import the report name into the historical report menu 213, import the report type into the report type menu 212, import the data table into the data table menu 214, import multiple parameter fields into the field menu 221 and edit field preview 222 , import at least one filter condition into the filter edit area 24 , and import the filter time into the time edit area 23 .

請參閱圖6,其為本發明的報表欄位示意圖的實施例。承圖5,視窗腳本程式2自動匯入報表資料411的編輯欄位的多個項目至視窗介面20中的欄位編輯區22。例如,將產品密度(product_D)、產品厚度(product_T)、產品寬度(product_W)、能耗(elect_show)、產能(Production)、線速度(Line_Speed)等項目匯入至欄位選單221的下拉式選單及編輯欄位預覽222。藉此,使用者 不需要輸入任何資訊,即可在視窗介面20開啟後,自動獲得一份被綁定的已編輯報表。 Please refer to FIG. 6 , which is an embodiment of the report field diagram of the present invention. Referring to FIG. 5 , the window script program 2 automatically imports multiple items in the edit field of the report data 411 to the field edit area 22 in the window interface 20 . For example, import items such as product density (product_D), product thickness (product_T), product width (product_W), energy consumption (elect_show), production capacity (Production), and line speed (Line_Speed) into the drop-down menu of the field menu 221 and edit field preview 222 . Thus, the user Without inputting any information, a bound edited report can be automatically obtained after the window interface 20 is opened.

請參閱圖7,其為本發明的報表新增示意圖的實施例。如圖7所示,當新報表編輯完成後(例如,修改報表名稱為TEST_時間間隔報表,並增加過濾條件product_D=1000),使用者可按下按鍵218來儲存欄位,藉此儲存視窗介面20中的所有輸入資料到編輯檔案41,以做為一筆新報表資料412(其中新報表資料412包括過濾條件product_D=1000)。當使用者按下按鍵215以綁定報表時,視窗腳本程式2寫入新綁定標籤(例如為TEST_時間間隔報表)至變數辭典5的暫存器,以完成綁定。 Please refer to FIG. 7 , which is an embodiment of a schematic diagram of report addition in the present invention. As shown in Figure 7, after editing the new report (for example, modify the report name to TEST_time interval report, and add the filter condition product_D=1000), the user can press the button 218 to save the field, thereby saving the window All the input data in the interface 20 are sent to the editing file 41 as a new report data 412 (the new report data 412 includes the filter condition product_D=1000). When the user presses the button 215 to bind the report, the window script program 2 writes a new binding tag (such as TEST_time interval report) to the register of the variable dictionary 5 to complete the binding.

於完成綁定後,視窗腳本程式2將新綁定標籤(例如為新報表的報表名稱)顯示於已綁定報表顯示區25上以通知綁定完成。當使用者下一次執行視窗腳本程式2時,視窗腳本程式2將匯入新綁定標籤對應的新報表資料412。 After the binding is completed, the window script program 2 displays the new binding label (for example, the report name of the new report) on the bound report display area 25 to notify that the binding is completed. When the user executes the window script program 2 next time, the window script program 2 will import the new report data 412 corresponding to the new binding tag.

請參閱圖8,其為本發明的系統操作流程圖的實施例。圖8所示的流程應用於如圖1與圖2所示的SCADA系統1、視窗腳本程式2與視窗介面20。本發明的系統操作流程包括預載階段與編輯階段。 Please refer to FIG. 8 , which is an embodiment of the system operation flowchart of the present invention. The process shown in FIG. 8 is applied to the SCADA system 1 , the window script program 2 and the window interface 20 shown in FIGS. 1 and 2 . The system operation process of the present invention includes a preloading stage and an editing stage.

在預載階段中,視窗腳本程式2會先驗證使用者的權限(步驟S81)。於一實施例中,視窗腳本程式2會在判斷使用者具有編輯權限(例如為工廠的管理者或電控工程師)時,開通編輯區21~24來提供報表的編輯、儲存及綁定功能。若視窗腳本程式2判斷使用者不具有編輯權限(例如為一般作業員)時,則僅提供報表查閱及匯出的功能,也就是說不具有編輯權限的使用者不能對報表的格式、內容及欄位進行編輯。 In the preloading phase, the window script program 2 will first verify the user's authority (step S81). In one embodiment, the window script program 2 will open the editing areas 21-24 to provide report editing, storage and binding functions when it is judged that the user has editing authority (such as a factory manager or an electrical control engineer). If the window script program 2 judges that the user does not have the editing authority (such as a general operator), it only provides the report query and export functions, that is to say, the user who does not have the editing authority cannot modify the report format, content and field to edit.

接著,視窗腳本程式2判斷有無已綁定的報表(步驟S82)。具體地,視窗腳本程式2接入變數辭典5的暫存器,以判斷變數辭典5中是否存在綁定標籤。若變數辭典5中存在綁定標籤,則視窗腳本程式2依據圖3所示的步驟來從編輯檔案41中取得綁定標籤所對應的報表資料,並自動匯入報表資料中的多個報表元件至對應的多個編輯區21~24以顯示於視窗介面20。若於步驟S82中判斷沒有已綁定的報表,則視窗介面20顯示空白的編輯區21、23、~24,其中視窗腳本程式2根據資料表選單214選擇的資料表,從機台檔案42讀取資料表對應的多個參數欄位,以匯入多個參數欄位至欄位選單221。 Next, the window script program 2 judges whether there is a bound report (step S82). Specifically, the Windows script program 2 accesses the register of the variable dictionary 5 to determine whether there is a binding tag in the variable dictionary 5 . If there is a binding tag in the variable dictionary 5, then the window script program 2 obtains the report data corresponding to the binding tag from the editing file 41 according to the steps shown in FIG. 3 , and automatically imports a plurality of report elements in the report data. to the corresponding multiple editing areas 21-24 to be displayed on the window interface 20. If it is judged in step S82 that there is no bound report, then the window interface 20 displays blank editing areas 21, 23, ~24, wherein the window script program 2 reads from the machine file 42 according to the data table selected by the data table menu 214. Get multiple parameter fields corresponding to the data table, so as to import multiple parameter fields to the field menu 221 .

在編輯階段中,視窗腳本程式2透過報表種類選單212接收使用者的操作,以選擇所需的報表種類(步驟S83),並且透過歷史報表選單213接收使用者的操作,以從編輯檔案41查詢被選擇的報表種類下的多個歷史報表,並選擇多個歷史報表的其中之一(步驟S84)。於一實施例中,視窗腳本程式2可以在匯入已綁定的報表資料後,自動填入歷史報表的報表名稱至報表名稱欄位211。於另一實施例中,若視窗腳本程式2判斷不具有已綁定的報表,則使用者需自行輸入報表名稱至報表名稱欄位211。 In the editing stage, the window script program 2 receives the user's operation through the report type menu 212 to select the required report type (step S83), and receives the user's operation through the historical report menu 213 to query from the edited file 41 multiple historical reports under the selected report category, and select one of the multiple historical reports (step S84). In one embodiment, the window script program 2 can automatically fill the report name of the historical report into the report name field 211 after importing the bound report data. In another embodiment, if the window script program 2 determines that there is no bound report, the user needs to input the report name into the report name field 211 .

步驟S84後,視窗腳本程式2匯入被選擇的歷史報表對應的資料表至資料表選單214中,以供使用者選擇。 After step S84, the window script program 2 imports the data table corresponding to the selected historical report into the data table menu 214 for selection by the user.

當使用者完成資料表的選擇後,視窗腳本程式2於機台檔案42查詢被選擇的資料表所包括的多個參數欄位,並且匯入多個參數欄位至欄位選單221。藉此,視窗腳本程式2可透過欄位選單221接收使用者的操作,以新增、移除或位移參數欄位並同步顯示於編輯欄位預覽222(步驟s85)。 After the user completes the selection of the data table, the window script program 2 queries the multiple parameter fields included in the selected data table in the machine file 42 , and imports the multiple parameter fields to the field menu 221 . In this way, the window script program 2 can receive the user's operation through the field menu 221 to add, remove or shift the parameter field and simultaneously display it on the edit field preview 222 (step s85 ).

視窗腳本程式2還可透過過濾編輯區24接收使用者的操作,以對分別為各個參數欄位設定過濾條件。其中,所述過濾條件是在視窗腳本程式2對機台檔案42進行查詢時所使用,用以限定資料的數值範圍。於一實施例中,過濾編輯區24將過濾條件記錄為一串SQL程式。本實施例中,過濾編輯區24可藉由對應的報表模組3使用SQL程式的過濾條件來查詢機台檔案42。 The window script program 2 can also receive user operations through the filter editing area 24 to set filter conditions for each parameter field. Wherein, the filter condition is used when the window script program 2 queries the machine file 42, and is used to limit the value range of the data. In one embodiment, the filter editing area 24 records the filter conditions as a series of SQL programs. In this embodiment, the filter editing area 24 can query the machine file 42 through the corresponding report module 3 using the filter conditions of the SQL program.

步驟S85後,使用者可以觸發視窗介面20上的儲存欄位按鍵218,以儲存視窗介面20的當前狀態為一份新編輯報表,並對應地儲存一筆新報表資料至編輯檔案41(步驟S86)。 After step S85, the user can trigger the save column button 218 on the window interface 20 to save the current state of the window interface 20 as a new edited report, and store a new report data correspondingly to the edited file 41 (step S86) .

另外,由於使用者已經透過步驟S83至步驟S85對報表進行了編輯(即,產生了新報表資料412),因此使用者可以觸發視窗介面20上的綁定報表按鍵215,讓視窗腳本程式2寫入新報表資料412對應的新綁定標籤至變數辭典5的暫存器,以綁定新報表資料412(步驟S87)。 In addition, since the user has edited the report through steps S83 to S85 (that is, new report data 412 has been generated), the user can trigger the binding report button 215 on the window interface 20 to allow the window script program 2 to write Import the new binding tag corresponding to the new report data 412 into the temporary register of the variable dictionary 5, so as to bind the new report data 412 (step S87).

請參閱圖9,其為本發明的圖8的系統操作流程在預載階段的實施例。圖9所示的流程應用於如圖1與圖2所示的SCADA系統1與視窗腳本程式2,並包括以下步驟: Please refer to FIG. 9 , which is an embodiment of the system operation process in FIG. 8 in the preloading stage of the present invention. The flow shown in Figure 9 is applied to the SCADA system 1 and the Windows script program 2 shown in Figures 1 and 2, and includes the following steps:

步驟S91:判斷是否為作業員?若是,進行步驟S92;若否,進行步驟S94。 Step S91: Determine whether it is an operator? If yes, go to step S92; if not, go to step S94.

步驟S92:匯入報表名稱。 Step S92: Import the name of the report.

步驟S93:匯入資料表。結束。 Step S93: Import the data table. Finish.

步驟S94:判斷是否有綁定標籤?若是,進行步驟S95;若否,結束。 Step S94: Determine whether there is a binding tag? If yes, go to step S95; if not, end.

步驟S95:匯入報表名稱。 Step S95: Import the name of the report.

步驟S96:匯入報表種類。 Step S96: importing report types.

步驟S97:匯入資料表。 Step S97: Import the data table.

步驟S98:匯入報表的欄位資料。結束。 Step S98: importing the field data of the report. Finish.

於步驟S91,視窗腳本程式2判斷當前登入的使用者是否為作業員,以驗證使用者的權限(即,圖8的步驟S81)。若判斷當前登入的使用者為作業員,視窗腳本程式2於步驟S92、S93自動匯入從編輯檔案41中讀取任意或指定的歷史報表,並匯入歷史報表的報表名稱及資料表至視窗介面20中,並結束預載階段。若判斷當前登入的使用者不是作業員,視窗腳本程式2於步驟S94判斷是存在綁定標籤(即,圖8的步驟S82)。若判斷存在綁定標籤,視窗腳本程式2於步驟S95至S98自動匯入報表名稱、報表種類、資料表及已綁定報表的欄位資料(即多個參數欄位)於視窗介面20中,並結束預載階段。若判斷不存在綁定標籤,視窗腳本程式2結束預載階段。簡言之,圖9的步驟S91至S93為圖8的步驟S81的詳細步驟,且步驟S91至S94為圖8的步驟S82的詳細步驟。 In step S91, the window script program 2 judges whether the currently logged-in user is an operator to verify the user's authority (that is, step S81 of FIG. 8 ). If it is judged that the currently logged-in user is an operator, the window script program 2 automatically imports any or specified historical reports from the edited file 41 in steps S92 and S93, and imports the report names and data tables of the historical reports to the window interface 20, and end the preloading phase. If it is determined that the currently logged-in user is not an operator, the window script program 2 determines in step S94 that there is a binding tag (that is, step S82 of FIG. 8 ). If it is judged that there is a binding label, the window script program 2 automatically imports the field data (ie, a plurality of parameter fields) of the report name, report type, data sheet and bound report in the window interface 20 in steps S95 to S98, And end the preload phase. If it is determined that there is no binding tag, the window script program 2 ends the preloading phase. In short, steps S91 to S93 of FIG. 9 are detailed steps of step S81 of FIG. 8 , and steps S91 to S94 are detailed steps of step S82 of FIG. 8 .

請參閱圖10,其為本發明的圖8的系統操作流程在編輯階段的實施例。圖10所示的流程應用於如圖1與圖2所示的SCADA系統1、視窗腳本程式2與視窗介面20,並包括以下步驟: Please refer to FIG. 10 , which is an embodiment of the system operation flow in FIG. 8 in the editing stage of the present invention. The process shown in FIG. 10 is applied to the SCADA system 1, the window script program 2 and the window interface 20 shown in FIGS. 1 and 2, and includes the following steps:

步驟S101:選擇報表種類。 Step S101: Select a report type.

步驟S102:判斷是否存在歷史報表?若是,進行步驟S60;若否,進行步驟S56。 Step S102: Determine whether there is a historical report? If yes, go to step S60; if not, go to step S56.

步驟S103:編輯報表名稱。 Step S103: Edit the name of the report.

步驟S104:選擇資料表。進行步驟S68。 Step S104: Select a data table. Go to step S68.

步驟S105:選擇歷史報表。 Step S105: Select a historical report.

步驟S106:匯入報表名稱。 Step S106: Import the name of the report.

步驟S107:匯入資料表。 Step S107: Import the data table.

步驟S108:匯入欄位資料。 Step S108: Import field data.

步驟S109:編輯欄位資料。 Step S109: Edit field data.

步驟S110:設定過濾條件。 Step S110: Set filter conditions.

步驟S111:儲存新報表資料。 Step S111: Store the new report data.

步驟S112:綁定新報表資料。結束。 Step S112: Binding new report data. Finish.

於步驟S101,視窗腳本程式2根據使用者輸入來選擇報表種類。於步驟S102,視窗腳本程式2根據選擇的報表種類,查詢編輯檔案41是否存在歷史報表。若已存在多個歷史報表,視窗腳本程式2於步驟S105、S106、S107、S108根據選擇的歷史報表自動匯入報表名稱、資料表及欄位資料(即多個參數欄位)。若不存在任何歷史報表,視窗腳本程式2於步驟S103、S104透過視窗介面20接收使用者編輯報表名稱及選擇資料表;此外,視窗腳本程式2從機台檔案42讀取資料表對應的編輯欄位,以匯入多個參數欄位至欄位選單221。 In step S101, the window script program 2 selects a report type according to user input. In step S102, the window script program 2 inquires whether there is a historical report in the edited file 41 according to the selected report type. If there are multiple historical reports, the window script program 2 automatically imports the report name, data table and field data (ie, multiple parameter fields) according to the selected historical reports in steps S105, S106, S107, and S108. If there is no historical report, the window script program 2 receives the user to edit the report name and select the data table through the window interface 20 in steps S103 and S104; in addition, the window script program 2 reads the edit column corresponding to the data table from the machine file 42 to import multiple parameter fields to the field menu 221.

於步驟S109、S110,視窗腳本程式2透過視窗介面20接收使用者編輯的欄位資料及使用者設定的過濾條件。於步驟S111、S112,視窗腳本程式2儲存新報表資料並綁定新報表資料。關於圖8、圖9、圖10的詳細操作請參考圖1至圖7的相關說明,於此不贅述。 In steps S109 and S110 , the window script program 2 receives the field data edited by the user and the filtering conditions set by the user through the window interface 20 . In steps S111 and S112, the window script program 2 stores the new report data and binds the new report data. For the detailed operations in FIG. 8 , FIG. 9 , and FIG. 10 , please refer to the relevant descriptions in FIG. 1 to FIG. 7 , and details are not repeated here.

綜上所述,於本發明中,一筆報表資料中的多個項目可視為多個綁定在一起的標籤組,相互之間存有綁定關係。視窗腳本程式2可透過綁定標籤(即,報表名稱)於資料庫4中查詢到相關的標籤組(即,時間戳記、編輯欄位、報表種類、資料表及過濾條件),接著將一筆報表資料中的所有標籤匯入到對應 的函數,使得視窗介面20可顯示相對應的匯入結果。當使用者下次執行視窗腳本程式2並開啟相同視窗介面20時,視窗腳本程式2可依據前述技術手段來自動匯入綁定的已編輯報表。並且,使用者可以對已編輯報表進行再次編輯(例如調整參數欄位以及設定過濾條件等),而不僅限於匯出欄位與內容皆固定的報表資料。 To sum up, in the present invention, a plurality of items in a report data can be regarded as a plurality of bound label groups, and there is a binding relationship between them. The window script program 2 can query the relevant tag group (that is, time stamp, edit field, report type, data table and filter condition) in the database 4 through the bound tag (that is, the report name), and then a report All tags in the data are imported into the corresponding function, so that the window interface 20 can display the corresponding import results. When the user executes the window script program 2 next time and opens the same window interface 20, the window script program 2 can automatically import the bound edited report according to the aforementioned technical means. Moreover, the user can edit the edited report again (such as adjusting parameter fields and setting filter conditions, etc.), not limited to exporting report data with fixed fields and contents.

以上所述僅為本發明之較佳具體實例,非因此即侷限本發明之專利範圍,故舉凡運用本發明內容所為之等效變化,均同理皆包括於本發明之範圍內,合予陳明。 The above descriptions are only preferred specific examples of the present invention, and are not intended to limit the patent scope of the present invention. Therefore, all equivalent changes made by using the content of the present invention are all included in the scope of the present invention. bright.

S31~S36:編輯步驟 S31~S36: Editing steps

Claims (15)

一種用於SCADA系統的報表編輯方法,包括:a)由該SCADA系統的一視窗腳本程式判斷該SCADA系統的一變數辭典的一暫存器中是否存在一綁定標籤,其中該綁定標籤指出一資料庫中儲存了一個已綁定報表;b)於存在該綁定標籤時,由該視窗腳本程式根據該綁定標籤查詢該SCADA系統的一編輯檔案以讀取該綁定標籤對應的該已綁定報表的報表資料;c)於不存在該綁定標籤時,透過一視窗介面獲得多個報表元件以創建一新報表,並儲存該多個報表元件為一筆新報表資料至該編輯檔案;及d)由該視窗腳本程式寫入該新報表資料對應的一新綁定標籤至該變數辭典,以綁定該視窗介面與該新報表。 A report editing method for a SCADA system, comprising: a) judging by a window script program of the SCADA system whether there is a binding label in a temporary register of a variable dictionary of the SCADA system, wherein the binding label indicates A bound report is stored in a database; b) when the binding tag exists, the window script program queries an editing file of the SCADA system according to the binding tag to read the binding tag corresponding The report data of the bound report; c) When the binding tag does not exist, obtain multiple report elements through a window interface to create a new report, and save the multiple report elements as a new report data to the edit file and d) write a new binding tag corresponding to the new report data into the variable dictionary by the window script program, so as to bind the window interface and the new report. 如請求項1所述的SCADA系統的報表編輯方法,其中該報表資料及該新報表資料分別包括該多個報表元件,該多個報表元件包括一報表名稱、一報表種類、一資料表及多個參數欄位,該步驟b)包括:b1)匯入該報表資料的該多個報表元件至該視窗介面的多個編輯區。 The report editing method of the SCADA system as described in claim item 1, wherein the report data and the new report data include the plurality of report elements respectively, and the plurality of report elements include a report name, a report type, a data table and multiple The step b) includes: b1) importing the plurality of report elements of the report data into the plurality of editing areas of the window interface. 如請求項2所述的SCADA系統的報表編輯方法,其中該綁定標籤為該報表名稱。 The report editing method of the SCADA system as described in claim item 2, wherein the binding tag is the name of the report. 如請求項2述的SCADA系統的報表編輯方法,其中該多個編輯區包括:一報表元件編輯區,包括:一報表名稱欄位,用以接收該報表名稱;一報表種類選單,用以接收操作以選擇該報表種類; 一歷史報表選單,用以接收操作以選擇一歷史報表;及一資料表選單,用以接收操作以選擇該資料表;一欄位編輯區,包括:一欄位選單,用以接收操作以選擇該多個參數欄位;及一編輯欄位預覽,用以預覽該多個參數欄位;一已綁定報表顯示區,用以顯示該綁定標籤或該新綁定標籤。 The report editing method of the SCADA system as described in claim item 2, wherein the multiple editing areas include: a report element editing area, including: a report name column, used to receive the report name; a report type menu, used to receive to select the report type; A historical report menu, used to receive operations to select a historical report; and a data table menu, used to receive operations to select the data table; a field editing area, including: a field menu, used to receive operations to select The plurality of parameter fields; and an edit field preview for previewing the plurality of parameter fields; a bound report display area for displaying the binding label or the new binding label. 如請求項4所述的SCADA系統的報表編輯方法,其中該報表名稱欄位為一輸入欄位;該報表種類選單、該歷史報表選單、該資料表選單及該欄位選單為下拉式選單。 The report editing method of the SCADA system as described in claim 4, wherein the report name field is an input field; the report type menu, the historical report menu, the data table menu and the field menu are drop-down menus. 如請求項4所述的SCADA系統的報表編輯方法,其中該SCADA系統包括:一機台檔案,用以儲存原始資料;及以SQL為基礎的多個報表模組,該多個編輯區的一者被觸發時分別呼叫對應的該多個報表模組的一者來接入該編輯檔案及該機台檔案。 The report editing method of the SCADA system as described in claim 4, wherein the SCADA system includes: a machine file for storing raw data; and a plurality of report modules based on SQL, one of the plurality of editing areas When one or the other is triggered, call one of the corresponding reporting modules to access the editing file and the machine file. 如請求項4所述的SCADA系統的報表編輯方法,其中該步驟b1)包括:b2)匯入該報表名稱至該歷史報表選單;b3)匯入該報表種類至該報表種類選單;b4)匯入該資料表至該資料表選單;及b5)匯入該多個參數欄位至該欄位選單及該編輯欄位預覽。 The report editing method of the SCADA system as described in claim item 4, wherein the step b1) includes: b2) importing the report name to the historical report menu; b3) importing the report type to the report type menu; b4) importing import the data table into the data table menu; and b5) import the plurality of parameter fields into the field menu and the edit field preview. 如請求項7所述的SCADA系統的報表編輯方法,其中該多個報表元件還包括一過濾時間; 該多個編輯區還包括一時間編輯區,用以接收操作以設定該過濾時間,該過濾時間是一個特定時間或是一段時間區間;及該步驟b1)還包括:b7)匯入該過濾時間至該時間編輯區。 The report editing method of the SCADA system as described in claim item 7, wherein the plurality of report elements also include a filtering time; The multiple editing areas also include a time editing area for receiving operations to set the filter time, the filter time is a specific time or a period of time; and the step b1) also includes: b7) importing the filter time to the time editing area. 如請求項8所述的SCADA系統的報表編輯方法,其中該多個報表元件還包括至少一過濾條件;該多個編輯區還包括一過濾編輯區,用以接收操作以設定該至少一過濾條件;及該步驟b1)還包括:b6)匯入該至少一過濾條件至該過濾編輯區。 The report editing method of the SCADA system as described in claim item 8, wherein the plurality of report elements also include at least one filter condition; the plurality of editing areas also include a filter editing area for receiving operations to set the at least one filter condition ; and the step b1) also includes: b6) importing the at least one filter condition into the filter editing area. 如請求項9所述的SCADA系統的報表編輯方法,其中該方法還包括:e1)根據該報表名稱、該報表種類、該資料表、該多個參數欄位及該過濾時間,查詢一機台檔案並顯示一匯出報表;或者e2)根據該報表名稱、該報表種類、該資料表、該多個參數欄位、該過濾時間及該至少一過濾條件,查詢該機台檔案並顯示該匯出報表。 The report editing method of the SCADA system as described in request item 9, wherein the method also includes: e1) according to the report name, the report type, the data table, the plurality of parameter fields and the filtering time, query a machine file and display an export report; or e2) query the machine file and display the report according to the report name, the report type, the data table, the plurality of parameter fields, the filter time and the at least one filter condition report. 如請求項4所述的SCADA系統的報表編輯方法,其中於該SCADA系統的一預載階段中,在該步驟a)之前,該方法還包括:a1)驗證一使用者的編輯權限;a2)於該使用者無編輯權限時,讀取並匯入該歷史報表的該報表名稱及該資料表至該視窗介面;a3)於該使用者有編輯權限時,執行該步驟a)及該步驟b);及 a4)於該步驟c)不存在該綁定標籤時,結束該預載階段。 The report editing method of the SCADA system as described in claim 4, wherein in a preloading stage of the SCADA system, before the step a), the method also includes: a1) verifying a user's editing authority; a2) When the user has no editing authority, read and import the report name and the data sheet of the historical report to the window interface; a3) When the user has editing authority, execute step a) and step b );and a4) When the binding tag does not exist in the step c), end the preloading phase. 如請求項11所述的SCADA系統的報表編輯方法,其中於該SCADA系統的一編輯階段中,該方法包括:e1)透過該報表種類選單接收操作以選擇該報表種類;e2)根據該報表種類,從該編輯檔案查詢該報表種類對應的該歷史報表;e3)當不存在該報表種類對應的該歷史報表時,包括:透過該報表名稱欄位接收該報表名稱;透過該資料表選單接收操作以選擇該資料表;及從該編輯檔案查詢該資料表對應的該多個參數欄位,以匯入至該欄位選單;及e4)當存在該報表種類對應的該歷史報表時,透過該歷史報表選單接收該歷史報表,並進行該步驟b1)。 The report editing method of the SCADA system as described in claim 11, wherein in an editing stage of the SCADA system, the method includes: e1) receiving an operation through the report type menu to select the report type; e2) according to the report type , query the historical report corresponding to the report type from the editing file; e3) When there is no historical report corresponding to the report type, including: receiving the report name through the report name field; receiving operations through the data table menu to select the data table; and query the multiple parameter fields corresponding to the data table from the editing file to import into the field menu; and e4) when there is the historical report corresponding to the report type, through the The historical report menu receives the historical report and performs the step b1). 如請求項12所述的SCADA系統的報表編輯方法,其中在該步驟e3)及該步驟e4)之後,該方法還包括:e5)透過該欄位選單接收操作選擇該多個參數欄位;e6)透過一過濾編輯區接收操作以設定至少一過濾條件;e7)儲存接收到的該報表名稱、該報表種類、該資料表、該多個參數欄位及該至少一過濾條件至該編輯檔案,以新增該新報表資料;及e8)寫入該新報表資料對應的該新綁定標籤至該變數辭典,以綁定該視窗介面與該新報表資料。 The report editing method of the SCADA system as described in claim item 12, wherein after the step e3) and the step e4), the method further includes: e5) selecting the plurality of parameter fields through the field menu receiving operation; e6 ) receiving an operation through a filter editing area to set at least one filter condition; e7) storing the received report name, the report type, the data table, the plurality of parameter fields and the at least one filter condition to the edit file, to add the new report data; and e8) writing the new binding tag corresponding to the new report data into the variable dictionary, so as to bind the window interface and the new report data. 如請求項4所述的SCADA系統的報表編輯方法,其中該欄位編輯區還包括: 一全部匯入按鍵,用以將該欄位選單包括的該多個參數欄位全部匯入該編輯欄位預覽;一全部清空按鍵,用以將該編輯欄位預覽顯示的該多個參數欄位全部清除;一刪除欄位按鍵,用以從該編輯欄位預覽刪除該欄位選單選擇的該多個參數欄位的一者;及一向前位移按鍵,用以從該編輯欄位預覽將該欄位選單選擇的該多個參數欄位的一者向前位移,以調整該多個參數欄位的排序。 The report editing method of the SCADA system as described in claim item 4, wherein the column editing area also includes: an import all button, used to import all the multiple parameter fields included in the field menu into the edit field preview; a clear all button, used to preview the multiple parameter fields displayed in the edit field a delete field button, used to delete one of the plurality of parameter fields selected by the field menu from the edit field preview; and a forward shift button, used to preview the edit field from the edit field One of the plurality of parameter fields selected in the field menu is shifted forward to adjust the order of the plurality of parameter fields. 如請求項1所述的SCADA系統的報表編輯方法,其中該綁定標籤是以字串型態記錄於該變數辭典的該暫存器,若該變數辭典為空值或存在無效字串,則不存在綁定標籤;若該變數辭典存在有效字串,則存在該綁定標籤。 The report editing method of the SCADA system as described in claim item 1, wherein the binding tag is recorded in the temporary register of the variable dictionary in the form of a string, if the variable dictionary is empty or there is an invalid string, then There is no binding tag; if there is a valid string in the variable dictionary, the binding tag exists.
TW111137164A 2022-09-30 2022-09-30 Method of editing report for scada system TWI806783B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111137164A TWI806783B (en) 2022-09-30 2022-09-30 Method of editing report for scada system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111137164A TWI806783B (en) 2022-09-30 2022-09-30 Method of editing report for scada system

Publications (2)

Publication Number Publication Date
TWI806783B true TWI806783B (en) 2023-06-21
TW202416152A TW202416152A (en) 2024-04-16

Family

ID=87803281

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111137164A TWI806783B (en) 2022-09-30 2022-09-30 Method of editing report for scada system

Country Status (1)

Country Link
TW (1) TWI806783B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102077146A (en) * 2008-05-02 2011-05-25 因文西斯系统公司 System for maintaining unified access to scada and manufacturing execution system (mes) information
CN104756023A (en) * 2012-10-25 2015-07-01 三菱电机株式会社 System building assistance tool and system
CN107066252A (en) * 2016-02-10 2017-08-18 通用电气公司 Graphical interfaces for the configuration of industrial automation system
TWM590730U (en) * 2019-06-10 2020-02-11 李蓉芳 Document management system base on AI
TW202203617A (en) * 2020-06-01 2022-01-16 日商東芝三菱電機產業系統股份有限公司 Scada, web hmi system and hmi client

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102077146A (en) * 2008-05-02 2011-05-25 因文西斯系统公司 System for maintaining unified access to scada and manufacturing execution system (mes) information
CN104756023A (en) * 2012-10-25 2015-07-01 三菱电机株式会社 System building assistance tool and system
CN107066252A (en) * 2016-02-10 2017-08-18 通用电气公司 Graphical interfaces for the configuration of industrial automation system
TWM590730U (en) * 2019-06-10 2020-02-11 李蓉芳 Document management system base on AI
TW202203617A (en) * 2020-06-01 2022-01-16 日商東芝三菱電機產業系統股份有限公司 Scada, web hmi system and hmi client

Also Published As

Publication number Publication date
TW202416152A (en) 2024-04-16

Similar Documents

Publication Publication Date Title
JP4580518B2 (en) Database design system
KR101323011B1 (en) Command user interface for displaying selectable functionality controls in a database application
US7610258B2 (en) System and method for exposing a child list
US6647390B2 (en) System and methods for standardizing data for design review comparisons
US6233719B1 (en) System and method for analyzing semiconductor production data
CN101968800B (en) Metadata driving based method for realizing dynamic form
JP5570608B2 (en) Excel-based analysis report creation system and method
KR101864700B1 (en) Method and computer program for integrating spread sheet with database
JP2004102400A (en) Data management system, method, and computer program
WO1999022310A1 (en) Software system and method for extending classifications and attributes in production analysis
JP6813634B2 (en) WEB reporting design system for programming event behavior based on graphic interface
CN108363776A (en) A kind of self-defined display methods of table field
JP2012064207A (en) Host device and content display method of the same
US8880597B1 (en) Electronic note management system and user-interface
CN101038583B (en) Gold report generating and generating method thereof
CN115576950A (en) Report generation method based on JSON configuration file
US20010034679A1 (en) Platform independent and non-invasive financial report mark-up
US8112458B1 (en) User segmentation user interface
CN110941654A (en) Data query display system, method, device and medium based on configuration template
US20240036890A1 (en) System and method of a modular framework for configuration and reuse of web components
TWI806783B (en) Method of editing report for scada system
CN101661507A (en) Method for merging data and system thereof
CN111797125A (en) Report creating method and device, electronic equipment and computer readable storage medium
JPH11316766A (en) Multidimensional analytical construction system and database for analytical processing
US7966333B1 (en) User segment population techniques