OnDelay Icon
DiscretePrimitives.OnDelay
OnDelay(; name, dt=0.1, delay_time=0.1, ic=0.0, _...)An on-delay component that delays the rising edge of a boolean signal.
Arguments
name: Component namedt: Sampling time interval (default: 0.1)delay_time: Time to delay the on 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 off immediately when input turns off, but turns on only after the input has been on for the specified delay_time. Useful for debouncing or filtering.
Usage
PrimitiveComponents.DiscretePrimitives.OnDelay(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
"""
OnDelay(; name, dt=0.1, delay_time=0.1, ic=0.0, _...)
An on-delay component that delays the rising edge of a boolean signal.
# Arguments
- `name`: Component name
- `dt`: Sampling time interval (default: 0.1)
- `delay_time`: Time to delay the on 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 off immediately when input turns off, but turns on only after the input
has been on for the specified delay_time. Useful for debouncing or filtering.
"""
external component OnDelay
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}
},
"tags": []
}
}
y = Dyad.RealOutput() {
"Dyad": {
"placement": {
"icon": {"iconName": "default", "x1": 1010, "y1": 480, "x2": 1050, "y2": 520, "rot": 0},
"diagram": {"iconName": "default", "x1": 1000, "y1": 480, "x2": 1040, "y2": 520, "rot": 0}
},
"tags": []
}
}
structural dt::Real
structural delay_time::Real = 0.1
parameter ic::Real = 0.0
relations
metadata {
"Dyad": {
"experiments": {},
"tests": {},
"labels": [
{"label": "$(delay_time)", "x": 500, "y": -150, "rot": 0},
{
"label": "$(instance)",
"x": 500,
"y": 1100,
"rot": 0,
"layer": "icon",
"attrs": {}
}
],
"icons": {"default": "dyad://PrimitiveComponents/OnDelay.svg"},
"path": {},
"doc": {"behavior": false}
}
}
end
Flattened Source
"""
OnDelay(; name, dt=0.1, delay_time=0.1, ic=0.0, _...)
An on-delay component that delays the rising edge of a boolean signal.
# Arguments
- `name`: Component name
- `dt`: Sampling time interval (default: 0.1)
- `delay_time`: Time to delay the on 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 off immediately when input turns off, but turns on only after the input
has been on for the specified delay_time. Useful for debouncing or filtering.
"""
external component OnDelay
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}
},
"tags": []
}
}
y = Dyad.RealOutput() {
"Dyad": {
"placement": {
"icon": {"iconName": "default", "x1": 1010, "y1": 480, "x2": 1050, "y2": 520, "rot": 0},
"diagram": {"iconName": "default", "x1": 1000, "y1": 480, "x2": 1040, "y2": 520, "rot": 0}
},
"tags": []
}
}
structural dt::Real
structural delay_time::Real = 0.1
parameter ic::Real = 0.0
relations
metadata {
"Dyad": {
"experiments": {},
"tests": {},
"labels": [
{"label": "$(delay_time)", "x": 500, "y": -150, "rot": 0},
{
"label": "$(instance)",
"x": 500,
"y": 1100,
"rot": 0,
"layer": "icon",
"attrs": {}
}
],
"icons": {"default": "dyad://PrimitiveComponents/OnDelay.svg"},
"path": {},
"doc": {"behavior": false}
}
}
endTest Cases
No test cases defined.
Related
- Examples
- Experiments
- Analyses