Generated reference › Gauge — Control Systems/Dashboard
kind: generated#block#control-systems-dashboard

Gauge — Control Systems/Dashboard

Control_Systems/Dashboard/Gauge · 0 input / 0 output port(s) at insert · exports to Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text

Description#

The block's own DESCRIPTION_HTML, rendered verbatim — the same text the config dialog's info panel and the library navigator show. Fix a wrong sentence in the block's .cpp (R-D9), never here.

Gauge (Dashboard)

Control Systems / Dashboard

Shows the value of a signal it is told the name of on a dial: a needle against a scale from Minimum to Maximum, the colour bands drawn on the scale, and the number itself written inside the dial. The dial is round, a half, a quarter or a straight bar (Shape). It has no ports at all.

Ports

  • None. Not one input, not one output. That is what makes it a dashboard block.

Naming the signal to watch

ICore links carry names, and that name is the selection: rename a link (its name is editable like a block's) and put that name here. A name containing / is matched against the link's full path instead. Matching runs over this block's own subsystem and everything below it, never above – that is exactly the set of signals a generated core contains.

Which of the three one-number dashboard blocks to use

  • Display – the number itself, formatted. No range, no colour.
  • Lamp – a colour per EXACT value: a mode, a flag, a fault code.
  • Gauge (this block) – a number inside a range, on a dial with a colour per RANGE. Simulink's ScaleColors pairs a colour with a {Min, Max} band rather than with a value, and that is the whole difference from the Lamp.

Parameters

  • Signal – the link name to read, for example speed or Plant/rpm. Empty reads nothing. This names a link in the diagram, not a variable, so it is never looked up in the variables space. A name that matches no link is reported by name when the run starts.
  • Minimum / Maximum – the two ends of the scale, labelled on it with the even ticks between. Minimum must be below Maximum.
  • Band Limits – one row per colour band, [min max] per row: [0 60; 60 100]. Empty means no bands, which is Simulink's own default.
  • Band Colors – one RGB row per band, components 0–255: [0 200 0; 200 0 0]. It must have exactly as many rows as Band Limits, and exactly three columns.
  • Default Color – no longer drawn: a value in no band shows on the bare scale, as Simulink's gauge does. Kept so that a file setting it still loads.
  • Format – short (4 decimals), long (15), short_e / long_e (scientific), bank (2 decimals). The same five as Display.
  • Refresh Period (s) – how often the dial is repainted, in wall-clock seconds, so a fast run does not turn the needle into a blur. Zero or less repaints on every sample; the final sample of a run is always shown.
  • Sampling Time (s) – how often the value is read. Zero or less inherits the solver's rate.
  • Shape – Circular (default), Half, Quarter or Linear: Simulink's Gauge, Half Gauge, Quarter Gauge and Linear Gauge. The round scale sweeps 300° with its gap at the bottom, the half one 180° over the top, the quarter one 90° and the bar runs left to right; each has eleven ticks, as Simulink draws them.

How a band is chosen

A band matches when min ≤ value ≤ max, and the FIRST matching row wins – so two bands sharing an endpoint, as [0 60; 60 100] do, give 60 to the earlier one. A value in no band is in no band, and so is a value outside Minimum..Maximum unless a band covers it: the bands are matched on the value as it arrives, never on a clamped one. The NEEDLE, though, pins at the end of the scale, as Simulink's does, and the number written in the dial is the value unclamped. The band index is what the exported code reports.

Notes

  • The value is one sample behind. Solver order follows input dependencies, and a block with no inputs has none – so this block runs at the head of every step and reads what its source published on the previous one.
  • Only the FIRST element of a matrix signal is read – one gauge shows one number.
  • This one block covers all four Simulink gauges. Gauge, Half Gauge, Quarter Gauge and Linear Gauge were measured field by field on R2026a: the same nine parameters and not one differing default between any pair. They differ only in the shape drawn on the canvas, which is this block's Shape.

Code export

All ten targets: Python, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog and PLC Structured Text. A deployable target has no dial, so each one emits the VALUE and the BAND INDEX it falls in – the 0-based row of Band Limits that matched, or -1 for none. The band index is the block's whole computation and the half a deployable target can act on: drive an alarm or a warning light from it. PLC Structured Text emits comments only, naming the signal array entry to tap, since ST has no console. The one-sample shift applies to the exported code too, so the export agrees with the app.

Code-export verification

This block is excluded from the code-export verification matrix, by name, in ICoreParityRigLibrary::unriggableTypes(). The verifier records a terminal block's input signals and compares them; a block with no inputs records nothing, so a rig around it would fail all ten languages at residual 0 with "Each matrix must have at least two columns" – a red row that says nothing about the block.

Simulink bridge

None, and that is a measurement rather than a gap. Simulink's Gauge (BlockType=CircularGaugeBlock) has ZERO ports of any kind and is VIRTUAL – measured on R2026a, where a model holding one and nothing else refuses to run with "contains no blocks or all blocks are virtual". It reaches its signal through Binding, a canvas selection stored outside the block's parameters, and ICore has no counterpart for that. This block is the ICore reading of it – the signal is named rather than clicked – so it is a DIFFERENT block from the Simulink one rather than a mapping of it, and it is reported on exchange rather than asserted.

Code facts#

FactValue
registered typeControl_Systems/Dashboard/Gauge
familyControl_Systems/Dashboard
solver environment classICoreBlock_0_Control_Systems_1_Dashboard_2_Gauge
sourcesrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Control_Systems/Dashboard/Gauge/ICoreBlock_0_Control_Systems_1_Dashboard_2_Gauge.cpp
headersrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Control_Systems/Dashboard/Gauge/ICoreBlock_0_Control_Systems_1_Dashboard_2_Gauge.h
default size on canvas90 × 60 px
ports at insert0 in, 0 out
code generators implementedPython, MATLAB, Java, Rust, C, C++, VHDL, Verilog, SystemVerilog, PLC Structured Text

Ports#

The constructor creates no port explicitly — the port list comes from registerInitialPorts (0 in, 0 out) or from the block's configuration.

Configuration variables#

Config variableDefaultSimulink parameter
Signal——
Minimum0—
Maximum100—
Band Limits[]—
Band Colors[]—
Default Color[192 192 192]—
Formatshort%~%long%~%short_e%~%long_e%~%bank~~short—
Refresh Period (s)0.1—
ShapeCircular%~%Half%~%Quarter%~%Linear~~Circular—

Every block also carries Sampling Time (s) from ICoreBlockSolverEnvironment: zero or less inherits the solver's rate, a positive value runs the block at that period.

supportSupport::None
Simulink path—
port-count rulePortsParam::None
SampleTime parameteryes

Caveat (shown to the user): Simulink's Gauge (BlockType=CircularGaugeBlock) has ZERO ports of any kind and is VIRTUAL - measured on R2026a, where a model holding one and nothing else refuses to run with "contains no blocks or all blocks are virtual". It does not receive its value on a wire: it reaches the signal through Binding, a canvas selection stored outside the block's parameters, and ICore has no counterpart for that. This block is the ICore reading of that gauge - the signal is named rather than clicked - so it is a DIFFERENT block from the Simulink one rather than a mapping of it, and it is reported on exchange rather than asserted. There is also nothing to compare against: the Simulink block is virtual, so no simulation of it produces a sample. This one block also covers Simulink's Half Gauge, Quarter Gauge and Linear Gauge, whose dialogs were measured to be byte-identical to the Gauge's - same nine parameters, not one differing default - and which differ only in the shape drawn on the canvas

Catalog contract: src/ICoreBlocks/ICoreCoder/ICoreCommandSystem/SimulinkBridge/ICoreSimulinkBlockCatalog.h

Description vs code#

The checker has a blind spot here — it could not resolve something (a grouped port bullet, a computed config name), which is reported and never counted as a pass. A reader has to settle it:

  • B0 no sample under docs/generated/samples/ — nothing to cross-check (P8.1)

The verdict above is tools/docs/check_block_descriptions.py (P7.1), which compares LISTS. It cannot read a sentence: "stateless" on a block with a state, an initial-value semantic the recursion does not implement, a "not synthesizable" caveat the HDL banner contradicts. That is the agent audit (P7.3) on BLOCK_DESCRIPTION_AUDIT.md, and this tool's green is not a substitute for one.

File banner (developer view)#

The top comment of the block's .cpp — the maths, the realization and the export strategy, addressed to whoever changes it. It must not contradict the description above (P7.5).

Dashboard Gauge -- a bound value shown against a RANGE, with a colour band Zero ports. "Signal" names the link to read; the value is shown on a DIAL drawn on the block's face -- needle, scale, colour bands and the number (FEATURES_TO_ADD.md BF5.8, through ICoreBlock::setFaceDrawing). Until BF5.8 the number went in a readout plate and the band's colour became the block's body colour, the stand-ins for a dial this tree could not draw.

⚠ ONE BLOCK COVERS ALL FOUR SIMULINK GAUGES, and that is a measurement rather than a shortcut. Gauge, Half Gauge, Quarter Gauge and Linear Gauge were compared field by field on R2026a (2026-09-17): the same nine parameters and NOT ONE differing default between any pair. They differ only in the shape drawn on the canvas, which is this block's "Shape" config (BF5.8, owner decision D5 (b)), so a second, third and fourth block would differ in nothing else at all.

⚠ BANDS ARE RANGES, NOT VALUES, and that is what separates this block from Dashboard/Lamp. Measured: ScaleColors is a struct array of {Min, Max, Color} -- assigning {0..60 green, 60..100 red} is accepted and reads back in that shape. The Lamp's StateColors pairs a colour with a single VALUE instead.

⚠ THERE IS NO SIMULINK COUNTERPART TO MAP ONTO. BlockType=CircularGaugeBlock, ZERO ports of any kind, NO SampleTime, VIRTUAL -- a model holding one and nothing else refuses to run with "contains no blocks or all blocks are virtual". Its signal arrives through Binding, a canvas selection stored outside the block's parameters. Support::None with that as the reason, and no parity testbench is owed or possible: a virtual block produces no sample to compare against at any quality of implementation.

Sample results#

No sample run is committed for this block. Samples come from the headless harness (DOCS_PLAN.md P8.1) into docs/generated/samples/; until one exists this block's behaviour is witnessed by the parity and export-verification suites, not by a plot here.