diff --git a/TFU002/TFU002.Logic/Services/GatewayService.cs b/TFU002/TFU002.Logic/Services/GatewayService.cs index 871a15a..966353f 100644 --- a/TFU002/TFU002.Logic/Services/GatewayService.cs +++ b/TFU002/TFU002.Logic/Services/GatewayService.cs @@ -88,6 +88,12 @@ private GatewayVariable ConvertToGatewayVariale(ISymbol symbol) Symbol = symbol, TargetType = symbol.IsPrimitiveType ? ((DataType)symbol.DataType).ManagedType : null }; + + if (((DataType) symbol.DataType).ManagedType == typeof(byte[])) + { + variable.TargetType = typeof(byte[]); + } + if (symbol.Attributes.Any(attribute => attribute.Name.Equals("S7.In", StringComparison.InvariantCultureIgnoreCase))) { variable.Direction = Direction.Input;