0

I am using the Beckhoff.TwinCAT.Ads Version = 6.0235 NuGet package in c#, I want to query the configured Static Routes:

TwinCAT Static Routes

I have tried with TwinCAT.Ads.TcpRouter and TwinCAT.Router namespaces with no success:

  1. Is that possible?
  2. Which class or method from the API should I use?

Expected Result:

ICollection<RouteInfo> or something similar

Thanks in advance for your help, any comment would be very appreciated.

Miguel

DonMiguelSanchez
  • 376
  • 3
  • 15

1 Answers1

0

Just parse the C:\TwinCAT\3.1\Target\StaticRoutes.xml file. This is the location where the static routes entries you see in the editor are stored.

Gauss3k
  • 141
  • 3
  • i took me a while after i discovered it, nevertheless it only provides the actual static routes as you mentioned, i opened also a discussion on github and they provide me the official way to do this. The official way is described here: https://github.com/Beckhoff/ADS/issues/200 anyway thank you for your help – DonMiguelSanchez May 12 '23 at 14:17
  • Okay, I got your question wrong. Thoght you tried this already :-) – Gauss3k May 13 '23 at 19:14
  • you got it totally rigth, but nonetheless it was half the job needed, i just posted because maybe it can be interesting for other people looking for the same answer – DonMiguelSanchez May 14 '23 at 11:48