I have a working C project which communicates with local or remote TwinCAT 3 systems using ADS C API (online examples work well too).
However, we are now trying to deploy the program to a different machine which only has TwinCAT ADS installed (as explained here under "Installation of TwinCAT 3 ADS only"). We have added routes on both machines. To simplify testing, we even disabled the firewall completely on both the ADS machine and the runtime machine. But I am still unable to get the data back to the application.
The error I am getting from the ADS is 10051, which is basically a Winsock error:
Network is unreachable. A socket operation was attempted to an unreachable network. This usually means the local software knows no route to reach the remote host.
However, I am pretty sure the routes are valid. They were added using a broadcast search, and I can see in Wireshark that both systems are exchanging ADS Read/Write requests constantly (if I remove the route on any of the PCs, the exchange stops).
One detail is that the ADS-only system is not in start mode, i.e. I am unable to put it to "Start", although this is perhaps normal since there is no runtime there?
My questions are:
Does the ADS-only system have to be switched to Start mode too, using the tray icon ("Start/Restart")? I.e. does this operation affects the message routers too? Because if I try this on the ADS system I get an error, so I am unsure if this is because there is no runtime on that PC, or if there is an error. The event viewer shows the error: "Error starting TCRTSOBJECTS server. The system cannot find the path specified" with no additional clues.
Are there any additional settings, on the ADS-only system, that have to be done, apart from configuring the routes?
I can answer part of that properly - no the ADS only system does not need to be (and cannot be) in RUN.
Are you sure the connection has been made from both ends? sometimes one server will have the connection registered, the other won't.
The other thing to check is whether you have other entries in either ADS routes list with the same IP or ADS addresses (I imagine your development PLC may have multiple entries). I have seen this get confused before and had to remove the clashing entries before it would work.