Boolean pulse
Periodic true pulses.
- Boolean
- Modelica Standard Library
- 1 port
- 3 parameters
booleanPulseLibraryLogicDescription
A periodic Boolean pulse train. From startTime on, each period begins with the output true for width percent of the period, then false for the rest. Before startTime the output is false.
Example
Logic gates AND, OR, XOR, NAND, NOR, and NOT on two Boolean pulse trains, and a Boolean turned into a number.
ABANDORXORNANDNORNOT ABoolean to real
Ports
Outputs 1
-
y
Boolean pulse train.
Parameters
-
Width
width50 %0 to 100
Fraction of each period that the output is true, in percent. The underlying MSL source requires it to be greater than 0 and at most 100.
-
Period
period0.01 s≥ 0
Period, in seconds. Must be greater than 0.
-
Start time
startTime0 sTime of the first rising edge, in seconds.
Equations
Modelica
At t = startTime + k · period: pulseStart = t y = pulseStart ≤ t < pulseStart + period · width/100 pulseStart = startTime at the start.
Implementation
Modelica Standard Library 4.1.0
MSL documentation Modelica.Blocks.Sources.BooleanPulseAssumptions and limitations
- Edges are instantaneous. Every edge is a simulation event, so a short period over a long run slows the simulation.
Tips
- For a Real-valued pulse, use Pulse, or convert this output with Boolean to real.
See also
Select a block in Gradara and press F1 to open its page offline.