--- task: Read and write item values with itmval version: R1.03 source: IM 36K10J10-01EN §2.9.2; practiced on the test system and CI-Eng-Sample 2026-09-30 status: verified --- # Read and write item values (itmval) Needs CI Server running. Reading is read-only. **Writing changes live data**: follow the user's chosen way of working (direct vs prepare only) and never write to an item that drives real equipment without explicit approval. Item names are full paths: `
..`, e.g. `CI-Eng-Sample.TANK1.INFLOW` from the sample project. ## Read the current value ``` itmval -g -n
. ``` Output: ``` Value = 130 Status = 9 Options = 0xffffff88.00 ack Quality = 0 ``` - **Status** is a number from `STATUS_DF` (export it with `dssqld -e status_df.qli -d STATUS_DF -c` to look numbers up). Common ones: 9 `NORMAL`, 13 `NOT INIT` (never written; new items start here), 4 / 5 `BOOLEAN 0` / `BOOLEAN 1`, 11 `HIGH HIGH`. - **Options** lists item flags as words after the hex value (option bits, IM 36K10C10 §3.5): `blk` 1 blocked, `off` 2 offline (station not communicating), `uoff` 4 **updated offline** (written by an application such as `itmval` while offline), `ack` 8 acknowledged, `ublk` 16 **updated blocked** (written while blocked, e.g. with `-o`); 32/64 direct/delayed alarm. So writing a station item whose station is down adds `uoff` (0x…8a → 0x…8e); internal items (no station) never get it. ## Read limits ``` itmval -g -n
. -a ``` ``: 1 deadband, 2 low, 3 high, 4 low-low, 5 high-high. The limit is returned in `Value`. Items with no limits configured return `ITM-E-WRONG_ATT, Wrong attribute number used`. ## Write a value ``` itmval -p -n
. -v [-s ] [-q ] ``` - Read the item first and note its value, so it can be restored. - Booleans take `-v 0` / `-v 1`; the status follows automatically (4 / 5). - `-s` sets the status explicitly (e.g. `-s 9` NORMAL). Without it, a numeric write gives 9. - `-o` overwrites a blocked item; `-t []