.Modelica_Synchronous.ClockSignals.Sampler.SubSample

Information

This block sub-samples the input clock u and provides it as output clock y.

To be more precise: The clock y is factor-times slower than the clock u. The first activation of clock y coincides with the first activation of clock u. The sub-sampling factor is defined by Integer parameter factor.

Example

The following example generates a periodic clock of 20 ms period, and then sub-samples the resulting clock signal with a factor of 3:

   
model simulation result

As can be seen, subSample.y picks every third-value of periodicClock.y due to the sub-sampling, and the sub-sampling factor = 3 is displayed in the icon of the subSample block. Note the down-arrow in the icon of the subSample block indicates that clock subSample.y is slower as clock subSample.u.


Generated at 2024-12-22T19:25:51Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos