Phase 9: History Management Engineering, Engineering Module - Historical #9

Merged
cliu merged 5 commits from docs/phase-9-history into main 2026-10-01 14:09:34 +10:00
6 changed files with 40 additions and 5 deletions
Showing only changes of commit 9259a3cce2 - Show all commits

View file

@ -11,3 +11,17 @@ NAME,DESCRIPTION,TYPE,COL_STOR_TYPE,LIFE_TIME,ROLLOVER_INT
@HIS_GROUP_DF @HIS_GROUP_DF
"CIENG_EVENT","CI-Eng-Sample event history","Item","Event/Item","1 weeks","1 days" "CIENG_EVENT","CI-Eng-Sample event history","Item","Event/Item","1 weeks","1 days"
! Scan/Time group: every item sampled every SCAN_INTERVAL seconds, with quality codes
@FIELDS
NAME,DESCRIPTION,TYPE,COL_STOR_TYPE,SCAN_INTERVAL,STORE_QUALITY,LIFE_TIME,ROLLOVER_INT
@HIS_GROUP_DF
"CIENG_SCAN10S","CI-Eng-Sample 10 s scan history","Item","Scan/Time",10,1,"1 days","1 hours"
! Aggregation group: 30-minute and hourly aggregates (AGG_PERIOD_HOUR is always on)
@FIELDS
NAME,DESCRIPTION,TYPE,COL_STOR_TYPE,STORE_QUALITY,LIFE_TIME,ROLLOVER_INT,AGG_PERIOD_HOUR,AGG_PERIOD_30MIN
@HIS_GROUP_DF
"CIENG_AGG","CI-Eng-Sample aggregation","Item","Aggregation",1,"4 weeks","1 weeks",1,1

View file

@ -11,3 +11,18 @@ NAME,ITEM_NAME,GROUP_NAME,ON_VALUE_CHANGE,ON_STATUS_CHANGE
@ITEM_HIS_DF @ITEM_HIS_DF
"CIENG_EVENT:CI-Eng-Sample.TANK1.LEVEL","CI-Eng-Sample.TANK1.LEVEL","CIENG_EVENT",1,1 "CIENG_EVENT:CI-Eng-Sample.TANK1.LEVEL","CI-Eng-Sample.TANK1.LEVEL","CIENG_EVENT",1,1
"CIENG_EVENT:CI-Eng-Sample.TANK1.INFLOW","CI-Eng-Sample.TANK1.INFLOW","CIENG_EVENT",1,1 "CIENG_EVENT:CI-Eng-Sample.TANK1.INFLOW","CI-Eng-Sample.TANK1.INFLOW","CIENG_EVENT",1,1
! Scan group: name <group>:<item>, no trigger fields needed
@FIELDS
NAME,ITEM_NAME,GROUP_NAME
@ITEM_HIS_DF
"CIENG_SCAN10S:CI-Eng-Sample.TANK1.LEVEL","CI-Eng-Sample.TANK1.LEVEL","CIENG_SCAN10S"
"CIENG_SCAN10S:CI-Eng-Sample.TANK1.INFLOW","CI-Eng-Sample.TANK1.INFLOW","CIENG_SCAN10S"
! Aggregation group: choose the aggregates per item (also STORE_AGG_INTG, _STDV, _CNT, _DIFF_SUM)
@FIELDS
NAME,ITEM_NAME,GROUP_NAME,STORE_AGG_MAX,STORE_AGG_MIN,STORE_AGG_AVG
@ITEM_HIS_DF
"CIENG_AGG:CI-Eng-Sample.TANK1.LEVEL","CI-Eng-Sample.TANK1.LEVEL","CIENG_AGG",1,1,1

View file

@ -11,3 +11,6 @@ NAME
@ITEM_HIS_DF @ITEM_HIS_DF
"CIENG_EVENT:CI-Eng-Sample.TANK1.LEVEL" "CIENG_EVENT:CI-Eng-Sample.TANK1.LEVEL"
"CIENG_EVENT:CI-Eng-Sample.TANK1.INFLOW" "CIENG_EVENT:CI-Eng-Sample.TANK1.INFLOW"
"CIENG_SCAN10S:CI-Eng-Sample.TANK1.LEVEL"
"CIENG_SCAN10S:CI-Eng-Sample.TANK1.INFLOW"
"CIENG_AGG:CI-Eng-Sample.TANK1.LEVEL"

