Closed ao-droid closed 3 years ago
No, use one of the libraries provided with TwinCAT: https://infosys.beckhoff.com/english.php?content=../content/1033/tcadscommon/html/tcadscommon_intro.htm&id=
I preasume I have to change the example... Since with Beckhoff libs I only need the port number if you connect locally?...in your version I need to specify a static route in TC
Yes, with the TwinCAT dll you don’t need to setup a route, especially on localhost.
OK thanks for replay.
I had it running once on the localhost, but the route "back" has to be configured manually in TwinCat and it sometimes failed to work (don't remember the details).
At some point I gave up due to the lack of reliability and used the blob from Beckhoff.
Thanks for your info...I also used the Beckhoff libs... However recently somebody told me that the git libs also work locally, but I forgot to post it. It turns out you need to guess the client AmsNetId. Only last value needs to be changed... but it only works with specific values. I was told it can also be done without the static route in twincat3 which did't work in my case. Don't know if it's reliable because I didn't have time for a through test...maybe some other time.
I've had success using the external IP and using AdsSetLocalAddress
to set a different ID and add this route to ADS E.g.:
AdsSetLocalAddress({192,168,1,23,1,2});
AdsDevice route {"myDNSForADS", {192,168,1,23,1,1}, AMSPORT_R0_PLC_TC3};
I would like to run ads clinet on the same machine as the server. Does this lib support it?