AssignClockToSquareWaveHoldGenerate a Boolean continuous-time square-wave output from a clocked Real input |
This information is part of the Modelica Standard Library maintained by the Modelica Association.
This block creates a Boolean, continuous time, square-wave output. Whenever the clock of the input signal is active the Boolean output value changes.
The following
example
samples a sine signal with a periodic clock of 20 ms period. After that a Boolean, continuous time, square-wave signal is generated that changes its value at every clock tick of the sampled signal:
model | simulation result |
y_start |
Value: false Type: Boolean Description: Initial value of output signal |
---|
u |
Type: RealInput |
|
---|---|---|
y |
Type: BooleanOutput Description: Connector of Boolean output signal |
Modelica.Clocked.Examples.Elementary.RealSignals Example of an AssignClockToSquareWaveHold block for Real signals |