ci-server-engineer/.claude/skills/item-engineering/tasks/sub-items.md
cliu edb9948891 Record confirmed tutorial tasks in item and class/object skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:56:49 +10:00

37 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
task: Create sub-items (integrator, min-max)
version: R1.03
source: IM 36K10G10-01EN §3.1.5, §3.2.3; practiced with CI-Eng-Sample 2026-09-30
status: verified
---
# Sub-items
A sub-item hangs under an item (`<Section>.<Tag>.<Sub>`) and processes the main item's value.
Types: `Integrator`, `Min-Max`, `Pulse`, `Rate-of-Change`, `Typeless`. Sub-items cannot connect
to equipment, cannot have sub-items, and are **not** blocked when the main item is blocked.
Quick load (`SUB_ITEM_DF`; the main item must exist):
```
@FIELDS
NAME,DESCRIPTION,SUB_TYPE,TIME_UNIT,MIN_MAX
@SUB_ITEM_DF
"CI-Eng-Sample.PUMP1.RUNNING.RUN_SECONDS","Pump 1 running time (seconds)","Integrator","",""
"CI-Eng-Sample.TANK1.LEVEL.MAX","Tank 1 maximum level","Min-Max","","Maximum"
```
Load with `dssqld -i <file>.qli -l <file>.qlo`; remove with a `NAME`-only file and `dssqld -r`
(before removing the main item).
## Behaviour (verified)
- **Integrator** adds *value × seconds*: with the main item at 1 it grows by 1 per second.
`TIME_UNIT` (e.g. `Hour`) made no difference (`knowledge/issues.md` ISS-010); to show hours,
divide by 3600 where the value is used.
- **Min-Max** with `MIN_MAX` = `Maximum` (or `Minimum`) keeps the highest (lowest) value
written to the main item: writing 30, 70, 50 gave 70.
- `TIME_UNIT` (Second, Minute, Hour, Day) belongs to Rate-of-Change (from docs, not practiced).
Example files: `examples/CI-Eng-Sample/02b_sub_item_df.qli`, `90b_remove_sub_item_df.qli`.