Appearance
Use Case: Instrumentation Arrangements
Reusable, parametric instrument loops — level clusters and inline flowmeter compounds
Shipped-library note: These instrument arrangements are illustrative authoring patterns, not separately shipped templates. The shipped
sewage-pumping-stationtemplate builds equivalent level clusters, flow compounds and discharge pressure transmitters inline (see itsbuild()in the Overview). Use the patterns here to learn how to model instrument loops with the SDK.
Instrument arrangements are small but fiddly: a level measurement isn't just a transmitter, it's a primary element, a transmitter, often a high-high float backup and a duty float, each with the right signal lines and tags. Modelling them as reusable patterns means the whole cluster drops in correctly every time — and a station template (see Pumping Stations) can place them consistently.
| Template | Level | Slug | Role |
|---|---|---|---|
| Level Instrument Cluster | 0 | level-instrument-cluster | Primary level element + transmitter + optional float backups |
| Inline Flowmeter Compound | 0 | flowmeter-compound-inline | Flowmeter on a pipe run with isolation, optional bypass + drain |
Level 0: Level Instrument Cluster
A complete level-measurement point for a wet well or tank: a primary element, its transmitter, and optional independent float switches for high-high alarm and duty start/stop.
Parameters
| Parameter | Type | Default | Options |
|---|---|---|---|
primary_type | enum | ultrasonic | ultrasonic, radar, submersible-pressure |
include_hh_float | boolean | true | independent high-high float switch |
include_duty_float | boolean | true | duty start/stop float switch |
tag_prefix | string | IPS01 | e.g. IPS01LT |
Layout
╔═══╗ LE primary element (mounted above liquid)
║LE ║ primary_type → ultrasonic | radar | submersible-pressure
╚═╤═╝
│ signal
( LT ) transmitter (instrument-transmitter-circle)
│
─ ─ ─ ─ ─ ─ ─ ─ liquid surface ─ ─ ─ ─ ─
○ HH float (include_hh_float) → high-high alarm, independent of LT
○ duty float (include_duty_float) → pump start/stop backupWhat the code does
typescript
build: (p, ctx) => {
const levelElement = ctx.place('instrument-level-element', { at: [0, 0], tag: `${p.tag_prefix}LE`, props: { instrument_type: p.primary_type } });
const levelTransmitter = ctx.place('instrument-transmitter-circle', { at: [0, 2], tag: `${p.tag_prefix}LT`, props: { function_letter: 'LT', output: '4-20mA HART' } });
// Signal line from the primary element to its transmitter (interface-ref form)
ctx.connect({ symbol: levelElement, port: 'signal_out' }, { symbol: levelTransmitter, port: 'signal_in' });
ctx.when(p.include_hh_float, () => {
ctx.place('instrument-float-switch', { at: [3, 4], tag: `${p.tag_prefix}LSHH` });
});
ctx.when(p.include_duty_float, () => {
ctx.place('instrument-float-switch', { at: [3, 5], tag: `${p.tag_prefix}LSL` });
});
},Variations from one template
| Scenario | Parameters | Result |
|---|---|---|
| Standard wet-well level | defaults | Ultrasonic LE + LT + HH float + duty float |
| Foaming / scummy surface | primary_type = radar | Radar primary element (immune to foam blanket) |
| Submerged installation | primary_type = submersible-pressure | Hydrostatic pressure element |
| Continuous-only (no floats) | include_hh_float = false, include_duty_float = false | LT only — floats covered elsewhere |
The independent float switches matter for functional safety: the HH float is a separate sensing path from the continuous LT, so a single transmitter failure can't disable high-level protection.
Level 0: Inline Flowmeter Compound
A metered section of pipe: upstream/downstream isolation, the flowmeter itself, an optional bypass (Bauer/coupling), and an optional downstream drain — the full "compound" you'd build around any in-line flow element.
Parameters
| Parameter | Type | Default | Options |
|---|---|---|---|
pipe_size | dimension | DN150 | DN50 – DN600 |
pipe_material | enum | DI | DI, uPVC, SS316, HDPE |
flowmeter_type | enum | electromagnetic | electromagnetic, ultrasonic-inline, vortex |
include_bauer | boolean | true | quick-release bypass coupling for removal |
include_drain_ds | boolean | true | downstream drain point |
drain_size | enum | 3/4" BSP | 1/2", 3/4", 1" BSP |
iso_valve_type | enum | gate | gate, butterfly, ball |
tag_prefix | string | IPS01 | e.g. IPS01FE / IPS01FT |
Layout
west ──[ISO]──┬── (FE) flow element ──(FT) transmitter ──[ISO]──┬── east
│ │
[bypass] (include_bauer) [drain] (include_drain_ds)
▼What the code does
typescript
build: (p, ctx) => {
const main = ctx.pipe('main', { size: p.pipe_size, material: p.pipe_material });
ctx.route(main, [[0, 0], [18, 0]]);
// Upstream isolation (valve family is parametric), placed inline on the main
ctx.place(`valve-${p.iso_valve_type}-standard`, { at: [3, 0], on: main, tag: `${p.tag_prefix}V_01` });
// Optional removal bypass, teed off the main (branch requires `at`)
ctx.when(p.include_bauer, () => {
ctx.branch(main, {
at: [5, 0], direction: 'south', size: p.drain_size,
components: [{ symbol: 'valve-bauer-coupling', tag: `${p.tag_prefix}V_02`, offset: [0, 2] }],
terminator: { label: 'DRAIN' },
});
});
// The metering pair: flow element (inline) + transmitter bubble (above), joined by a signal line
const fe = ctx.place('instrument-flow-element', { at: [9, 0], on: main, tag: `${p.tag_prefix}FE_01`, props: { instrument_type: p.flowmeter_type } });
const fit = ctx.place('instrument-transmitter-circle', { at: [9, -3], tag: `${p.tag_prefix}FIT_01`, props: { function_letter: 'FIT', output: '4-20mA HART' } });
ctx.connect({ symbol: fe, port: 'signal_out' }, { symbol: fit, port: 'signal_in' });
// Downstream isolation
ctx.place(`valve-${p.iso_valve_type}-standard`, { at: [15, 0], on: main, tag: `${p.tag_prefix}V_03` });
// Optional downstream drain
ctx.when(p.include_drain_ds, () => {
ctx.branch(main, {
at: [13, 0], direction: 'south', size: p.drain_size,
components: [{ symbol: 'valve-gate-standard', tag: `${p.tag_prefix}V_04`, offset: [0, 2] }],
terminator: { label: 'DRAIN' },
});
});
},Variations from one template
| Scenario | Parameters | Result |
|---|---|---|
| Standard mag-flow on a rising main | defaults | Mag flowmeter, gate isolation, bypass + drain |
| Clean-water trunk main | flowmeter_type = ultrasonic-inline, iso_valve_type = butterfly | Clamp/inline US meter, butterfly isolation |
| Steam / gas service | flowmeter_type = vortex | Vortex meter |
| No-bypass tight install | include_bauer = false | Meter without removal spool |
Variation — valve family. As in the manifold, iso_valve_type interpolates the symbol id (valve-${p.iso_valve_type}-standard), so the whole compound's isolation switches between gate / butterfly / ball in one parameter.
Composing instruments into larger templates
These Level-0 instrument templates aren't only standalone — the Level-1 Inlet Pumping Station composes the level cluster in the wet well and the flowmeter compound on the rising main through their interface points (process_in / process_out and signal_out). Author the loop once; reuse it inside every station and treatment block.
Try it
- Templates → Gallery → Common Arrangements → pick Level Instrument Cluster or Inline Flowmeter Compound → Place
- Set
primary_type/flowmeter_typeand toggle the float / bypass / drain options - The loop drops in fully tagged and wired; connect its interface points to your pipe run or vessel
Related topics
- Drawing Templates Overview
- Template Language Reference — every
param.*andctx.*signature used above - Pumping Stations — composes these instrument arrangements
- Building Process Diagrams
References
- BS 1646 — symbolic representation for process measurement and control
- BS 1553 — general engineering / pipework symbols
- Independent high-level float vs. continuous transmitter (functional-safety separation)