Add phase 6 PROCESS Service manual summaries (L10, P10, P11)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
ac3208959c
commit
f9f6bf59db
3 changed files with 424 additions and 0 deletions
118
knowledge/manuals/IM36K10L10-01EN.md
Normal file
118
knowledge/manuals/IM36K10L10-01EN.md
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
---
|
||||
manual: IM 36K10L10-01EN
|
||||
title: Class/Object Engineering
|
||||
edition: 3rd Edition, Sep. 2023
|
||||
version: R1.03
|
||||
status: from docs; opc.sup, process_start.cmd, the PROCESS data files and opcdbg (database check, get class/object, signals, attributes, reset class, dump, performance main info) checked on the test system 2026-09-30
|
||||
---
|
||||
|
||||
# Class/Object Engineering (R1.03)
|
||||
|
||||
PROCESS Service runs **objects**: instances of **classes** (programs written in the
|
||||
Traditional or Java PROCESS Service language) that link a set of items through **signals** and
|
||||
are run by **trigger groups**, signal changes or timers. Internally all its process names start
|
||||
with `OPC` ("Object oriented Process Control") — nothing to do with the OPC Foundation
|
||||
standard. Section numbers refer to the manual. Language details: `IM36K10P10-01EN.md`
|
||||
(Traditional) and `IM36K10P11-01EN.md` (Java).
|
||||
|
||||
## 1. Processes (§1)
|
||||
|
||||
| Process | Role |
|
||||
|---|---|
|
||||
| `OPCMAN` | Manager: keeps the configuration (trigger groups, classes, objects); every client request goes through it |
|
||||
| `OPCCOM` / `OPCJCOM` | Compiler for Traditional / Java classes |
|
||||
| `OPCACT` / `OPCJACT` | Activator: creates/deletes objects (runs the class prolog / `create()`), creates and deletes the items an object makes |
|
||||
| `OPCLOA` | Loader: passes run information to the executors; keeps a private copy of the data store on a front-end node |
|
||||
| `OPCEXE` / `OPCJEXE` | Executor: runs the objects (Traditional / Java); creates the ALARM-statement items |
|
||||
| `opcdbg` | Command-line debugger (see §4) |
|
||||
|
||||
Rules for distributed systems: `OPCMAN`, the compilers and activators run together on the host
|
||||
node, one of each. Loader/executor pairs may run on other nodes; several executors per node
|
||||
are allowed, each serving its own **priority range** (0–999).
|
||||
|
||||
**Installed (R1.03 test system)**: `process_start.cmd` starts `opcloa`; on the host node also
|
||||
`opcman`, `opcact`, `opccom`; then **four** Traditional executors `opcexe1`…`opcexe4` and one
|
||||
Java executor `opcjexe` (a `javaw` process). `OPCJCOM`/`OPCJACT` are not started by the script;
|
||||
`OPCMAN` starts them on demand (`process_jcom_start.cmd`, `process_jact_start.cmd`) and they exit
|
||||
after an idle time. Java process logging is configured in
|
||||
`%TLS_WAP_PATH%\cfg\properties\opcj{act,com,exe}logging.properties`.
|
||||
|
||||
## 2. Setup files (§2)
|
||||
|
||||
`opc.sup` holds settings for all PROCESS processes; a file named after one process's BUS queue
|
||||
(e.g. `opcman.sup`) overrides it for that process only. The Java processes read only `opc.sup`.
|
||||
Change it with the Setup File Editor (skill `portal-setup`); a restart is needed.
|
||||
|
||||
Main keywords and the **installed** values (differences from the manual: ISS-026):
|
||||
|
||||
| Keyword | Meaning | Installed |
|
||||
|---|---|---|
|
||||
| `CLASS-TEMPLATE`, `JCLASS-TEMPLATE` | Source template for new classes | not set → `%TLS_DAT_PATH%\opc_src_tpl.asc` / `opc_jsrc_tpl.asc` |
|
||||
| `EVENT-BUFFER = node, size, time-out` | ITEM Service buffers item events for PROCESS | `-1, 1000, 0.1` (all nodes) |
|
||||
| `IMMED-EVENTS` | One extra update per item when an executor starts | `NO` (manual: default YES) |
|
||||
| `COLD-START` | Front-end loads everything from the host at start (legacy) | `NO` |
|
||||
| `AUDIT` | Audit trail for configuration and value changes | `NO` |
|
||||
| `FLOW-CONTROL = interval, timeout` (s) | Heartbeat from ITEM Service; `0,0` disables | `30,60` (manual default 300/360) |
|
||||
| `TRIGGER-QUEUE-SIZE` | Queued triggers per object; at 90 % a "Loosing real-time" warning | `100` |
|
||||
| `ALARM-ITEMS`, `ALARM-PRIORITY` | Items and priorities for the language's ALARM statement | not set |
|
||||
| `HOST-NODE` | PROCESS host node | `-1` (the system host) |
|
||||
| `ALM-PROC`, `ADT-PROC`, `ITM-PROC` | Queue names of ALARM, AUDIT, ITEM Service | `ITM-PROC = ITM` |
|
||||
| `PROC-TIME = wait s, jact min, jcom min` | Start wait and idle time-outs of `OPCJACT`/`OPCJCOM`; 0 = 30 min | `20,0,0` |
|
||||
| `QUEUE-SIZE = process, kB` | BUS queue sizes | `OPCEXE1`–`4` 300, `OPCMAN` 400, `OPCLOA` 252 |
|
||||
| `PRIORITY-RANGE = executor, from, to` | Priority range per executor; must not overlap | `OPCEXE1` 0–249, `OPCEXE2` 250–499, `OPCEXE3` 500–749, `OPCEXE4` 750–999 |
|
||||
| `LOCK-CHECK` (s) | Manager housekeeping interval | `10` |
|
||||
| `SCHEDULER-INTERVAL` (ms) | Finest run resolution for Traditional objects | `500` |
|
||||
| `TRACE` | Debug output of `OPCEXE` to stdout | `NO` |
|
||||
| `STATISTICS` | Performance statistics for `opcdbg` (Traditional; Java always on) | `NO` |
|
||||
| `PRINT` | `PRINT` statement output goes to the message log | `YES` |
|
||||
| `SYMTAB-SIZE`, `INCTAB-SIZE`, `ALARMTAB-SIZE`, `TIMERTAB-SIZE`, `ATTRIBTAB-SIZE`, `SIGTAB-SIZE`, `LABELTAB-SIZE`, `VARTAB-SIZE`, `FNCTAB-SIZE`, `STRPOOL-SIZE`, `CODE-SIZE` | Compiler table sizes (Traditional) | 4000, 100, 40, 40, 1000, 1000, 100, 4000, 200, 32 kB, 1000 kB |
|
||||
|
||||
Also in the file: hidden keywords `FLDSEP = ","` and `IGNEXI = 1` (not described). `opcini.sup`
|
||||
holds only a licence line; leave it alone.
|
||||
|
||||
The object's priority decides which executor runs it: sample objects with priority 0 run in
|
||||
`OPCEXE1` (seen with `opcdbg`, "Running in : 1, OPCEXE1").
|
||||
|
||||
## 3. Ways to create classes and objects (§3)
|
||||
|
||||
1. Engineering Module (normal GUI way).
|
||||
2. `opcdbg` (repair situations).
|
||||
3. An application using the PROCESS routine interface.
|
||||
4. **Quick load** with `dssqld` (`CLASS_DF`, `OBJECT_DF`, `TRIGGER_DF`) — used by this repo;
|
||||
see skill `class-object-engineering`.
|
||||
|
||||
## 4. Debugger `opcdbg` (§4)
|
||||
|
||||
Interactive; first asks the OPC host node (0 = this node), then the action:
|
||||
`1` trigger groups, `2` classes, `3` objects, `4` performance, `5` utilities, `-1` exit.
|
||||
`opcdbg 0 <action>` skips the first two questions. Answers can be piped in (one per line); end
|
||||
with `-1` lines so it exits, and keep a time-out: on end of input it repeats the last prompt
|
||||
forever.
|
||||
|
||||
| Menu | Useful actions |
|
||||
|---|---|
|
||||
| Classes (2) | 5 get class (by **N**ame or **I**d — asked first), 7 compile, 8 **reset class** (all its objects on a node), 12 triggers, 16 all attributes, 18 all signals, 19/20 get/modify attribute value, 21 hide/unhide code |
|
||||
| Objects (3) | 4 get object (N/I first), 6 reset, 7 trigger, 12 all attributes, 14 all signals (with item ids), 15 debug on/off (writes a trace file), 16/17 get/modify attribute value, 18 object status (runs, executor) |
|
||||
| Performance (4) | Asks front-end node and **executor name** (default `OPCEXE`, installed names are `OPCEXE1`…`4`); 1 main info, 5 class info, 7 object info, 8 reset statistics, 9 statistics on/off, 10/11 top-10 classes/objects |
|
||||
| Utilities (5) | 1 reset host/front-end, 2 pending front-end updates, 3/4 dump classes/objects, **5 database check** (read-only), 6 database repair (deletes incomplete data; back up first), 7 disassemble class, 8 clean up "item used" marks, 9 memory dump |
|
||||
|
||||
Verified 2026-09-30: *Reset class* asks class name, node **and a file for a reset report**
|
||||
(not in the manual; empty line = none). Times are printed in GMT. The dump files (3/4) are
|
||||
**not** in quick load format and `dssqld -i` rejects them (ISS-027); export `CLASS_DF` /
|
||||
`OBJECT_DF` with `dssqld -e` instead. *Cleanup item used file* fixes items that cannot be
|
||||
deleted because a removed object still marks them as used.
|
||||
|
||||
## 5. Data store (Appendix 1)
|
||||
|
||||
Owned by PROCESS Service, in `%TLS_DAT_PATH%`: `opc_clsdef` (class definitions), class source
|
||||
(installed name `opc_clssrc`, manual `opc_clasrc`), `opc_clsobj` (compiled code), `opc_objdef`,
|
||||
`opc_attrib` (attribute values of classes and objects), `opc_signal` (item per signal, with
|
||||
storage info), `opc_trgdef`, `opc_trgact` (trigger group ↔ class/object links), `opc_msgovf`
|
||||
(pending updates to front-ends). They depend on each other: losing one corrupts the whole
|
||||
store; check with `opcdbg` utilities 5, repair with 6. Back them up together (they are part of
|
||||
the `tls\dat` backup).
|
||||
|
||||
Related datasets (read with `dssqld -e`, see `IM36K10J10-01EN.md`): `CLASS_DF`, `OBJECT_DF`,
|
||||
`TRIGGER_DF`, `CLASS_SIGNAL_DF`, `OBJECT_SIGNAL_DF` (object:signal → item), `CLASS_ATTR_VAL`,
|
||||
`OBJECT_ATTR_VAL` (attribute values, writable with `dssqld -m`), `CLASS_INCLUDED_DF`,
|
||||
`CLASS_RESET_COMMAND` (system-wide reset command used by the Engineering Module; not practiced).
|
||||
167
knowledge/manuals/IM36K10P10-01EN.md
Normal file
167
knowledge/manuals/IM36K10P10-01EN.md
Normal file
|
|
@ -0,0 +1,167 @@
|
|||
---
|
||||
manual: IM 36K10P10-01EN
|
||||
title: Class Description Language - Traditional
|
||||
edition: 3rd Edition, Sep. 2023
|
||||
version: R1.03
|
||||
status: from docs; PROLOG/ATTRIBUTE/PROMPT/ERROR, SIGNAL to an existing item and SIGNAL … FROM … MAKE, TRIGGER VALUE, the SECTION constant, transitional >=:, PRINT and runtime attribute change verified with CI-Eng-Sample class CIENG_TANK on 2026-09-30; everything else from docs
|
||||
---
|
||||
|
||||
# Traditional PROCESS Service language (R1.03)
|
||||
|
||||
Summary in own words; section numbers refer to the manual. Engineering of classes and objects:
|
||||
`IM36K10L10-01EN.md` and skill `class-object-engineering`.
|
||||
|
||||
## 1. Structure (§1, §11.1)
|
||||
|
||||
```
|
||||
CLASS <name>; { name max 15 characters }
|
||||
PROLOG { optional class prolog: runs when an object is CREATED }
|
||||
<local declarations, CONTAINS, ATTRIBUTE, PROMPT, SIGNAL, statements>
|
||||
BODY { needed only when there is a class prolog }
|
||||
<global declarations: CONSTANT, VAR, TIMER, ALARM, ITEM, FOR>
|
||||
METHOD <name>; { method name max 50 characters }
|
||||
ENTRYCONDITION <cond>; { optional guard }
|
||||
<local declarations>
|
||||
PROLOG <statements> { optional: first run / after going on-line }
|
||||
BODY <statements>
|
||||
EPILOG <statements> { optional: when deactivated }
|
||||
ENDMETHOD <name>;
|
||||
ENDCLASS <name>;
|
||||
```
|
||||
|
||||
- Comments: `{ … }`, may span lines.
|
||||
- All methods of an active object run "simultaneously" (like tasks), not in order.
|
||||
- Method parts by state: becoming active → prolog + body; staying active → body; becoming
|
||||
inactive (entry condition false or object off-line) → epilog (Table 1.3-1).
|
||||
- **Control item** (optional, per object): blocked = methods suspended; off-line = stopped,
|
||||
on-line again = start as new. Its value is `STEP` (below).
|
||||
- `SEQUENCE`/`SUBSEQUENCE` are old synonyms of `CLASS`/`METHOD`; do not use.
|
||||
- Enterprise classes (Enterprise Engineering Module): extra `MAKE` fields `CREATE_ITEM`,
|
||||
`PUT_IN_HISTORY`, `ALARM_DETECTION` = `MASTER_ONLY` / `DELEGATE_ONLY` / `MASTER_AND_DELEGATE`;
|
||||
ignored in local classes (§1.6).
|
||||
|
||||
## 2. Declarations (§2, §11.2)
|
||||
|
||||
| Declaration | Syntax (short) | Notes |
|
||||
|---|---|---|
|
||||
| Constant | `CONSTANT a := 1, b := 2.5;` | Type from the expression |
|
||||
| Variable | `VAR x [INTEGER\|FLOAT\|STRING];` | Default FLOAT; numbers convert, strings and numbers do not mix |
|
||||
| Timer | `TIMER t [TRIGGER];` | Value = seconds left; `t'status` STOPPED / RUNNING / EXPIRED (initial EXPIRED). Assign seconds to start; 0 → EXPIRED. `TRIGGER` runs the object on expiry |
|
||||
| Alarm | `ALARM a [TRIGGER];` | Value = alarm text, `a'status` NORMAL/A1/A2/A3 (OR `ACKNOWLEDGE`), `a'priority`. Needs `ALARM-ITEMS` in `opc.sup` (not set on the installed system) |
|
||||
| Attribute | `ATTRIBUTE n [OBJECT\|CLASS] [INTEGER\|FLOAT\|STRING];` | In class prolog only. OBJECT (default) = per object; CLASS = one value for all objects. Kept across restarts. Name max 15 |
|
||||
| Prompt | `PROMPT n QUERY "text";` / `NOPROMPT path;` | Asks the value of an OBJECT attribute when an object is created. Declaration, not a statement |
|
||||
| Containment | `CONTAINS alias := other_class;` | Include another class; access `alias.signal`, nest `a.b.signal` |
|
||||
| Signal | see §3 | In class prolog only |
|
||||
| Item / For | `FOR [node:]inst[.unit]; ITEM tag [TRIGGER type];` | Fixed item names (first two section levels only); prefer SIGNAL |
|
||||
|
||||
Limits: identifiers 50 characters (class, attribute, signal, function names 15); string values
|
||||
max 255 characters.
|
||||
|
||||
## 3. Signals (§2.3, §11.2.8)
|
||||
|
||||
A signal links the object to an item whose name is computed **when the object is created**,
|
||||
so each object can use different items.
|
||||
|
||||
```
|
||||
SIGNAL LEVEL := SECTION || ".LEVEL" TRIGGER VALUE; { existing item }
|
||||
SIGNAL VOLUME := FROM "<template item>[;<station>:<template point>]" MAKE
|
||||
"DESCRIPTION" EQUAL "text" "NAME" EQUAL "<new item name>" … ; { create the item }
|
||||
```
|
||||
|
||||
- Types `INTEGER`, `FLOAT` (default), `STRING` after the signal name.
|
||||
- `FROM … MAKE`: copies the template item (and point) and overrides the listed fields; any field
|
||||
of `ITEM_DF`, `SUB_ITEM_DF`, `ITEM_HIS_DF` and the station's `POINT_DF` may be used (e.g.
|
||||
`"STATION"`, `"POINT"`, `"IO_ADDRESS"`, `"ALARMING" EQUAL ON`, `"PROCESS_LIST" EQUAL "1,3"`).
|
||||
Storage: `"GROUP_NAME" EQUAL "<group>"` followed by its storage fields (`"STORE_VALUE"`,
|
||||
`"ON_VALUE_CHANGE"` …); up to 4 groups; order matters. A template's own history membership is
|
||||
**not** copied.
|
||||
- Without `"NAME"` the item is named `<object>.[<containment path>.]<signal>` and missing
|
||||
sections are created (verified: object `CI-Eng-Sample.TANK1.CALC`, signal `VOLUME` →
|
||||
item `CI-Eng-Sample.TANK1.CALC.VOLUME`). Sub-items always need a name.
|
||||
- Items and sections the object created are **deleted with the object** (verified), unless the
|
||||
object has `LEAVE_ITEMS`; existing items are only unlinked.
|
||||
- An empty template name creates nothing: the signal stays unattached (`sig'attached` false).
|
||||
- Creating a point that already exists fails the object creation.
|
||||
- Use `||` to build names; a comma in a SIGNAL statement is read as a list separator.
|
||||
- Release notes: if the object sits at root level `SECTION` is empty — build names as
|
||||
`IF SECTION = "" THEN tag ELSE SECTION || "." || tag`; prefer automatic naming.
|
||||
|
||||
**Trigger types** (combine with `|`): `VALUE`, `STATUS`, `OPTION`, `UPDATE`, `FIRST`, `PIT`,
|
||||
`LIMIT`, `QUALITY`.
|
||||
|
||||
**Signal attributes** (`sig'attr`; plain `sig` = value): `VALUE`, `OLD_VALUE`, `STATUS`,
|
||||
`CONTROL_STATUS`, `OPTION_STATUS` (`OPT_BLOCKED`, `OPT_OFF_LINE`, … with bitwise operators),
|
||||
`MERGED_STATUS`, `ALARM_TYPE`, `ACKNOWLEDGED`, the four limits, `DEADBAND`, `QUALITY`,
|
||||
`UPDATE_TIME`, `ID_*`, `SECTION`, `TAG`, `SUB`, `APPLICATION_INFO[i]`/`_SIZE`/`_FLAG`,
|
||||
`LOCKED`, `ATTACHED`. Which are writable differs between the manual's two tables (§2.3 vs
|
||||
§11.2.8); value and limits are writable in both. To set value and status together use
|
||||
`SIG_UPDATE`.
|
||||
|
||||
**Object constants**: `NOW` (GMT, float seconds), `NODE`, `INSTALLATION`, `UNIT`, `SECTION`
|
||||
(object's section path — verified), `TAG` (object's tag), `CLASS`.
|
||||
|
||||
## 4. Statements and expressions (§3–5, §11.4–11.5, §11.7)
|
||||
|
||||
| Statement | Example | Notes |
|
||||
|---|---|---|
|
||||
| Assignment | `x := 12;` | To variable, signal (writes the item), attribute, timer, alarm |
|
||||
| Add | `x :+ 5;` / `x :+ -5;` | |
|
||||
| IF | `IF c THEN … [ELSE …] ENDIF;` | Nestable |
|
||||
| TRIGGER | `TRIGGER 60;` / `TRIGGER CLASS alias;` | Run again after n s (last one wins); trigger a contained class |
|
||||
| PRINT | `PRINT "text ", x;` | To the message log when `PRINT = YES` (installed). A `%` in the text cuts the message (ISS-025) |
|
||||
| ERROR | `ERROR "text";` | In a method: logs and stops this run. In the class prolog: **object creation is refused** and the text is returned (verified: `dssqld` `.qlo` shows `OPC-E-INFO, <text>`) |
|
||||
| STEP | `ENTRYCONDITION STEP = 2; … STEP := 3;` | Value of the control item; state machine between methods |
|
||||
|
||||
Operators, highest first: unary `+ -`; `NOT ~`; `* /`; `+ -`; string `||` and `,` (comma also
|
||||
joins numbers); `= <> =: <>:`; `< > <= >= <: >: <=: >=:`; `&`; `^`; `|`; `AND`; `XOR`; `OR`.
|
||||
**Transitional** operators (`=:`, `>=:` …) are true only on the evaluation where the comparison
|
||||
**becomes** true (edge detection) — verified: `LEVEL >=: 80.0` fired for 85 and again for 81
|
||||
after 70, not for 90 after 85. `TRUE`/`ON` and `FALSE`/`OFF` are the same.
|
||||
|
||||
`IF TRIGGERED BY GROUP|SIGNAL|TIMER|TRIGGER|ALARM|ONCE` tells why the object ran;
|
||||
`TRGSIG(sig)`, `TRGTIM(t)`, `TRGALM(a)` name the exact source. A trigger group with interval
|
||||
**ONCE** runs the object once when it is created, reset, its class reset, or PROCESS starts —
|
||||
good for initialisation (`ENTRYCONDITION TRIGGERED BY ONCE;`).
|
||||
|
||||
Format strings for `STRING(x, "fmt")` (§11.7.4): `9` digits, `0` leading zeros, `+` sign,
|
||||
`.` decimal point, `EEEE` exponent; dates (seconds since 1970) `D DD DDD M MM MMM Y YY YYYY
|
||||
Hh Mm Ss P`; `\` escapes; `%…` C-style (`%5.2f`); empty = `%g`.
|
||||
|
||||
## 5. Built-in functions (§6.2, §11.6)
|
||||
|
||||
- Maths: `ABS`, `TRUNC`, `SQRT`, `POWER`, `EXP`, `LOG`, `LOG10`, `SIN`/`COS`/`TAN`,
|
||||
`ARC…`, `…HYP`, `RANDOM`.
|
||||
- Time: `NOW`, `GMT`, `LCT` (local time), `ADDMONTH`, `DAYS`.
|
||||
- Strings/conversion: `LENGTH`, `LEFT`, `MIDDLE`, `RIGHT`, `STRING`, `INTEGER`, `FLOAT`.
|
||||
- Trigger info at trigger time: `TRGSIG_VALUE`, `TRGSIG_OLD_VALUE`, `TRGSIG_STATUS`,
|
||||
`TRGSIG_QUALITY`, `TRGSIG_UPDATE_TIME`, limits, `…_STR_VALUE` etc.
|
||||
- Signal functions: `SIG_UPDATE(sig, value, status, add)`, `SIG_UPDATE_TIME(…, time)` (sends
|
||||
time to ITM; size its queue), `SIG_OFFLINE(sig, on)`, `SIG_LOCK`, `SIG_FORCE_ALARM_STATE`,
|
||||
`SIG_GETSUB(sig, avg, reset)` (read and reset a sub-item in one step), `SIG_GET_…`/`SIG_SET_…`
|
||||
by attribute id (ids from Yokogawa).
|
||||
|
||||
**User functions** (§7): class named `FUNCTIONS` (no objects from it) with
|
||||
`FUNCTION [INTEGER|FLOAT|STRING|VOID] name; ARG a FLOAT, …; <CONSTANT/VAR>; <statements>;
|
||||
RETURN v; ENDFUNCTION name;`. Max 10 arguments, passed by reference; a user function with a
|
||||
built-in's name overrides it.
|
||||
|
||||
## 6. Datasets from a class (§12)
|
||||
|
||||
- Basic: `DSS_READ_STRING|INTEGER|FLOAT(dataset, record NAME, field, result)` and
|
||||
`DSS_UPDATE_STRING|INTEGER|FLOAT(…)`; `result` 1 = OK.
|
||||
- Advanced: `id := DSS_OPEN(dataset, "F1, F2", "rudi", result)` or `DSS_OPEN_ALL`;
|
||||
`DSS_READ_EQUAL(id, name)`, `DSS_READ_NEXT`, `DSS_SET_FILTER` / `DSS_REMOVE_FILTER`,
|
||||
`DSS_GET_…` / `DSS_PUT_…` on the field buffer, then `DSS_UPDATE`, `DSS_INSERT`,
|
||||
`DSS_DELETE`; always `DSS_CLOSE(id)` (otherwise memory leaks). `DSS_ERROR_LOG(on)`.
|
||||
- Only STRING, INTEGER, FLOAT data types are supported.
|
||||
|
||||
## 7. AGA gas calculations (§13)
|
||||
|
||||
`AGA_INIT`, `AGA_COMP` (composition), `AGA_CALC`, `AGA_3_METER`, `AGA_CONE`, `AGA_PULSE`,
|
||||
`AGA_8_GROSS`, `AGA_9_…` (ultrasonic), `AGA_R_…` result getters, `AGA_ERROR`. Not practiced;
|
||||
see the manual's §13.2 example if needed.
|
||||
|
||||
## 8. Examples in the manual (Appendix 1)
|
||||
|
||||
`TWIN_UNIT_CONTR` (STEP state machine with timers, transitional operators and limit changes)
|
||||
and `SENSOR`/`FLUID_VESSEL` (containment). Reserved words: Appendix 2.
|
||||
139
knowledge/manuals/IM36K10P11-01EN.md
Normal file
139
knowledge/manuals/IM36K10P11-01EN.md
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
---
|
||||
manual: IM 36K10P11-01EN
|
||||
title: Class Description Language - Java
|
||||
edition: 3rd Edition, Sep. 2023
|
||||
version: R1.03
|
||||
status: from docs; a Java class (attachItemToSignal, createItemForSignal with automatic name, Signal.Trigger.VALUE, signalEvent, systemMessage) compiled on quick load and run on the test system with CI-Eng-Sample class CIENG_JFLOW on 2026-09-30; everything else from docs
|
||||
---
|
||||
|
||||
# Java PROCESS Service language (R1.03)
|
||||
|
||||
Summary in own words; section numbers refer to the manual. Engineering: `IM36K10L10-01EN.md`,
|
||||
skill `class-object-engineering`. The full API reference is only in the Engineering Module
|
||||
class editor (F1).
|
||||
|
||||
## 1. What Java adds (§1)
|
||||
|
||||
Arrays of signals/attributes, loops, inheritance (`extends` another PROCESS class), any Java
|
||||
library (TCP/IP, files, web services), and signals that need not be attached. Java and
|
||||
Traditional classes cannot contain each other. Compiled by `OPCJCOM`, created by `OPCJACT`, run
|
||||
by `OPCJEXE` (see L10 summary).
|
||||
|
||||
## 2. Class layout (§1.1, §3)
|
||||
|
||||
```java
|
||||
import fasttools.processfast.*; // the framework; import other packages as usual
|
||||
public class CIENG_JFLOW extends ProcessClass { // name = class name in CLASS_DF, exactly
|
||||
// definitions: class level only, no public/protected modifiers
|
||||
Signal sInflow = defineDoubleSignal(Signal.Trigger.VALUE);
|
||||
Signal sPerMin = defineDoubleSignal();
|
||||
Attribute aCapacity = defineDoubleAttribute(Attribute.Scope.OBJECT);
|
||||
Timer tCheck = defineTimer();
|
||||
|
||||
public void create() { /* object created: attach or create items */ }
|
||||
public void destroy() { /* object deleted (items are detached automatically) */ }
|
||||
public void start() { /* object starts: after create and at every CI Server start */ }
|
||||
public void stop() { /* CI Server stops (not guaranteed, e.g. HA switch) */ }
|
||||
public void signalEvent(Signal signal) { }
|
||||
public void timerEvent(Timer timer) { }
|
||||
public void triggerGroupEvent(TriggerGroup triggerGroup) { }
|
||||
}
|
||||
```
|
||||
|
||||
Naming advice: `s…` signals, `a…` attributes, `t…` timers, `c…` containments, `m…` locals;
|
||||
identifiers max 15 characters. Omit methods you do not need.
|
||||
|
||||
**Two environments** (§3.4, important): `create()`/`destroy()` run in the *creation*
|
||||
environment (`OPCJACT`), everything else in the *runtime* environment (`OPCJEXE`). Signals have
|
||||
items only at runtime; timers only at runtime; plain Java fields and objects set in `create()`
|
||||
are gone at runtime — only **attributes** carry values across. Static fields are not shared
|
||||
between objects of different priorities. Share data through class-scope attributes or items.
|
||||
|
||||
## 3. Signals (§4)
|
||||
|
||||
- `defineIntegerSignal()`, `defineDoubleSignal()`, `defineStringSignal()` (string max 79
|
||||
characters); `…SignalArray(n)` or `…SignalArray(trigger, n)`; max 4095 signals per class.
|
||||
- Triggers: `Signal.Trigger.VALUE | STATUS | OPTION | UPDATE | FIRST | PIT | LIMIT | QUALITY`
|
||||
as argument of `define…Signal()`. Without it the signal never triggers.
|
||||
- In `create()`:
|
||||
- `attachItemToSignal(sig, "<item>")` — the item must exist, else creation is cancelled and
|
||||
rolled back.
|
||||
- `createItemForSignal(sig, "<template>[;<station>:<template point>]", "FIELD", value, …)` —
|
||||
any `ITEM_DF` field; `"STORAGE_GROUP", "<group>"` followed by `ITEM_HIS_DF` fields (order
|
||||
matters, max 4 groups); with a point, prefix shared names: `"ITEM'DESCRIPTION"`,
|
||||
`"POINT'DESCRIPTION"`, and use the station's point dataset fields (`STATION`,
|
||||
`IO_ADDRESS` …). Sub-items: template must be a sub-item, main item must exist, name required.
|
||||
- Without `"NAME"` the framework names the item `<object>.<signal identifier>` and creates
|
||||
the sections; **the identifier's case is kept** (verified: `CI-Eng-Sample.TANK1.JFLOW.sPerMin`;
|
||||
item names are case-sensitive for `itmval`). Framework-created items and sections are
|
||||
deleted with the object (verified) unless *Leave items* is set.
|
||||
- `createSection(path, description, process areas, blocked, opcVisible)` creates sections
|
||||
you name yourself; the framework cannot always undo these — prefer automatic names.
|
||||
- Name helpers: `getTag()`, `getSectionsPath()`, `getSections()`, `getFullIdentifierPath(x)`,
|
||||
`getContainerIdentifierName()`, `getContainerIdentifierPath()`, `getNode()`.
|
||||
- Unattached signals: `sig.isAttached()`; most methods throw on an unattached signal.
|
||||
- Handling: override `signalEvent(Signal signal)` and compare with `==`, or add a named inner
|
||||
class implementing `SignalListener` in `start()` (`addSignalListener`); **anonymous listeners
|
||||
compile but fail at start** (`NoClassDefFoundError` in the log).
|
||||
- The signal passed to the handler holds the attribute values of the moment of the trigger.
|
||||
- Common methods: `getValueAsDouble/Integer/String()`, `getOldValueAs…()`, `setValue(x)`,
|
||||
`setValueAndStatus(x, Signal.Status.MANUAL)`, `setStatusNumber(Signal.Status.FAILED)`,
|
||||
limits `get/setHighLimit()` … (throw when the item has no such limit — catch it),
|
||||
`isOffline()`, `setOffline()`, `isBlocked()`, `getQuality()`, `getUpdateTime()`,
|
||||
`getValueAsDoubleAndReset()` (sub-items), `setValueAndTime()`.
|
||||
- Control item: `hasControlSignal()`, `getControlSignal()`; blocked control item = triggers
|
||||
ignored.
|
||||
|
||||
## 4. Attributes (§5)
|
||||
|
||||
`defineIntegerAttribute(scope)`, `defineDoubleAttribute(scope)`, `defineStringAttribute(scope)`
|
||||
(string max 255), `…AttributeArray(scope, n)`; scope `Attribute.Scope.OBJECT` or `.CLASS`.
|
||||
Prompts: `defineStringAttributeForPrompt("Question:")` (always OBJECT scope; max 100 prompts);
|
||||
read it in `create()` and call `cancel("message")` to refuse the object (rolls back). Attributes
|
||||
survive restarts and are visible in the Engineering Module, but writing them is heavy (disk,
|
||||
and for CLASS scope every runtime) — use them for settings, not process values.
|
||||
|
||||
## 5. Timers and trigger groups (§6, §7)
|
||||
|
||||
- `defineTimer()` (no arrays; not usable in `create()`/`destroy()`); `t.start(10)` or
|
||||
`setTime(10)` + `start()`; `setRepeat(true)`; `cancel()`; resolution 1 s. Handle in
|
||||
`timerEvent()` or with a named `TimerListener`.
|
||||
- Trigger groups are assigned in engineering (class or object), not in code; handled in
|
||||
`triggerGroupEvent(tg)` (`tg.getName()`, `tg.getInterval()`, `TriggerGroup.Interval.…`).
|
||||
Use a trigger group for periodic work, a timer for "check again after a while". ONCE groups
|
||||
are unnecessary: use `start()`.
|
||||
|
||||
## 6. Containment and inheritance (§8, §9)
|
||||
|
||||
- `VALVE cGas = (VALVE)defineContainment("VALVE");` — never `new VALVE()`. Prompts of a
|
||||
contained class become normal attributes: set them in the container's `create()`
|
||||
(`cGas.aStation.setValue(…)`).
|
||||
- `create()`/`destroy()` of contained classes are called automatically after the container's
|
||||
(`call(cX).create()` to force order); `start()`/`stop()` and the `…Event()` methods are **not**
|
||||
— call or forward them yourself, or use listeners in the contained class.
|
||||
- Inheritance: `public class BOILER_MIXER extends BOILER`; call `super.create()`,
|
||||
`super.signalEvent(signal)` etc.; prompts of the super class are kept. A shared base class
|
||||
(e.g. `BASE_CLASS extends ProcessClass`) holds helper methods; each subclass loads its own
|
||||
copy (no shared statics). Plain Java code can go in a jar in `%TLS_ROOT_PATH%\tls\exe`; its
|
||||
classes must have a package name.
|
||||
|
||||
## 7. Runtime behaviour (§10)
|
||||
|
||||
- Keep trigger methods short, never sleep: one object holds up all objects **of the same
|
||||
priority** (one thread per priority). Give slow objects their own priority, or extra
|
||||
executors per priority range.
|
||||
- Exceptions in `create()` cancel the creation; in a trigger method they abort that trigger and
|
||||
are logged. Use `try/catch`.
|
||||
- `systemMessage("text")` writes to the message log (`umhlog.log`, sender `OPCJEXE`, prefixed
|
||||
with the object name — verified); `cancel("text")` also stops the current trigger.
|
||||
- `getStatistics()` → processed/lost/queued events, execution times.
|
||||
- The manual says a changed class must be compiled **and reset**, and a new class reset before
|
||||
its first object. On the test system a new class compiled by quick load ran its first object
|
||||
without a reset (ISS-029); after changing a class with objects, reset it (skill task
|
||||
`change-reset-class.md`).
|
||||
- Release notes (IM 36K01A50): Java classes that use datasets must get the session with
|
||||
`getDssSession()` and never close it.
|
||||
|
||||
## 8. Examples in the manual (Appendix 1)
|
||||
|
||||
Valve, boiler (containment), twin boiler, mixer boiler (inheritance), city temperature.
|
||||
Loading…
Add table
Reference in a new issue