ci-server-engineer/knowledge/manuals/IM36K10P10-01EN.md
2026-10-01 17:52:25 +10:00

10 KiB
Raw Blame History

manual title edition version status
IM 36K10P10-01EN Class Description Language - Traditional 3rd Edition, Sep. 2023 R1.03 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 single % cuts the message; %% prints % (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.