OffDelay Icon
DiscretePrimitives.OffDelay
OffDelay(; name, dt=0.1, delay_time=0.1, ic=0.0, _...)An off-delay component that delays the falling edge of a boolean signal.
Arguments
name: Component namedt: Sampling time interval (default: 0.1)delay_time: Time to delay the off transition (default: 0.1)ic: Initial condition for delayed samples (default: 0.0)
Variables
u(t): Input signal (boolean, 0 or 1)y(t): Output signal (boolean, 0 or 1)l(t): Dummy continuous state
Description
Output turns on immediately when input turns on, but turns off only after the input has been off for the specified delay_time. Useful for debouncing or filtering.
Usage
PrimitiveComponents.DiscretePrimitives.OffDelay(ic=0.0)
Parameters:
| Name | Description | Units | Default value |
|---|---|---|---|
dt | – | ||
delay_time | – | 0.1 | |
ic | – | 0 |
Connectors
u- This connector represents a real signal as an input to a component (RealInput)y- This connector represents a real signal as an output from a component (RealOutput)
Behavior
Behavior of this component cannot be rendered because it includes path variables.
Source
"""
OffDelay(; name, dt=0.1, delay_time=0.1, ic=0.0, _...)
An off-delay component that delays the falling edge of a boolean signal.
# Arguments
- `name`: Component name
- `dt`: Sampling time interval (default: 0.1)
- `delay_time`: Time to delay the off transition (default: 0.1)
- `ic`: Initial condition for delayed samples (default: 0.0)
# Variables
- `u(t)`: Input signal (boolean, 0 or 1)
- `y(t)`: Output signal (boolean, 0 or 1)
- `l(t)`: Dummy continuous state
# Description
Output turns on immediately when input turns on, but turns off only after the input
has been off for the specified delay_time. Useful for debouncing or filtering.
"""
external component OffDelay
u = Dyad.RealInput() {
"Dyad": {
"placement": {
"icon": {"iconName": "default", "x1": -40, "y1": 480, "x2": 0, "y2": 520, "rot": 0},
"diagram": {"iconName": "default", "x1": -40, "y1": 480, "x2": 0, "y2": 520, "rot": 0}
}
}
}
y = Dyad.RealOutput() {
"Dyad": {
"placement": {
"icon": {"iconName": "default", "x1": 1010, "y1": 480, "x2": 1050, "y2": 520, "rot": 0},
"diagram": {"iconName": "default", "x1": 1010, "y1": 480, "x2": 1050, "y2": 520, "rot": 0}
}
}
}
structural dt::Real
structural delay_time::Real = 0.1
parameter ic::Real = 0.0
relations
metadata {
"Dyad": {
"labels": [
{"label": "$(delay_time)", "x": 500, "y": -150, "rot": 0},
{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}
],
"icons": {"default": "dyad://PrimitiveComponents/OffDelay.svg"},
"doc": {"behavior": false}
}
}
end
Flattened Source
"""
OffDelay(; name, dt=0.1, delay_time=0.1, ic=0.0, _...)
An off-delay component that delays the falling edge of a boolean signal.
# Arguments
- `name`: Component name
- `dt`: Sampling time interval (default: 0.1)
- `delay_time`: Time to delay the off transition (default: 0.1)
- `ic`: Initial condition for delayed samples (default: 0.0)
# Variables
- `u(t)`: Input signal (boolean, 0 or 1)
- `y(t)`: Output signal (boolean, 0 or 1)
- `l(t)`: Dummy continuous state
# Description
Output turns on immediately when input turns on, but turns off only after the input
has been off for the specified delay_time. Useful for debouncing or filtering.
"""
external component OffDelay
u = Dyad.RealInput() {
"Dyad": {
"placement": {
"icon": {"iconName": "default", "x1": -40, "y1": 480, "x2": 0, "y2": 520, "rot": 0},
"diagram": {"iconName": "default", "x1": -40, "y1": 480, "x2": 0, "y2": 520, "rot": 0}
}
}
}
y = Dyad.RealOutput() {
"Dyad": {
"placement": {
"icon": {"iconName": "default", "x1": 1010, "y1": 480, "x2": 1050, "y2": 520, "rot": 0},
"diagram": {"iconName": "default", "x1": 1010, "y1": 480, "x2": 1050, "y2": 520, "rot": 0}
}
}
}
structural dt::Real
structural delay_time::Real = 0.1
parameter ic::Real = 0.0
relations
metadata {
"Dyad": {
"labels": [
{"label": "$(delay_time)", "x": 500, "y": -150, "rot": 0},
{"label": "$(instance)", "x": 500, "y": 1100, "rot": 0}
],
"icons": {"default": "dyad://PrimitiveComponents/OffDelay.svg"},
"doc": {"behavior": false}
}
}
endTest Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses