---
url: /dyad/stable/stdlib/BlockComponents/components/Sources.IntegerStep.md
description: Dyad Sources.IntegerStep docs.  Generate step signal of type Integer.
---

# `Sources.IntegerStep` {#Sources.IntegerStep}

Generate step signal of type Integer.

The Integer output `y` equals `offset` for `time < startTime` and `offset + height` for `time >= startTime`.

Mirrors `Modelica.Blocks.Sources.IntegerStep`.

This component extends from [`BlockComponents.Interfaces.IntegerSignalSource`](../types/Interfaces.IntegerSignalSource.md)

## Usage {#Usage}

`BlockComponents.Sources.IntegerStep(offset=0, startTime=0, height=1)`

## Parameters: {#Parameters:}

|        Name |                               Description | Units | Default value |
| -----------:| -----------------------------------------:| -----:| -------------:|
|    `offset` |                 Offset of output signal y |     – |             0 |
| `startTime` | Output y = offset for time < startTime |     – |             0 |
|    `height` |                            Height of step |     – |             1 |

## Connectors {#Connectors}

* `y` - This connector represents an integer signal as an output from a component ([`IntegerOutput`](/stdlib/Dyad/connectors/IntegerOutput#IntegerOutput))

## Behavior {#Behavior}

$$ \begin{align}
y\left( t \right) &= ifelse\left( t < \mathtt{startTime}, 0, \mathtt{height} \right) + \mathtt{offset}
\end{align}
$$

## Source {#Source}

```dyad
"""
Generate step signal of type Integer.

The Integer output `y` equals `offset` for `time < startTime` and
`offset + height` for `time >= startTime`.

Mirrors `Modelica.Blocks.Sources.IntegerStep`.
"""
component IntegerStep
  extends BlockComponents.Interfaces.IntegerSignalSource
  "Height of step"
  parameter height::Integer = 1
relations
  y = offset + ifelse(time < startTime, 0, height)
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://BlockComponents/IntegerStep.svg"}
  }
}
end
```

```dyad
"""
Generate step signal of type Integer.

The Integer output `y` equals `offset` for `time < startTime` and
`offset + height` for `time >= startTime`.

Mirrors `Modelica.Blocks.Sources.IntegerStep`.
"""
component IntegerStep
  "Connector of Integer output signal"
  y = IntegerOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 560, "rot": 0}
      },
      "tags": []
    }
  }
  "Offset of output signal y"
  parameter offset::Integer = 0
  "Output y = offset for time < startTime"
  parameter startTime::Real = 0
  "Height of step"
  parameter height::Integer = 1
relations
  y = offset + ifelse(time < startTime, 0, height)
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://BlockComponents/IntegerStep.svg"}
  }
}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`IntegerStep`](Sources.IntegerStep.md)

  * [`IntegerStep`](Sources.IntegerStep.md)

  * [`IntegerToReal`](Sources.IntegerStep.md)
