Closed apachler closed 8 months ago
I have a problem with reading a WORD at StartByteAdr 0 from a DB. I get an exception with following message "Value was either too large or too small for an Int16."
Following code outputs 48945 for the variable resultWord:
var resultWord = await connection.ReadAsync(S7.Net.DataType.DataBlock, 14, 0, S7.Net.VarType.Word, 1); Console.WriteLine($"TEST {resultWord}");
Since my program is working for many other operations, i think there is something wrong when reading from StartByteAdr 0.
Do you have any advice for me?
Setting VarTyp to S7.Net.VarType.Int shows that the value in the PLC is <0 ... so no problem from the library.
S7.Net.VarType.Int
I have a problem with reading a WORD at StartByteAdr 0 from a DB. I get an exception with following message "Value was either too large or too small for an Int16."
Following code outputs 48945 for the variable resultWord:
Since my program is working for many other operations, i think there is something wrong when reading from StartByteAdr 0.
Do you have any advice for me?