Lemonergy · Studio block
Scoped parameter writer
Writes a stored parameter of one declared child at accepted samples, then executes that child with the updated parameter.
- Implementation ID
native-parameter-writer- Reviewed
- 2026-10-27
Behavior
Writes a stored parameter of one declared child at accepted samples, then executes that child with the updated parameter. Trial evaluations read the held output without mutating state.
Interface
| Name | Direction | Unit | Meaning |
|---|---|---|---|
in0 | input | — | Value; real scalar. |
in1 | input | — | New parameter value; real scalar. |
in2 | input | — | Write enabled; bool scalar. |
out0 | output | — | Scaled; real scalar. |
out1 | output | — | Applied parameter value; real scalar. |
out2 | output | — | Write accepted; bool scalar. |
Parameters
Defaults are initial model values. Select values for your own model and operating conditions.
| Parameter | Unit | Default | Meaning and limits |
|---|---|---|---|
Sample periodsampleTimeS | s | 1 | Positive period between accepted updates; outputs hold between updates. |
Initial held outputtables[0] | — | [0] | Output held before the first accepted update, with one value per output lane. |
Declared child operationnested | — | Adjustable gain | The locally owned target operation. Its parameters, initial state, and typed ports are configured explicitly. |
Equations and rules
On an enabled write: stored parameter ← new valueExecute the declared child using the stored parameter; retain that parameter while writes are disabledFor a gain child: y = stored gain × input
Worked example
Scoped parameter writer worked example
Input 3 and an enabled gain write of 5 produce output 15. Later samples retain gain 5 when the write flag is false.
Open Studio example after release →| Output | Time (s) | Expected value | Unit | Absolute tolerance |
|---|---|---|---|---|
Scaledout0 | 0 | 15 | — | 1e-08 |
Applied parameter valueout1 | 0 | 5 | — | 1e-08 |
Write acceptedout2 | 0 | 1 | — | 1e-08 |
Explore the recorded outputs
Scoped parameter writer recorded example
Scoped parameter writer / Scaled3 actual recorded samples. Lines are visual guides between samples. Synthetic example, not measured cell data.
Read the selected signal as a table
| Time (s) | Value |
|---|
Download the recorded samples (JSON) · Open this Studio example after release
Use in a workflow
Scoped parameter writer worked example
Writes a stored parameter of one declared child at accepted samples, then executes that child with the updated parameter.
- Scoped parameter writer: Writes a stored parameter of one declared child at accepted samples, then executes that child with the updated parameter. Trial evaluations read the held output without mutating state.
- Use the block reference for settings and connections.
- Implementation tested locally; public release pending.
Connected concepts
Limits and interpretation
- One explicitly configured gain, bias, or discrete-integrator gain is writable. There is no arbitrary external-block lookup, global parameter mutation, or structural reconfiguration.
- Writes occur before the child executes at the accepted sample. Child memory persists across writes. A failed child evaluation commits neither the parameter nor child memory.
- The write port carries the numeric parameter value; no unit conversion is performed. A discrete child advances once per wrapper invocation using its declared period.
Scientific and mathematical references
These sources explain the scientific and mathematical background. The behavior, interface and limits above define the Lemonergy implementation; a citation does not imply every model option in the source is implemented.
- Synchronous Data Flow
Edward A. Lee, David G. Messerschmitt · Proceedings of the IEEE, 75(9), 1235–1245 · 1987
Technical reference · Background on actor firing and explicit dataflow. The sampled conditional semantics documented here are Lemonergy design choices, not a claim of a complete SDF implementation.
Implementation sources
This reference follows the public interface and locally verified numerical checks for an upcoming release.
Contract: Lemonergy Studio public contract · Verification record: verification-2026-10-27
docs/glossary/native-block-verification.json
This implementation and its workflow uses (JSON) · Knowledge graph (JSON-LD)