View file

@ -4,9 +4,11 @@ ENGLISH
@VERSION @VERSION
1.03.00 1.03.00
! Remove CI-Eng-Sample storage group (deletes its history) ! Remove CI-Eng-Sample storage groups (deletes their history)
@FIELDS @FIELDS
NAME NAME
@HIS_GROUP_DF @HIS_GROUP_DF
"CIENG_EVENT" "CIENG_EVENT"
"CIENG_SCAN10S"
"CIENG_AGG"

View file

@ -53,6 +53,8 @@ cmd /c "<repo>\examples\CI-Eng-Sample\remove.cmd"
| `CIENG_JFLOW` | Class (Java) | Attaches `<object section>.INFLOW`; creates `<object>.sPerMin` = inflow / 60; logs each change | | `CIENG_JFLOW` | Class (Java) | Attaches `<object section>.INFLOW`; creates `<object>.sPerMin` = inflow / 60; logs each change |
| `CI-Eng-Sample.TANK1.JFLOW` | Object | `CIENG_JFLOW`; creates item `TANK1.JFLOW.sPerMin` (mixed case, as the Java identifier) | | `CI-Eng-Sample.TANK1.JFLOW` | Object | `CIENG_JFLOW`; creates item `TANK1.JFLOW.sPerMin` (mixed case, as the Java identifier) |
| `CIENG_EVENT` | Item storage group | Event/Item, lifetime 1 week, rollover 1 day | | `CIENG_EVENT` | Item storage group | Event/Item, lifetime 1 week, rollover 1 day |
| `CIENG_SCAN10S` | Item storage group | Scan/Time every 10 s with quality, lifetime 1 day, rollover 1 hour; `TANK1.LEVEL`, `TANK1.INFLOW` |
| `CIENG_AGG` | Item storage group | Aggregation 30 min + hourly, lifetime 4 weeks, rollover 1 week; `TANK1.LEVEL` max/min/average (values not yet seen, ISS-040) |
| `CI-Eng-Sample.PLC1` | Section | Modbus loopback station | | `CI-Eng-Sample.PLC1` | Section | Modbus loopback station |
| `CI-Eng-Sample.PLC1.COMM_OK` | Item, Boolean | Status item of station `CIENG_PLC` (1 = communicating, status 22 when off-scan) | | `CI-Eng-Sample.PLC1.COMM_OK` | Item, Boolean | Status item of station `CIENG_PLC` (1 = communicating, status 22 when off-scan) |
| `CI-Eng-Sample.PLC1.SETPOINT` / `.READBACK` | Items, Integer | Written to holding register 1 (`RO:1`) / read from input register 1 (`RI:1`), same memory | | `CI-Eng-Sample.PLC1.SETPOINT` / `.READBACK` | Items, Integer | Written to holding register 1 (`RO:1`) / read from input register 1 (`RI:1`), same memory |
@ -85,7 +87,7 @@ New items start with status 13 (`NOT INIT`) until a value is written.
| `01_section_df.qli` | Sections (`SECTION_DF`); parents before children | | `01_section_df.qli` | Sections (`SECTION_DF`); parents before children |
| `02_item_df.qli` | Items (`ITEM_DF`) | | `02_item_df.qli` | Items (`ITEM_DF`) |
| `02b_sub_item_df.qli` | Sub-items (`SUB_ITEM_DF`) | | `02b_sub_item_df.qli` | Sub-items (`SUB_ITEM_DF`) |
| `03_his_group_df.qli` | Item storage group (`HIS_GROUP_DF`) | | `03_his_group_df.qli` | Item storage groups (`HIS_GROUP_DF`): event, scan, aggregation |
| `04_item_his_df.qli` | Items in the storage group (`ITEM_HIS_DF`, name `<group>:<item>`) | | `04_item_his_df.qli` | Items in the storage group (`ITEM_HIS_DF`, name `<group>:<item>`) |
| `05_trigger_df.qli`, `06_class_df.qli`, `07_object_df.qli` | Trigger group; classes (source in the `METHOD` memo, `@"` … `"@`, `COMPILE` 1; Traditional and Java); objects (`ATTR_VALUE_1` = prompt answer) | | `05_trigger_df.qli`, `06_class_df.qli`, `07_object_df.qli` | Trigger group; classes (source in the `METHOD` memo, `@"` … `"@`, `COMPILE` 1; Traditional and Java); objects (`ATTR_VALUE_1` = prompt answer) |
| `08_auth_group_df.qli` | Authorization group (`AUTH_GROUP_DF`) | | `08_auth_group_df.qli` | Authorization group (`AUTH_GROUP_DF`) |
@ -150,7 +152,6 @@ testing. See the `system-management` skill, task `monitoring-processes.md`.
| Phase | Adds | | Phase | Adds |
|---|---| |---|---|
| 9 | More storage groups (scan/time, aggregation) |
| 10 | A display and symbol | | 10 | A display and symbol |
| 11 | A report | | 11 | A report |

