Closed maxxie85 closed 2 years ago
There is an issue in the WriteAny implementation to marshal .NET predefined structs that could be located with the help of your Sample. Thx @maxxie85. The upcoming releases of Beckhoff.TwinCAT.Ads packages will fix this problem.
Thanks for the response, looking forward to the fix.
If working with a struct on a IValueAnySymbol. When you call WriteAnyValue on that instance you will get an System.ArgumentException with the message Struct member not found! (Parameter 'type')
I believe there is a bug in the latest ADS version for .Net (current used 5.0.545)
Because when I write the same struct with the WriteAny method from the IAdsConnection interface it doesn't throw an exception. I created a small demo application to illustrate the problem with an .net console project and a TwinCAT PLC project DemoApplication.zip .