Monostable (One-Shot) (monostable)
Makes one pulse of a fixed length after a rising edge.
Group: Control · Kind: {"block":"monostable","kind":"control"}
When to use it
Use it for a blanking time, a fixed-length reset pulse or a timeout after an event. Use SR Latch for a state that stays until cleared.
Pins
| Pin | Domain | Meaning |
|---|---|---|
trig |
signal | Trigger input; rising edge starts the pulse |
ton |
signal | Optional pulse width in seconds; while wired, its value at each trigger sets the width and width is not needed. |
out |
signal | Pulse output, 0 or 1 |
Common parameters
width: Length of the output pulse; not needed while the ton input is wired (Default: required)retrigger: Whether a new edge restarts the pulse (Default: 0)
Parameters
| Key | Unit | Default | Typical range | Description |
|---|---|---|---|---|
width |
s | required | Length of the output pulse; not needed while the ton input is wired | |
retrigger |
— | 0 | Whether a new edge restarts the pulse |
Parameter descriptions are in English in both languages.
Model
A rising edge on trig (above 0.5 after being at or below it) sets out to 1 until width seconds have passed (with ton wired: the value of ton at the trigger; a value that is not positive gives no pulse). With retrigger = 1 an edge during the pulse restarts the timing; with 0 such an edge is ignored. The end of the pulse is reported to the solver as an event, so fastsolve lands a step exactly on it. A trig that is already high at t = 0 does not fire, and a trig that stays high fires only once.
Common mistakes
- width has no default and must be above zero. With the fixed-step solver the pulse ends at the first step at or after the end time, so a width shorter than a few maxStep values is rounded coarsely.
- A trigger that is held high does not make a second pulse; the edge must go low and high again. During the pulse a new edge is ignored unless retrigger is 1, so a fast pulse train shorter than width can look like one long pulse.
Datasheet and sources
There is no datasheet. width is the time your design needs, such as a blanking time after a switching edge, a reset pulse length or a watchdog timeout. Take it from the requirement or from the timer period you are modelling.
Example
Open the example with the command file.openExample and the name demo:monostable.
Generated by cargo xtask reference from the usage texts and parameter specs. Do not edit by hand.