S7NetPlus / s7netplus

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

Fixed TypeHelper #535

Open rs-blade opened 3 months ago

rs-blade commented 3 months ago

When writing a double[] via Plc.Write/WriteAsync the data that is sent is malformed.

I added a test and found the cause in TypeHelper.ToByteArray(): There is a hard coded 4 when writing the single buffer. This may lead to errors for other types too (not checked that).