'shiftSample()'

shiftSample()

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Shifts a clocked expressions to delay it as part of the synchronous language elements.

Syntax

shiftSample(u, shiftCounter, resolution)

Examples

  Clock u  = Clock(3, 10);
  // ticks: 0, 3/10, 6/10, ..

  Clock y1 = shiftSample(u,1,3);
  // ticks: 1/10, 4/10, ...

  Real x=sample(time, u);
  // Ticks at 0, 3/10, 6/10 with values corresponding to time

  Real x2=shiftSample(x, 1, 3);
  // Ticks at 1/10 with value 0/10, and at 4/10 with value 3/10 etc