MC&TT Co., Ltd

Part 9. Phần mềm SCADA Cimon Ultimate Access - Báo cáo

Chia sẻ:

Part 9. Phần mềm SCADA Cimon Ultimate Access - Báo cáo

Trong CIMON-SCADA, người dùng có thể tạo tệp Báo cáo bằng các ứng dụng bên ngoài như Excel và Word. Tệp biểu mẫu báo cáo do người dùng định nghĩa sẽ được đăng ký và tham chiếu khi tệp báo cáo cần được in. Người dùng cũng có thể chọn một trong các loại báo cáo từ các gợi ý sau; Hàng ngày, Hàng tuần, Hàng tháng, Hàng năm và Các loại khác.

1. Features

  • Bạn có thể in các tệp báo cáo hàng ngày, hàng tuần, hàng tháng hoặc hàng năm. Bạn cũng có thể in tệp với một điều kiện hoặc một lệnh.
  • Bạn có thể in hoặc lưu báo cáo.
  • Tệp biểu mẫu của báo cáo chỉ khả dụng trong Excel hoặc Word. Tệp báo cáo được lưu dưới cùng định dạng với tệp biểu mẫu

2 Settings

To bring up the [Report] window, double-click the [Report] on the Project Workspace or select [Tools] – [Report]

(1) Model Settings

Model Name Enter the name of the report model. The name cannot be duplicated.
Report Type Daily Outputs the report daily. You can configure the output time. (Hour, Minute)
Weekly Outputs the report weekly. You can configure the output time. (Day of the week, Hour, Minute)
Monthly Outputs the report monthly. You can configure the output time. (Date, Hour, Minute)
Yearly Outputs the report yearly. You can configure the output time. (Month, Date, Hour, Minute)
Others Outputs the report when the condition is true.
Output Time Assign the output time according to the report type.
Output This field is activated when the report type is ‘Others’. The condition example is as shown below.
E.g.) When the condition is ‘PRINT_REPORT == 1’, the report is printed when the tag value of ‘PRINT_REPORT’ becomes 1.
Report Form By Select the file format of the report form.
Excel Worksheet Select this option if the report form is in Excel file.
Microsoft Excel must be installed in the user’s PC.
Word Document Select this option if the report form is in Word file.
Microsoft Word must be installed in the user’s PC.
Virtual Excel Worksheet Select this option if there is an Excel form file but no Microsoft Excel in the user’s PC.
Register Tag Assign the content and position of data which will be output in the report.
Custom Form Assign the absolute path of the predefined report form as Excel file.
Output Determines the output type of the report.
To save Overwrite Saves the report as an assigned file name. If a file with identical name exists, the file is overwritten
  Change Name Saves the report as a file named YYYYMMDDHHMM.xls. (YYYY: Year, MM: Month, DD:
Day, HH: Hour, MM: Minute, xls: Excel file)
  Attach This function is currently not supported.
Save In Saves the report file in the assigned path according to the option selected at ‘To Save’.
Overwrite Assign the file name including the path. If the path is omitted, the report file is saved in the project folder.
Change Name Assign the path where the report file will be saved. You can use [...] button to browse the folder. The path must be different from any other report model
Run Script Before Output Enter the script name which will be executed before the report output.
Run Script After Output Enter the script name which will be executed after the report output.
Add Adds a new report model.
OK Saves the change in the report model.
Delete Deletes the selected report model.

(2) Register Report Data

Select [Register Tag] button in [Event Report] window to bring up the [Register Report Data] window. You can specify the contents and the position of the data to be saved in the report

Print Out You can print the contents of selected sheet with the printer
connected to your PC.
Save As Text
File
This option appears only when the form file is in Excel format. You can save the report file as “ModelName_SheetName”.txt format in the project folder.
Add Sheet This button is activated only when the form file is in Excel format.
Enter the name of new sheet and press [OK]. The sheet name has to be identical to that of the form file. The name cannot be duplicated.
Be aware that certain strings cannot be used as the sheet name.
Delete Sheet Deletes the selected sheet from the report data.
Change
Name
Changes the name of the selected sheet. The name cannot be duplicated.
Add Cell Adds a new cell. You can enter the data to output at the report
Edit Cell Edits a selected cell.
Delete Cell Deletes a selected cell from the sheet.
OK Saves the contents to the event report model and returns to the [Event Report] window.
Cancel Cancels the changes made in the window and returns to the [Event
Report] window.

