Generated reference › String Display — Control Systems/Strings
kind: generated#block#control-systems-strings

String Display — Control Systems/Strings

"abc"

Control_Systems/Strings/String_Display · 1 input / 0 output port(s) at insert · exports to Python, MATLAB, Java, Rust, C, C++, 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.

String Display

Control Systems / Strings

Shows the text reaching it, on the block's own face, so a text signal can be read on the canvas the way a number can. It computes nothing and produces no signal: face = u.

Ports

  • Input – the text u (str, ICoreString), one value. Text only: a number has the ordinary Display block in Sinks, and the way to turn one into the other is a Data Type Conversion in the wire.

There is no output. This block is a terminal: nothing downstream can read what it shows.

Parameters

  • Decimation – show every Nth sample, counted in solver steps. A scalar; 1 shows every sample, and anything below 1 is treated as 1. The first sample of a run is always shown.
  • Refresh Period (s) – how long to wait, in real seconds, before repainting the face again. A scalar; the default is 1. Zero or less repaints on every sample that Decimation let through, which is what a run watched step-by-step wants. This is the only parameter that describes reading the model rather than running it, so it changes nothing about the values themselves.
  • Sampling Time (s) – zero or less inherits the solver's rate; a positive value runs the block at that period.

Two gates, and why there are two

Decimation counts solver steps, so it speeds up exactly as the solver does – it selects which samples count. Refresh Period (s) counts wall-clock seconds, so it does not – it decides how often a human can read a changing value. A fast run repainted on every sample is a blur, which is what the second gate exists to stop.

Whatever the two gates say, the last sample of the run is always shown when the run ends. A run that stops part-way through a refresh period would otherwise leave the face showing the last sample the gate let through rather than the last sample the run produced.

Code export

C, C++, Python, MATLAB, Java, Rust and PLC Structured Text are all supported. There is no face in a generated core, so the six console targets print <block path> = <text> on one line per shown sample, gated by Decimation; Refresh Period (s) has no counterpart in any of them and is deliberately not emitted, because it governs a repaint that does not exist there. Structured Text has no console, so it latches the shown text into a STRING variable an HMI or a debugger can read, which is the same thing the numeric Display block does there.

VHDL, Verilog and SystemVerilog do not carry text, so an export to one of them stops and names this block and the reason.

Simulink bridge

No equivalent, in either direction. Simulink has no String Display block – measured on R2026a, whose String library holds 19 blocks and none of them a readout. Text is shown there by the ordinary Sinks/Display block, which accepts a string signal; here that block is numeric-only, so this one is its text half rather than a second copy of it. The pairing is named here in prose and is deliberately not registered as a path: Control_Systems/Sinks/Display already claims simulink/Sinks/Display, and a second block claiming it would make an import ambiguous.

Notes

  • Algebraic, with no state that affects any value: the two gate counters decide only what is shown, never what is computed.
  • An unconnected input is empty text, so the face comes up blank and stays blank.
  • Text is cut at 256 bytes by the signal carrier, not by this block; the face shows exactly what arrived.

Code facts#

FactValue
registered typeControl_Systems/Strings/String_Display
familyControl_Systems/Strings
solver environment classICoreBlock_0_Control_Systems_1_Strings_2_String_Display
sourcesrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Control_Systems/Strings/String_Display/ICoreBlock_0_Control_Systems_1_Strings_2_String_Display.cpp
headersrc/ICoreBlocks/ICoreBlockLibrary/Blocks/Control_Systems/Strings/String_Display/ICoreBlock_0_Control_Systems_1_Strings_2_String_Display.h
default size on canvas110 × 50 px
ports at insert1 in, 0 out
code generators implementedPython, MATLAB, Java, Rust, C, C++, PLC Structured Text

Ports#

#DirectionSignal typeDescription label
1inICoreString—

Ports the constructor creates. A block whose port list changes with its configuration adds or removes ports at load time; the count above is the one a freshly inserted block has.

Configuration variables#

Config variableDefaultSimulink parameter
Decimation1—
Refresh Period (s)1—

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): MEASURED on R2026a: Simulink has NO String Display block. Its String library holds 19 blocks and not one of them is a readout, and a whole-library search for the exact name returns zero hits. Text is shown in Simulink by the ordinary Sinks/Display block, which accepts a string signal; ICore's Display is numeric-only (setInputPortsAcceptAnyNumeric), so this block is its text half rather than a second copy. simulink/Sinks/Display is deliberately NOT registered here: Control_Systems/Sinks/Display already claims it, and a second claimant would make an import of that path ambiguous. Decimation is named after Simulink's parameter of the same meaning on that block, which is a convenience for the user and not a mapping.

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).

String Display -- the block that lets you SEE a text signal The String family could produce text (String Constant), join it (String Concatenate), compare it (String Compare) and measure it (String Length) -- and the only way to LOOK at it was to measure it and display the number. This is the readout that closes that.

It is Sinks/Display's shape with the numeric parts removed: two gates (Decimation in solver steps, Refresh Period in wall-clock seconds), the face as the output surface, and a flush at the end of the run so the face never disagrees with the run's last sample. What it does NOT carry is Format -- every one of Display's five formats is a numeric one.

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.