blockRotationalClock
Event clock generating a clock tick each time an observed input angle changed for a rotational-interval given as variable input
Extends from PartialRotationalClock (Base class for event clocks that generate a clock tick each time an observed input angle changes).
Information
For a simple example cf. the rotational sampling example.Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Advanced | |||
| Boolean | useSolver (from PartialClock) | false | = true, if solverMethod shall be explicitly defined |
| ModelicaServices.Types.SolverMethod | solverMethod (from PartialClock) | "ExplicitEuler" | Integration method used for discretized continuous-time partitions |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Clocked.ClockSignals.Interfaces.ClockOutput | y (from PartialClock) | ||
| Modelica.Blocks.Interfaces.RealInput | angle (from PartialRotationalClock) | Input angle observed for generating clock ticks. | |
| Modelica.Blocks.Interfaces.IntegerOutput | direction (from PartialRotationalClock) | Rotation direction (sign: +1 or -1). Sampled with the provided clock signal 'y'. | |
| Modelica.Blocks.Interfaces.BooleanOutput | direction_changed (from PartialRotationalClock) | = true, if the rotation direction of the observed angle changed since the last tick of y', otherwise false. Sampled with the provided clock signal y. | |
| Modelica.Blocks.Interfaces.RealInput | trigger_interval | Rotational-interval the input angle must be changed to trigger the next clock tick |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| ClockSignals.Clocks.EventClock | y_clock | ||
| RealSignals.Sampler.SampleClocked | update_offset | ||
| RealSignals.Sampler.Hold | angular_offset | ||
| Modelica.Blocks.Math.Add | sub | ||
| Modelica.Blocks.Logical.Less | less | ||
| Modelica.Blocks.Math.Abs | abs2 | ||
| Modelica.Blocks.Math.Abs | abs1 | ||
| Modelica.Blocks.Math.Sign | direction_sign | ||
| Modelica.Blocks.Math.RealToInteger | cast | ||
| IntegerSignals.NonPeriodic.IntegerChange | changed | ||
| RealSignals.Sampler.SampleClocked | update_direction |