Step

block Step "Generate step signal of type Real"
    parameter Real height = 1 "Height of step"
        annotation (Dialog(groupImage = "modelica://Modelica/Resources/Images/Blocks/Sources/Step.png"));

    extends Interfaces.SignalSource;
equation
    y = offset + (if time < startTime then 0 else height);

    annotation (
        Icon(
            coordinateSystem(
                preserveAspectRatio = true,
                extent = {
                    {-100, -100}, 
                    {100, 100}}),
            graphics = {
                Line(
                    points = {
                        {-80, 68}, 
                        {-80, -80}},
                    color = {192, 192, 192}), 
                Polygon(
                    points = {
                        {-80, 90}, 
                        {-88, 68}, 
                        {-72, 68}, 
                        {-80, 90}},
                    lineColor = {192, 192, 192},
                    fillColor = {192, 192, 192},
                    fillPattern = FillPattern.Solid), 
                Line(
                    points = {
                        {-90, -70}, 
                        {82, -70}},
                    color = {192, 192, 192}), 
                Polygon(
                    points = {
                        {90, -70}, 
                        {68, -62}, 
                        {68, -78}, 
                        {90, -70}},
                    lineColor = {192, 192, 192},
                    fillColor = {192, 192, 192},
                    fillPattern = FillPattern.Solid), 
                Line(points = {
                    {-80, -70}, 
                    {0, -70}, 
                    {0, 50}, 
                    {80, 50}}), 
                Text(
                    extent = {
                        {-150, -150}, 
                        {150, -110}},
                    textString = "startTime=%startTime")}),
        Documentation(info = "<html>\n<p>\nThe Real output y is a step signal:\n</p>\n\n<p>\n<img src=\"modelica://Modelica/Resources/Images/Blocks/Sources/Step.png\"\n     alt=\"Step.png\">\n</p>\n\n</html>"));
end Step;