stlehmann / pyads

Python wrapper for TwinCAT ADS
MIT License
251 stars 92 forks source link

Pyads connection refused with Beckhoff Twincat 3 #333

Closed rudy93 closed 1 year ago

rudy93 commented 1 year ago

Hello,

I am trying to make a connection from a server to a Beckhoff PLC with TwinCAT 3. With Windows everything works fine but with the same server on Linux I can't get a connection. The server has a static IP and in the route manager in the PLC I can find the route and see the server. I have tried adding the route by the route manager in the PLC and with "add_route_to_plc" but both ways my connection is refused. I have already turned off all firewalls. Any of you guys any idea what goes wrong here? In the attachment I have added some picture to see my settings and code. afe38e7c-7c05-4c62-94ac-deba06c88042 328dc85c-c1a6-40f8-9827-d4ff997ee3c1 8dc6f7e3-6247-4605-b1bb-d58445210487 a1775f33-8185-485c-b403-933edd4de955 ab57a5f7-1b99-4299-9fe3-48ff1a8604dc c64d3b7a-790c-4cce-be09-fcb0ff64e57c

rudy93 commented 1 year ago

It helps me a bit, I was already scared that it is probably a problem in Linux.... I don't like Windows as a server, that crashes to much in my opinion. Do you maybe know the best place to ask my question?

kryskool commented 1 year ago

Hi @rudy93

On the PLC what is the gataway address ? (FEC1)

Regards,

rudy93 commented 1 year ago

Just checked: Gateway: 192.168.1.1 and netmask: 255.255.255.0, so should be OK

rudy93 commented 1 year ago

I don't know exactly how, but I solved the problem. We did everything step by step again, and it worked. But I don't need to close the connection every time. I will close the issue! Thanks for all the input.

AbdulFaiz123 commented 6 months ago

I am Trying to Do the connection as you did , but I am unable to connect I get the same Problem ., If. you solved it Can you please Explain here