Beckhoff / ADS

Beckhoff protocol to communicate with TwinCAT devices.
MIT License
502 stars 194 forks source link

Read type definitions #99

Closed jsandv closed 1 year ago

jsandv commented 4 years ago

Im trying to read the type definitions from a CX5020. Im stuck, and went to the C# dll for help by using this command: var symbols = SymbolLoaderFactory.Create(client,SymbolLoaderSettings.DefaultDynamic).Symbols;

Using wireshark I see multiple read commands, one is: IndexGroup:0x0000f00e, IndexOffset: 0x80000000, Length:65536

When I convert the bytes to ascii I see that types and definitions of interest is in the response but I dont know the format, so there is no way I can deserialize it without the spec.

Does anyone know where to find more documentation on the symbols / datatype queries?

ghost commented 4 years ago

You may want to install the TwinCAT ADS SDK and look at the ADSIGRP_SYM_DT_UPLOAD define and the AdsDatatypeEntry structure in TcAdsDef.h (it's not open source so I can't copy it here)

pbruenn commented 1 year ago

This should now be possible see commit 4cc5ded755f119d431f232502ffbe0688865f5ba and its parents