blockOverwrite

Block that allows a signal to overwritten by an FMU input

Extends from Modelica.Blocks.Interfaces.SISO (Single Input Single Output continuous control block).

Information

This block enables the overwriting of a control signal by an external program, as well as reading of its meta-data, without the need to explicitly propogate the external input or activation switch to a top-level model.

Typical use and important parameters

This block is typically used by the BOPTEST framework (see BOPTEST) to identify and activate control signals that can be overwritten by test controllers. It is used in combination with a dedicated parser to perform this task (see Parser Code).

The input u is the signal to be overwritten. The output y will be equal to the input signal if the activate flag is false and will be equal to the external input signal uExt if the flag is true.

It is important to add a brief description of the signal using the description parameter and assign a min, max, and unit to the input variable u by modifying its attributes.

Parameters

TypeNameDefaultDescription
StringdescriptionDescription of the signal being overwritten
BooleanboptestOverwritetrueParameter that is used by tools to search for overwrite block in models

Connectors

TypeNameDefaultDescription
RealInputu (from SISO)Connector of Real input signal
RealOutputy (from SISO)Connector of Real output signal

Components

TypeNameDefaultDescription
Modelica.Blocks.Logical.SwitchswiSwitch between external signal and direct feedthrough signal
Modelica.Blocks.Sources.RealExpressionuExtExternal input signal
Modelica.Blocks.Sources.BooleanExpressionactivateBlock to activate use of external signal

Revisions

  • February 17, 2022 by David Blum:
    Made parameter boptestOverwrite unprotected. This is for #1585.
  • July 17, 2019 by Michael Wetter:
    Changed parameter name from Description to description.
  • December 17, 2018 by David Blum:
    First implementation. See #1059.