Skip to content

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-station template builds equivalent level clusters, flow compounds and discharge pressure transmitters inline (see its build() 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.

TemplateLevelSlugRole
Level Instrument Cluster0level-instrument-clusterPrimary level element + transmitter + optional float backups
Inline Flowmeter Compound0flowmeter-compound-inlineFlowmeter 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 ​

ParameterTypeDefaultOptions
primary_typeenumultrasonicultrasonic, radar, submersible-pressure
include_hh_floatbooleantrueindependent high-high float switch
include_duty_floatbooleantrueduty start/stop float switch
tag_prefixstringIPS01e.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 backup

What 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 ​

ScenarioParametersResult
Standard wet-well leveldefaultsUltrasonic LE + LT + HH float + duty float
Foaming / scummy surfaceprimary_type = radarRadar primary element (immune to foam blanket)
Submerged installationprimary_type = submersible-pressureHydrostatic pressure element
Continuous-only (no floats)include_hh_float = false, include_duty_float = falseLT 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 ​

ParameterTypeDefaultOptions
pipe_sizedimensionDN150DN50 – DN600
pipe_materialenumDIDI, uPVC, SS316, HDPE
flowmeter_typeenumelectromagneticelectromagnetic, ultrasonic-inline, vortex
include_bauerbooleantruequick-release bypass coupling for removal
include_drain_dsbooleantruedownstream drain point
drain_sizeenum3/4" BSP1/2", 3/4", 1" BSP
iso_valve_typeenumgategate, butterfly, ball
tag_prefixstringIPS01e.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 ​

ScenarioParametersResult
Standard mag-flow on a rising maindefaultsMag flowmeter, gate isolation, bypass + drain
Clean-water trunk mainflowmeter_type = ultrasonic-inline, iso_valve_type = butterflyClamp/inline US meter, butterfly isolation
Steam / gas serviceflowmeter_type = vortexVortex meter
No-bypass tight installinclude_bauer = falseMeter 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 ​

  1. Templates → Gallery → Common Arrangements → pick Level Instrument Cluster or Inline Flowmeter Compound → Place
  2. Set primary_type / flowmeter_type and toggle the float / bypass / drain options
  3. The loop drops in fully tagged and wired; connect its interface points to your pipe run or vessel

References ​

  1. BS 1646 — symbolic representation for process measurement and control
  2. BS 1553 — general engineering / pipework symbols
  3. Independent high-level float vs. continuous transmitter (functional-safety separation)