.Modelica.Clocked.ClockSignals.Sampler.ShiftSample

Information

This block shifts the first activation of clock output y by fraction shiftCounter/resolution of the period (or for a non-periodic signal by a fraction of the last interval). Here, shiftCounter and resolution are positive Integer parameters.

To be more precise: The block constructs (conceptually) a clock “cBase”

Clock cBase = subSample(superSample(u, resolution), shiftCounter)

and clock y starts at the second clock tick of cBase.

Example

The following example generates a periodic clock of 20 ms period, and then shifts it with shiftCounter = 4 and resolution = 3:

ShiftSample_Model.png     ShiftSample_Result.png
model simulation result

The first activation of clock output y of block shiftSample1 is shifted in time (4/3*20ms). The parameter values shiftCounter = 4 and resolution = 3 are visible at the bottom of the icon.


Generated at 2024-12-04T19:25:49Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos