Skip to content

Commit

Permalink
Revert "startTime of ZeroOrderHold" (modelica#4044)
Browse files Browse the repository at this point in the history
Was merged prematurely.
  • Loading branch information
dietmarw committed Oct 7, 2022
1 parent ecff3a1 commit e73d709
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Modelica/Blocks/Discrete.mo
Expand Up @@ -5,11 +5,11 @@ package Discrete
extends Modelica.Icons.Package;

block Sampler "Ideal sampling of continuous signals"
extends Interfaces.DiscreteSISO(y(start=0, fixed=true));
extends Interfaces.DiscreteSISO;

equation
when {sampleTrigger, initial()} then
y = if time>=startTime then u else pre(y);
y = u;
end when;
annotation (
Icon(
Expand Down Expand Up @@ -44,7 +44,7 @@ via parameter <strong>samplePeriod</strong>.

equation
when {sampleTrigger, initial()} then
ySample = if time>=startTime then u else pre(ySample);
ySample = u;
end when;
/* Define y=ySample with an infinitesimal delay to break potential
algebraic loops if both the continuous and the discrete part have
Expand Down

0 comments on commit e73d709

Please sign in to comment.