S7NetPlus / s7netplus

S7.NET+ -- A .NET library to connect to Siemens Step7 devices
MIT License
1.35k stars 595 forks source link

from souce code,its should be get exception,but actually is successful #452

Closed maxwelltsai1536 closed 2 years ago

maxwelltsai1536 commented 2 years ago

the PlcAsynchronous.cs line 458 method ValidateResponseCode , i saw the s7data[14] is 0x00,here should be throw exception ,but acctually not,this statusCode is Reserved image

mycroes commented 2 years ago

Do you experience an actual issue, or are you guessing something must be wrong? People are using this library, I would assume someone would've noticed if this was broken.

maxwelltsai1536 commented 2 years ago

Do you experience an actual issue, or are you guessing something must be wrong? People are using this library, I would assume someone would've noticed if this was broken.

Do you experience an actual issue -> No are you guessing something must be wrong? -> Yes (from souce code logic,i guess it should be wrong,but actually is successful,this is where i get confused)

mycroes commented 2 years ago

My guess is the indexes don't align because S7NetPlus is performing this check on a subset of the returned data. You can probably easily detect that by looking at all of the data. Also, in Sally7 most of the messaging structure is available as structs, that might provide an easier look into the protocol data from C# perspective.

maxwelltsai1536 commented 2 years ago

My guess is the indexes don't align because S7NetPlus is performing this check on a subset of the returned data. You can probably easily detect that by looking at all of the data. Also, in Sally7 most of the messaging structure is available as structs, that might provide an easier look into the protocol data from C# perspective.

Got it.i will check agin .thank you for reply.