Khi bạn thêm các ô vào ‘Register Report Data’, bạn có thể sử dụng
chức năng tăng/giảm của Excel.
1. Trong cửa sổ ‘Register Report Data’, chọn dữ liệu và sao chép vào bảng tạm (Ctrl + C).
2. Dán (Ctrl + V) vào trang tính mới của tệp Excel.
3. Bạn có thể kéo góc dưới bên phải của ô để tăng/giảm dữ liệu dựa trên thời gian.
4. Sao chép (Ctrl + C) vùng đã chỉnh sửa của Excel vào bảng tạm.
5. Dán (Ctrl + V) vào danh sách dữ liệu của cửa sổ ‘Register Report Data’.

The list of invalid strings for the sheet names are as shown below.

Alphabet Invalid Strings
A ADD, ALL, Alphanumeric, ALTER, AND, ANY, Application, AS, ASC,
Assistant, AUTOINCREMENT, Avg
B -B, BETWEEN, BINARY, BIT, BOOLEAN, BY, BYTE
C -C, CHAR, CHARACTER, COLUMN, CompactDatabase, CONTRAINT, Container, Count, COUNTER, CREATE, CreateDatabase, CreateField,
CreateGroup, CreateIndex, CreateObject, CreateProperty, CreateRelation, CreateTableDef, CreateUser, CreateWorkspace, CURRENCY, CurrentUser
D -D, DATABASE, DATE, DATETIME, DELETE, DESC, Description, DISALLOW,
DISTINCT, DISTINCTROW, Document, DOUBLE, DROP
E -E, Echo, Else, End, Eqv, Error, EXISTS, Exit,
F -F, FALSE, Field, Fields, FillCache, FLOAT, FLOAT4, FLOAT8, FOREIGN, Form, Forms, FROM, Full, FUNCTION
G -G, GENERAL, GetObject, GetOption, GotoPage, GROUP, GROUP BY, GUID
H -H, HAVING,
I -I, Idle, IEEEDOUBLE, IEEESINGLE, If, IGNORE, Imp, IN, INDEX, Index, Indexes, INNER, INSERT, InsertText, INT, INTEGER, INTEGER1, INTEGER2, INTEGER4, INTO, IS
J -J, JOIN,
K -K, KEY
L -L, LastModified, LEFT, Level, Like, LOGICAL, LOGICAL1, LONG, LONGBINARY, LONGTEXT
M -M, Macro, Match, Max, Min, Mod, MEMO, Module, MONEY, Move
N -N, NAME, NewPassword, NO, Not, Note, NULL, NUMBER, NUMERIC
O -O, Object, OLEOBJECT, OFF, ON, OpenRecordset, OPTION, OR, ORDER, Orientation, Outer, OWNERACCESS
P -P, Parameter, PARAMETERS, Partial, PERCENT, PIVOT, PRIMARY, PROCEDURE, Property
Q -Q, Queries, Query, Quit
R -R, REAL, Recalc, Recordset, REFERENCES, Refresh, RefreshLink, RegisterDatabase, Relation, Repaint, RepairDatabase, Report, Reports,
Requery, RIGHT
S -S, SCREEN, SECTION, SELECT, SET, SetFocus, SetOption, SHORT, SINGLE, SMALLINT, SOME, SQL, StDev, StDevP, STRING, SUM
T -T, TABLE, TableDef, TableDefs, TableID, TEXT, TIME, TIMESTAMP, TOP, TRANSFORM, TRUE, Type
U -U, UNION, UNIQUE, UPDATE, USER
V -V, VALUE, VALUES, Var, VarP, VARBINARY, VARCHAR
W -W, WHERE, WITH, Workspace
X -X, Xor
Y -Y, Year, YES, YESNO

(3) Edit Cells

