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

# `Sources.BooleanStep` {#Sources.BooleanStep}

Generate step signal of type Boolean.

The Boolean output y is a step signal that transitions from `startValue` to `!startValue` at time = `startTime`.

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

## Usage {#Usage}

`BlockComponents.Sources.BooleanStep(startTime=0, startValue=false)`

## Parameters: {#Parameters:}

|         Name |                Description | Units | Default value |
| ------------:| --------------------------:| -----:| -------------:|
|  `startTime` | Time instant of step start |     s |             0 |
| `startValue` |    Output before startTime |     – |         false |

## Connectors {#Connectors}

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

## Behavior {#Behavior}

$$ \begin{align}
y\left( t \right) &= ifelse\left( t \geq \mathtt{startTime}, \neg \mathtt{startValue}, \mathtt{startValue} \right)
\end{align}
$$

## Source {#Source}

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

The Boolean output y is a step signal that transitions from `startValue`
to `!startValue` at time = `startTime`.
"""
component BooleanStep
  extends BlockComponents.Interfaces.PartialBooleanSource
  "Time instant of step start"
  parameter startTime::Time = 0
  "Output before startTime"
  parameter startValue::Boolean = false
relations
  y = ifelse(time >= startTime, !startValue, startValue)
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://BlockComponents/BooleanStep.svg"}
  }
}
end
```

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

The Boolean output y is a step signal that transitions from `startValue`
to `!startValue` at time = `startTime`.
"""
component BooleanStep
  "Connector of Boolean output signal"
  y = BooleanOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Time instant of step start"
  parameter startTime::Time = 0
  "Output before startTime"
  parameter startValue::Boolean = false
relations
  y = ifelse(time >= startTime, !startValue, startValue)
metadata {
  "Dyad": {
    "labels": [{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}],
    "icons": {"default": "dyad://BlockComponents/BooleanStep.svg"}
  }
}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

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

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

  * [`BooleanToReal`](Sources.BooleanStep.md)
