Beckhoff / ADS

Beckhoff protocol to communicate with TwinCAT devices.
MIT License
517 stars 197 forks source link

non-GUI way to add remotes to the router table possible? #32

Closed rockonedege closed 7 years ago

rockonedege commented 8 years ago

From all the documentation I read, they all reference to some GUI interface to add a remote to the router table. is there any API or steps that can be automated programably?

If this is possible,I'd like to write a small stub program on the TWinCAT server helping this adslib to register itself before any ADS communication.

soberschmidt commented 8 years ago

It is possible to add routes via ADS (check TcUtilities.lib for interface information). But for that you need an existing route.

rockonedege commented 8 years ago

Can you please provide a link? I could not locate it with a google search. Here's what I am planning to do now: I script a small program listening to a specific tcp port, once it receives a request, it writes to the OS registry the remote ip and restarts TWINCAT. By looking at the system manager Gui, it seems being added. But I have yet to verify it works or not.

soberschmidt commented 8 years ago

Thats the link to the TcUtilities.lib.

Remind that you have to restart TwinCAT if you change the route settings in the registry. If you want to avoid the route handling, use the AdsWebService