From 05783cfb575d2393e501678eed8b0bb028735d9f Mon Sep 17 00:00:00 2001 From: Anton Haumer Date: Thu, 22 Sep 2022 18:19:49 +0200 Subject: [PATCH] applied an equivalent change to Sampler (as to ZeroOrderHold) --- Modelica/Blocks/Discrete.mo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modelica/Blocks/Discrete.mo b/Modelica/Blocks/Discrete.mo index 32fae1db4e..ba583cf6c4 100644 --- a/Modelica/Blocks/Discrete.mo +++ b/Modelica/Blocks/Discrete.mo @@ -5,11 +5,11 @@ package Discrete extends Modelica.Icons.Package; block Sampler "Ideal sampling of continuous signals" - extends Interfaces.DiscreteSISO; + extends Interfaces.DiscreteSISO(y(start=0, fixed=true)); equation when {sampleTrigger, initial()} then - y = u; + y = if time>=startTime then u else pre(y); end when; annotation ( Icon(