Beckhoff / TF6000_ADS_DOTNET_V5_Samples

Sample code for the Version 6.X series of the TwinCAT ADS .NET Packages
https://infosys.beckhoff.com/content/1033/tc3_ads.net/9407515403.html?id=6770980177009971601
BSD Zero Clause License
37 stars 15 forks source link

Read values with .net #16

Closed drvic10k closed 2 years ago

drvic10k commented 2 years ago

Is there an example for reading the values from symbolic server using .net?

So far I can read the values using the powershell extension, but from .net I get an error

I receive the symbol information correctly: image

But when trying to get the value, I get an DeviceSymbolNotFound result image

Alternatively, when using Connection.ReadAsync(symbol.IndexGroup, symbol.IndexOffset, memory, cancel)

I receive Ads-Error 0x701 : Service is not supported by server.

RalfHeitmann commented 2 years ago

The reason was, that the value access by InstancePath and the access by IG/IO wasn't fully supported. I fixed that with the commit above and added some demonstration code in the sample.