blockShiftSample
Shift the input clock by a fraction of the last interval and provide it as output clock
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:
![]() |
![]() |
|
| 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.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Shift first clock activation for 'shiftCounter/resolution*interval(u)' seconds | |||
| Integer | shiftCounter | 0 | Numerator of shifting formula |
| Integer | resolution | 1 | Denominator of shifting formula |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Interfaces.ClockInput | u | Connector of clock input signal | |
| Interfaces.ClockOutput | y | Connector of clock output signal |

