Skip to content

Commit 41a1e54

Browse files
committed
forgotten server restructure
1 parent 56c9b19 commit 41a1e54

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

docs/installation/poulpe_ethercat_py.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,18 @@ ethercat:
6464
And then you can run the following python script:
6565
6666
```python
67-
from poulpe_ethercat_py import PyPoulpeRemoteClient, launch_server, get_all_slaves_in_network
67+
from poulpe_ethercat_py import PyPoulpeRemoteClient, PyEthercatServer
6868
import time
6969

7070
# launch the server first
71-
address = launch_server("file_config.yaml")
71+
server = PyEthercatServer()
72+
server.launch_server("file_config.yaml")
7273

7374
# wait for the server to start
7475
time.sleep(1.0)
7576

7677
# print all slaves in the network
77-
devices = get_all_slaves_in_network(address)
78+
devices = server.get_all_slaves_in_network()
7879
print("Devices connected in the network: ")
7980
for i,name in zip(devices[0],devices[1]):
8081
print("Slave {}: {}".format(i,name))
@@ -86,7 +87,7 @@ no_axis = 3
8687

8788
print('Connecting on slave: {}'.format(slave_id))
8889
# Create an instance of the client
89-
client = PyPoulpeRemoteClient(address, [slave_id], 0.001)
90+
client = PyPoulpeRemoteClient(server.addr, [slave_id], 0.001)
9091

9192
time.sleep(1.0)
9293

0 commit comments

Comments
 (0)