From f9f0a99672546749f3d9168d22162ba3a69e1fff Mon Sep 17 00:00:00 2001 From: Federico Barresi Date: Fri, 5 Aug 2022 22:21:59 +0200 Subject: [PATCH] Fixed variable length for double types - added default value for variables of type double (float in PLCs) this error avoid getting notification from type float or double. --- Sharp7.Rx/S7VariableNameParser.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sharp7.Rx/S7VariableNameParser.cs b/Sharp7.Rx/S7VariableNameParser.cs index b5213b3..a53e8ef 100644 --- a/Sharp7.Rx/S7VariableNameParser.cs +++ b/Sharp7.Rx/S7VariableNameParser.cs @@ -74,6 +74,10 @@ namespace Sharp7.Rx { s7VariableAddress.Length = 8; } + else if (type == DbType.Double) + { + s7VariableAddress.Length = 4; + } return s7VariableAddress; }