SoftBeckhoff icon indicating copy to clipboard operation
SoftBeckhoff copied to clipboard

Connect to docker via pyads

Open mw-muwo opened this issue 6 months ago • 2 comments

hey @fbarresi thanks for this amazing docker.

i want to connect to this docker via pyads.

the pyads' documentation provides a simple code example:

import pyads

 # Connection(ams_net_id: str | None = None, ams_net_port: int | None = None, ip_address: str | None = None)
plc = pyads.Connection('127.0.0.1.1.1', 851)
plc.open()
i = plc.read_by_name("GVL.int_val")
print(i)
plc.close()

what do i have to do to access the test1 variable from the docker? right now i'm always getting a connection timeout:

pyads.pyads_ex.ADSError: ADSError: timeout elapsed (1861).

mw-muwo avatar Dec 14 '23 10:12 mw-muwo