Cell Specify a cell number where the data will be saved.
E.g.) To write the value of ‘Tag1’ to the cell ‘C1’, you have to enter
C1 in the ‘Cell’ field and ‘Tag1’ in the ‘Tag Name/Operation
Expression’ field
Key Finds the assigned keyword in the Word document and replace the
data with the selected item in the [Tag Name/Operation Expression].
E.g.) When the keyword in the Word document is ‘Value1’, and the assigned tag name is ‘Tag1’, the value of ‘Tag1’ will be printed at the location of the ‘Value1’.
Browse Browse the tag from the Database.
Tag Name/
Operation
Expression
When you enter the tag name, the report outputs the corresponding
tag value. You can also enter the operation expression.
Read Data Reads the value of selected cell and saves to the tag assigned to [Tag Name/Operation Expression].
Write Data Writes the assigned tag value to the specified cell.
Repeat Input Used for the batch process of the repetitive input to the cell.
No. Of
Repeats
This option is activated when the ‘Repeat Input’ option is selected.
Assign the number of repeats. the cell number and the tag value of
the tag name will increase by 1. You cannot assign the value greater than 1000.
OK Saves the configuration and returns to the [Register Report Data] window.
Cancel Cancels the configuration and returns to the [Register Report Data] window

3. Related Features

Trong phần này, bạn có thể tìm thấy các hàm và chương trình con1 thường được sử dụng cho Báo cáo. Vui lòng tham khảo bảng bên dưới để biết các hàm/chương trình con áp dụng.

Command Description
Report Subroutine ReportDialog Brings up the [Open/Print Report] window.
Subroutine EnableReport Runs or stops the assigned report
model.
Subroutine ReportOut Prints out the assigned report model.
Function ReportTimeStr Returns the time value for the report
as string.
Function TLogVal Returns the report data value of the assigned tag.
Time Function TimeStr Displays the current time in the assigned format.

3.1 Functions for Report

ReportDialog Brings up the [Open/Print Report] window.
Subroutine Command ReportDialog()
  Script ReportDialog
Description

This subroutine brings up the [Open/Print Report] window. You can select and print the past report.

  Report Model Select the report model. You can find the report files according to the report model.
  FileName Select the year and month to display the report data
in the assigned time.
  Print Prints out the selected past report data.
  Open Opens the selected past report data.
  Cancel Cancels the operation and returns to CimonX.
Example Brings up the [Open/Print Report] window.
ReportDialog()

 

EnableReport Runs or stops the assigned report model.
Subroutine Command EnableReport (“Model Name”, Run/Stop)
Script EnableReport “Model Name”, Run/Stop
Description This function runs or stops the assigned report model according to the parameter.
Run Report: 1
Stop Report: 0
Example Executes the report model named, “WaterTreatment”.
EnableReport (“WaterTreatment”, 1)

 

ReportOut Prints out the specified report model.  
Subroutine Command ReportOut (“Model Name”)
Script ReportOut “Model Name”
Description Prints out the specified report model regardless of the output time.
You can print the report even if the report model is not operating.
The report model printed by the function is not saved as a file.
Example Prints out the report model named “WaterTreatment”.
ReportOut (“WaterTreatment”)

 

ReportTimeStr Returns the time value for the report as string.
Function Operation ReportTimeStr (“Time Value”, Time Format)
Script StrVal$ = ReportTimeStr (“Time Value”, Time Format)
Description This function returns the time value, which will be used for the report file, according to the Time Format. If you enter the Time Value as negative number, the assigned parameter will indicate the past date. If the Time Value represents the today.
Example E.g.) Outputs the report time value.
ReportTimeStr(“0D”, 9) + “ “ + ReportTimeStr(“0D”, 64)
= Displayed time format in the report: yyYmmMddD DATE

 

TLogVal Returns the report data value of the assigned tag.
Function Operation TLogVal (“Tag Name”, “Time Value”, “Value Type”)
Script n = TLogVal (“Tag Name”, “Time Value”, “Value Type”)
Description This function returns the data value of the Tag Name according to the Time Value and Value Type from the report. The tag must be assigned as a report tag.
Example Returns the value increment in Generator tag, from 2AM to 3AM yesterday.
TLogVal (“Generator”, “-1D3H”, “I_SUM”) = n

 

