block StepWithSignal "Ordinary step (= step that is not active when simulation starts). Connector 'active' is true when the step is active"
extends Interfaces.PartialStep;
Modelica.Blocks.Interfaces.BooleanOutput active annotation (Placement(transformation(
origin = {0, -110},
extent = {
{-10, -10},
{10, 10}},
rotation = 270)));
initial equation
active = false;
equation
active = localActive;
annotation (
Diagram(
coordinateSystem(
preserveAspectRatio = true,
extent = {
{-100, -100},
{100, 100}}),
graphics = {
Rectangle(extent = {
{-100, 100},
{100, -100}})}),
Icon(
coordinateSystem(
preserveAspectRatio = true,
extent = {
{-100, -100},
{100, 100}}),
graphics = {
Text(
extent = {
{-200, 110},
{200, 150}},
textString = "%name",
lineColor = {0, 0, 255}),
Rectangle(
extent = {
{-100, 100},
{100, -100}},
fillColor = DynamicSelect({255, 255, 255}, if active then {0, 255, 0} else {255, 255, 255}),
fillPattern = FillPattern.Solid),
Text(
extent = {
{-92, -74},
{94, -92}},
textString = "active")}));
end StepWithSignal;