diff --git a/DotNetSiemensPLCToolBoxLibrary.TIAV13/Step7ProjectV13Tia.cs b/DotNetSiemensPLCToolBoxLibrary.TIAV13/Step7ProjectV13Tia.cs index df654386..a397e70d 100644 --- a/DotNetSiemensPLCToolBoxLibrary.TIAV13/Step7ProjectV13Tia.cs +++ b/DotNetSiemensPLCToolBoxLibrary.TIAV13/Step7ProjectV13Tia.cs @@ -883,13 +883,13 @@ internal static void parseChildren(TIADataRow parentRow, XElement parentElement, row.DataType = S7DataRowType.INT; break; case "uint": - row.DataType = S7DataRowType.WORD; + row.DataType = S7DataRowType.UINT; break; case "dint": row.DataType = S7DataRowType.DINT; break; case "udint": - row.DataType = S7DataRowType.DWORD; + row.DataType = S7DataRowType.UDINT; break; case "word": row.DataType = S7DataRowType.WORD; @@ -921,6 +921,21 @@ internal static void parseChildren(TIADataRow parentRow, XElement parentElement, case "time": row.DataType = S7DataRowType.TIME; break; + case "sint": + row.DataType = S7DataRowType.SINT; + break; + case "usint": + row.DataType = S7DataRowType.USINT; + break; + case "ulint": + row.DataType = S7DataRowType.ULINT; + break; + case "lint": + row.DataType = S7DataRowType.LINT; + break; + case "lreal": + row.DataType = S7DataRowType.LREAL; + break; default: row.DataType = S7DataRowType.UNKNOWN; break; diff --git a/LibNoDaveConnectionLibrary/DataTypes/Blocks/Step7V5/S7DataRowType.cs b/LibNoDaveConnectionLibrary/DataTypes/Blocks/Step7V5/S7DataRowType.cs index e28b83fb..c3418bf7 100644 --- a/LibNoDaveConnectionLibrary/DataTypes/Blocks/Step7V5/S7DataRowType.cs +++ b/LibNoDaveConnectionLibrary/DataTypes/Blocks/Step7V5/S7DataRowType.cs @@ -86,6 +86,14 @@ public enum S7DataRowType S5_KY = 0xf03, S5_KC = 0xf04, S5_C = 0xf0c, + + SINT = 0x101, + USINT = 0x102, + LINT = 0x103, + ULINT = 0x104, + LREAL = 0x105, + UINT = 0x106, + UDINT = 0x107, } diff --git a/LibNoDaveConnectionLibrary/DataTypes/Blocks/TiaAndSTep7DataBlockRow.cs b/LibNoDaveConnectionLibrary/DataTypes/Blocks/TiaAndSTep7DataBlockRow.cs index 08cf309a..8e4a1681 100644 --- a/LibNoDaveConnectionLibrary/DataTypes/Blocks/TiaAndSTep7DataBlockRow.cs +++ b/LibNoDaveConnectionLibrary/DataTypes/Blocks/TiaAndSTep7DataBlockRow.cs @@ -318,6 +318,8 @@ public virtual int ByteLength return size; case S7DataRowType.BOOL: case S7DataRowType.BYTE: + case S7DataRowType.SINT: + case S7DataRowType.USINT: case S7DataRowType.CHAR: len = 1; break; @@ -326,12 +328,16 @@ public virtual int ByteLength case S7DataRowType.DWORD: case S7DataRowType.TIME: case S7DataRowType.REAL: + case S7DataRowType.UDINT: len = 4; break; case S7DataRowType.POINTER: len = 6; break; case S7DataRowType.DATE_AND_TIME: + case S7DataRowType.LREAL: + case S7DataRowType.ULINT: + case S7DataRowType.LINT: len = 8; break; case S7DataRowType.S5TIME: @@ -344,6 +350,7 @@ public virtual int ByteLength case S7DataRowType.COUNTER: case S7DataRowType.TIMER: case S7DataRowType.DATE: + case S7DataRowType.UINT: len = 2; break; case S7DataRowType.S5_KH: