MultiStateImage — Control Systems/Dashboard
Control_Systems/Dashboard/MultiStateImage · 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.
MultiStateImage (Dashboard)
Control Systems / Dashboard
A picture that changes with the value of a signal it is told the name of – without being wired to it. Each value listed in State Values has a picture of its own; any other value shows the Default Image. 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.
How the picture is chosen
The watched value is compared against State Values and the FIRST entry it matches wins: the k-th value shows Image k. A value matching nothing, or a state whose picture is empty, shows Default Image; with no default either, the block shows its own library art.
⚠ The match is EXACT, as Simulink's is, and as the Dashboard Lamp's is – this block is the Lamp with a picture where the Lamp has a colour. It is for a signal that takes a few settled values: a mode, a fault code, a switch position. Put a Quantizer or a Compare To Constant in front of it if what you want is a threshold. Only the FIRST element of a matrix signal is read.
Parameters
- Signal – the link name to watch, for example
modeorPlant/fault. Empty watches 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. - State Values – the values that have a picture, at most eight, for
example
[0 1 2]. Default[0], Simulink's one state. - Image 1, Image 2, Image 3, Image 4, Image 5,
Image 6, Image 7, Image 8 – the picture for the first
… eighth state value, chosen with the file picker in the config dialog, which
copies it into the project's
Images/folder and stores its path relative to the project. An image past the last state value is never shown. - Default Image – the picture for any other value. Empty shows the block's own art.
- Sampling Time (s) – how often the value is read. Zero or less inherits the solver's rate.
Notes
- The picture is one sample behind. A block with no inputs has no input dependency, so it runs at the head of every step and reads what its source published on the previous one.
- The block keeps the run's final picture after the run ends.
- Stateless: it shows a picture, and computes nothing a later step reads.
- Simulink's
ScaleModedoes not cross: the picture is fitted into the face the way the block's own art is.
Code export
All ten targets: Python, MATLAB, Java, Rust,
C, C++, VHDL, Verilog, SystemVerilog and
PLC Structured Text. A deployable target has no picture to show, so each one
prints the STATE INDEX the block would be showing – the 0-based position in
State Values that matched, or -1 for the default image –
exactly as the Lamp does. PLC Structured Text emits comments only, naming the
signal array entry to tap. The one-sample shift applies to the exported code
too.
Code-export verification
This block is excluded from the code-export verification matrix, by name: the verifier records a terminal block's input signals, and a block with no inputs records nothing, so a rig around it would fail all ten languages at residual 0 and say nothing about the block.
Simulink bridge
None, and that is a measurement. Simulink's MultiStateImage
(BlockType=MultiStateImageBlock) has ZERO ports of any kind and no
SampleTime, and is VIRTUAL – measured on R2026a. It reaches its
signal through Binding, a canvas selection stored outside the block's
parameters, and its pictures are embedded in the model rather than kept as files.
This block is the ICore reading of it – the signal is named rather than
clicked – so it is reported on exchange rather than mapped.
Code facts#
| Fact | Value |
|---|---|
| registered type | Control_Systems/Dashboard/MultiStateImage |
| family | Control_Systems/Dashboard |
| solver environment class | ICoreBlock_0_Control_Systems_1_Dashboard_2_MultiStateImage |
| source | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Control_Systems/Dashboard/MultiStateImage/ICoreBlock_0_Control_Systems_1_Dashboard_2_MultiStateImage.cpp |
| header | src/ICoreBlocks/ICoreBlockLibrary/Blocks/Control_Systems/Dashboard/MultiStateImage/ICoreBlock_0_Control_Systems_1_Dashboard_2_MultiStateImage.h |
| default size on canvas | 80 × 80 px |
| ports at insert | 0 in, 0 out |
| code generators implemented | Python, 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 variable | Default | Simulink parameter |
|---|---|---|
Signal | — | — |
State Values | [0] | — |
Image 1 | — | — |
Image 2 | — | — |
Image 3 | — | — |
Image 4 | — | — |
Image 5 | — | — |
Image 6 | — | — |
Image 7 | — | — |
Image 8 | — | — |
Default Image | — | — |
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.
Simulink bridge#
| support | Support::None |
| Simulink path | — |
| port-count rule | PortsParam::None |
SampleTime parameter | yes |
Caveat (shown to the user): Simulink's MultiStateImage (BlockType=MultiStateImageBlock) has ZERO ports of any kind, no SampleTime and is VIRTUAL - measured on R2026a. 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 its pictures are embedded in the model (States{k}.Image) rather than kept as files. This block is the ICore reading of it - the signal is named rather than clicked, and each picture is a file in the project - so it is reported on exchange rather than asserted
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:
B0no 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).
MultiStateImage -- a picture that changes with a signal bound by name It has no ports at all. "Signal" names the link to watch; "State Values" lists the values that have a picture and "Image 1" ... "Image 8" give one picture each, in the same order; anything else shows "Default Image". The first matching entry wins, and the match is EXACT.
It is the Dashboard Lamp with a picture where the Lamp has a colour: the binding, the exact match and the ten generators (each reporting the 0-based STATE INDEX) are the Lamp's, so a lamp and a picture bound to the same link always show the same state. The picture goes through ICoreBlock::setFacePicture, which hops to the GUI thread, coalesces, and reads each file once (FEATURES_TO_ADD.md BF22.4); each picture is a config marked setIsImagePath, so the config dialog offers a file picker and copies the picture into the project's Images/ folder (BF22.3).
⚠ MEASURED, R2026a (simulink_hmi_blocks/MultiStateImage, 2026-09-17 and 2026-10-02): BlockType=MultiStateImageBlock, ZERO ports, no SampleTime, VIRTUAL, the value through Binding. Its dialog: States, a struct array of {State, Size, Image, Thumbnail} (default ONE entry, State = 0, no image), DefaultImage {Size, Image, Thumbnail}, and ScaleMode ("Fill with fixed aspect ratio"). So the catalog entry is Support::None with that as its reason, and no parity testbench is owed or possible.
⚠ EIGHT PICTURES, NOT A LIST, AND THAT IS THE PICKER'S SHAPE: a picture config holds ONE file, chosen with one picker, so a state's picture is a config of its own. Eight covers a mode, a fault code or a switch position; a ninth State Value is refused by name.
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.