Closed LB767 closed 1 year ago
It seems the connection works fine if I force my laptop to use wifi, if I go through its ethernet card it doesn't work... I have no idea why...
Hi, sorry that you got stuck in the TwinCAT routing hell. Been there, done that...
One thing I noticed is that the NetID/address pairs in your two screenshots seem odd. It seems to indicate that the PLC is 138.131.232.36.1.1 (which is also the NetID you use in the code snippet) but at IP 138.131.232. 39 (which is not the IP you use in the code snippet).
Ah yes, it was after a long day of debugging and I guess I typo-ed the IP address in my snipet... Eitherways I tested it with the correct IP or just hostname and it made zero difference. Considering the connection works just fine through wifi, and connecting to another PLC works fine as well, I can only assume it must be some weird router/firewall blocking going on somewhere.
I'll close the issue for now and report back if I ever find something relevant.
Ok, thanks for the feedback!
I'm still having weird problems with this... the other day I kept having this panic when trying to read a variable after connecting
Io("sending request", Os { code: 10058, kind: Uncategorized, message: "A request to send or receive data was disallowed because the socket had already been shut down in that direction with a previous shutdown call." })'
And seemingly after some time out of nowhere it started working without issue...
Any clue what this error might indicate?
Hello,
I've been banging my head against a wall having problems connecting to a remote Twincat with ADS. Just copy pasting the example code always ends up failing at
device.get_state()
with errorIo("receiving reply (route set?)", Kind(UnexpectedEof))'
Here is my code:
For reference, here is the ADS route set on my side (client) and the route on the PLC side
I've seemingly tried everything but cannot get it to work, and every time I run the code above the route in TwinCAT stops showing "connected", if that means anything...
Weirdly, this works totally fine with another PLC I have and the only difference I've been able to find is that this one has a fixed IP instead of being set through DHCP.
Any help would be welcome...