LIBRARY
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
Usage
BlockComponents.Sources.IntegerStep(offset=0, startTime=0, height=1)
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
y- This connector represents an integer signal as an output from a component (IntegerOutput)
Behavior
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"}
}
}
endFlattened 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
"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"}
}
}
endTest Cases
No test cases defined.
Related
Examples
Experiments
Analyses
Tests