blockPeriodicExactClock

Generates a periodic clock signal with a period defined by an Integer number with resolution
Diagram of PeriodicExactClock

Extends from Modelica_Synchronous.ClockSignals.Interfaces.PartialPeriodicClock (Icon, connector, and solver method of a block that generates a periodic clock).

Information

This component generates a periodic clock that starts ticking when the simulation starts. The period is defined as the product of a resolution, defined with enumeration Resolution, and Integer parameter factor. Internally, the period is represented as a rational number. All clocks with rational number definitions are exactly time synchronized to each other.

Example:

  import M = Modelica_Synchronous;
  M.Clocks.PeriodicExactClock periodicClock(factor=10,
                                            resolution=M.Types.Resolution.ms);
  // Clock ticks every 1/100 seconds

For an introduction to clocks see UsersGuide.Clocks.

If a clock is associated to a clocked continuous-time partition, then an integrator has to be defined that is used to integrate the partition from the previous to the current clock tick. This is performed by setting parameter useSolver = true and defining the integration method as String with parameter solver. Both parameters are in tab Advanced. For an example, see Examples.Systems.ControlledMixingUnit.

Parameters

TypeNameDefaultDescription
IntegerfactorSample factor with respect to resolution
Modelica_Synchronous.Types.ResolutionresolutionR.msClock resolution
Advanced
BooleanuseSolver (from PartialClock)false= true, if solverMethod shall be explicitly defined
ModelicaServices.Types.SolverMethodsolverMethod (from PartialClock)"ExplicitEuler"Integration method used for discretized continuous-time partitions

Connectors

TypeNameDefaultDescription
Modelica_Synchronous.ClockSignals.Interfaces.ClockOutputy (from PartialClock)