mirror of
https://github.com/S7NetPlus/s7netplus.git
synced 2026-02-17 22:38:27 +08:00
[Breaking change]: DBW and DBD now returns unsigned short and unsigned int. This because the conversion that was used previously was loosing both negative values and values over maximum of int.
Signed-off-by: Michele Cattafesta <michele.cattafesta@mesta-automation.com>
This commit is contained in:
@@ -352,10 +352,10 @@ namespace S7.Net
|
||||
byte obj = (byte)Read(DataType.DataBlock, mDB, dbIndex, VarType.Byte, 1);
|
||||
return obj;
|
||||
case "DBW":
|
||||
Int16 objI = (Int16)(UInt16)Read(DataType.DataBlock, mDB, dbIndex, VarType.Word, 1);
|
||||
UInt16 objI = (UInt16)Read(DataType.DataBlock, mDB, dbIndex, VarType.Word, 1);
|
||||
return objI;
|
||||
case "DBD":
|
||||
Int32 objU = (Int32)(UInt32)Read(DataType.DataBlock, mDB, dbIndex, VarType.DWord, 1);
|
||||
UInt32 objU = (UInt32)Read(DataType.DataBlock, mDB, dbIndex, VarType.DWord, 1);
|
||||
return objU;
|
||||
case "DBX":
|
||||
mByte = dbIndex;
|
||||
|
||||
Reference in New Issue
Block a user