diff --git a/knowledge/manuals/IM36K10L10-01EN.md b/knowledge/manuals/IM36K10L10-01EN.md new file mode 100644 index 0000000..ff4883e --- /dev/null +++ b/knowledge/manuals/IM36K10L10-01EN.md @@ -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 ` 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). diff --git a/knowledge/manuals/IM36K10P10-01EN.md b/knowledge/manuals/IM36K10P10-01EN.md new file mode 100644 index 0000000..0e01318 --- /dev/null +++ b/knowledge/manuals/IM36K10P10-01EN.md @@ -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 max 15 characters } + PROLOG { optional class prolog: runs when an object is CREATED } + + BODY { needed only when there is a class prolog } + + METHOD ; { method name max 50 characters } + ENTRYCONDITION ; { optional guard } + + PROLOG { optional: first run / after going on-line } + BODY + EPILOG { optional: when deactivated } + ENDMETHOD ; +ENDCLASS ; +``` + +- 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 "