View file

@ -1,7 +1,7 @@
@echo off @echo off
rem Remove CI-Eng-Sample from a CI Server R1.03 TEST system (also deletes its history). rem Remove CI-Eng-Sample from a CI Server R1.03 TEST system (also deletes its history).
rem Run in an elevated prompt while CI Server is running; call this script by full path. rem Run in an elevated prompt while CI Server is running; call this script by full path.
rem Order: object, class, trigger group, storage links, stop + delete storage group, items, sections (children first). rem Order: object, class, trigger group, storage links, stop + delete storage groups, items, sections (children first).
rem A storage group with an active unit cannot be deleted (HIS-E-GROUPHASUNT), so the rem A storage group with an active unit cannot be deleted (HIS-E-GROUPHASUNT), so the
rem group first gets a stop time one minute ahead; the script waits until it has passed. rem group first gets a stop time one minute ahead; the script waits until it has passed.
cd /d "%~dp0" cd /d "%~dp0"
@ -16,7 +16,7 @@ dssqld -r 86_remove_object_df.qli -l 86_remove_object_df.qlo
dssqld -r 87_remove_class_df.qli -l 87_remove_class_df.qlo dssqld -r 87_remove_class_df.qli -l 87_remove_class_df.qlo
dssqld -r 88_remove_trigger_df.qli -l 88_remove_trigger_df.qlo dssqld -r 88_remove_trigger_df.qli -l 88_remove_trigger_df.qlo
dssqld -r 89_remove_item_his_df.qli -l 89_remove_item_his_df.qlo dssqld -r 89_remove_item_his_df.qli -l 89_remove_item_his_df.qlo
powershell -NoProfile -Command "$t=(Get-Date).AddMinutes(1).ToString('dd-MM-yyyy HH:mm:ss'); \"@LANGUAGE`r`nENGLISH`r`n`r`n@VERSION`r`n1.03.00`r`n`r`n@FIELDS`r`nNAME,STOP_TIME`r`n`r`n@HIS_GROUP_DF`r`n\"\"CIENG_EVENT\"\",\"\"$t\"\"`r`n\" | Set-Content -Encoding ascii 90a_stop_his_group_df.qli" powershell -NoProfile -Command "$t=(Get-Date).AddMinutes(1).ToString('dd-MM-yyyy HH:mm:ss'); \"@LANGUAGE`r`nENGLISH`r`n`r`n@VERSION`r`n1.03.00`r`n`r`n@FIELDS`r`nNAME,STOP_TIME`r`n`r`n@HIS_GROUP_DF`r`n\"\"CIENG_EVENT\"\",\"\"$t\"\"`r`n\"\"CIENG_SCAN10S\"\",\"\"$t\"\"`r`n\"\"CIENG_AGG\"\",\"\"$t\"\"`r`n\" | Set-Content -Encoding ascii 90a_stop_his_group_df.qli"
dssqld -m 90a_stop_his_group_df.qli -l 90a_stop_his_group_df.qlo dssqld -m 90a_stop_his_group_df.qli -l 90a_stop_his_group_df.qlo
echo Waiting 75 seconds for the storage group stop time to pass... echo Waiting 75 seconds for the storage group stop time to pass...
powershell -NoProfile -Command "Start-Sleep -Seconds 75" powershell -NoProfile -Command "Start-Sleep -Seconds 75"