Analog Tag Value Type Digital Tag Value Type
C_VAL Tag value of the
assigned time.
ON_TIME n nth Operation time (Daily)
A_VAL Average value of each
date/month/year.
ON_TIME Sum of the ON_TIME at
assigned time.
I_VAL Increase value at the
assigned value.
ON_CNT Number of operations at
the assigned time.
C_SUM Sum of the C_VAL by
hours.
T_SUM Sum of the ON_TIME by
assigned time.
C_AVER Average of the C_VAL by hours. T_AVER Average of the ON_TIME by days/months
C_MIN Minimum value of the
C_VAL by hours.
T_MIN Minimum of the ON_TIME by days/months.
C_MAX Maximum value of the
C_VAL by hours.
T_MAX Maximum of the ON_TIME
by days/months.
C_MINTIME The time when C_MIN value occurred. T_MINTIME Date/Day/Month of T_MIN.
C_MAXTIME The time when C_MAX value occurred. T_MAXTIME Date/Day/Month of
T_MAX.
I_SUM Sum of the I_VAL by
hours.
N_SUM Sum of ON_CNT by
weeks/months/years.
I_AVER Average of the I_VAL by hours. N_AVER Average of ON_CNT by
days/months.
I_MIN Minimum value of the
I_VAL by hours.
N_MIN Minimum of ON_CNT by
days/months.
I_MAX Maximum value of the
I_VAL by hours.
N_MAX Maximum of ON_CNT by
days/months.
I_MINTIME The time when I_MIN
value occurred.
N_MINTIME Date/Day/Month when
N_MIN occurred.
I_MAXTIME The time when I_MAX value occurred. N_MAXTIME

Date/Day/Month when
N_MAX occurred

3.2 Functions for Time

TimeStr Displays the current time in the assigned format.
Function Operation TimeStr (TimeFormat)
Script StrVal$ = TimeStr (TimeFormat)
Description Displays the current time according to the TimeFormat.
Example Displays the current year, month and day.
TimeStr (9) = yyyy mm dd

 

0 HH:MM 33 yyyy/mm/dd HH:MM:SS
1 HH:MM AM/PM 34 yyyy/mm/dd HH:MM:SS AM/PM
2 HH:MM:SS 35 yyyy-mm-dd HH:MM
3 HH:MM:SS AM/PM 36 yyyy-mm-dd HH:MM AM/PM
4 HH-MM 37 yyyy-mm-dd HH:MM:SS
5 HH-MM-SS 38 yyyy-mm-dd HH:MM:SS AM/PM
6 Month dd (e.g. March 31) 39 Month dd HH:MM
(e.g. March 31 12:00)
7 mm/dd 40 Month dd HH:MM:SS
(e.g. March 31 12:00:00)
8 mm-dd 41 Month dd yy HH:MM
(e.g. March 31 18 12:00)
9 yyyy mm dd 42 Month dd yy HH:MM:SS
(e.g. March 31 18 12:00:00)
10 yy/mm/dd 43 Month dd yyyy HH:MM
(e.g. March 31 2018 12:00)
11 yy-mm-dd 44 Month dd yyyy HH:MM:SS
(e.g. March 31 2018 12:00:00)
12 Month dd, yyyy
(e.g. March 31, 2018)
45 yy/mm
13 yyyy/mm/dd 46 yy Month (e.g. 18 March)
14 yyyy-mm-dd 47 yyyy/mm
15 mm/dd HH:MM 48 yyyy Month (e.g. 2018 March)
16 mm/dd HH:MM AM/PM 49 yy
17 mm/dd HH:MM:SS 50 yyyy
18 mm/dd HH:MM:SS AM/PM 51 mm
19 mm-dd HH:MM 52 dd
20 mm-dd HH:MM AM/PM 53 HH
21 mm-dd HH:MM:SS 54 MM
22 mm-dd HH:MM:SS AM/PM 55 SS
23 yy/mm/dd HH:MM 56 yy
24 yy/mm/dd HH:MM AM/PM 57 yyy
25 yy/mm/dd HH:MM:SS 58 Month (e.g. March)
26 yy/mm/dd HH:MM:SS AM/PM 59 dd
27 yy-mm-dd HH:MM 60 HH
28 yy-mm-dd HH:MM AM/PM 61 MM
29 yy-mm-dd HH:MM:SS 62 SS
30 yy-mm-dd HH:MM:SS AM/PM 63 "Sunday" ~ "Saturday"
31 yyyy/mm/dd HH:MM 64 "Sunday" ~ "Saturday"
32 yyyy/mm/dd HH:MM AM/PM 65 "SUN" ~ "SAT"
Bạn đang xem: Part 9. Phần mềm SCADA Cimon Ultimate Access - Báo cáo
Bài trước Bài sau
Đăng nhập
Đăng ký
Hotline: 0904251826
x