Skip to content

Instructions for Using PNDrive Python Example Code

Requirements for the Running Environment

It is recommended to run the code in a Linux or MacOS environment, with the Python version being >= 3.6. For Windows users, please install Python3. The Anaconda distribution is recommended as it contains many useful scientific tools, but you can also install an independent version of Python.

Clone and Run

git clone https://github.com/pndbotics/pnd-python-example.git

When using it for the first time, note that you need to adjust the broadcast address to the broadcast address of the network where the actuators are located. You can obtain the broadcast address of Linux through the following command:

$ ifconfig

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.1  netmask 255.255.255.0  broadcast 10.0.0.255

Just modify the lookup constructor in the example to the correct broadcast address. Lookup('10.0.0.255')

When PSA actuators are connected to the network, you can run the following script to obtain information about all the online actuators in the network:

python3 lookup.py

Tip

Please ensure that no load is connected to the output side of the actuator before running the programs in the motion folder!!!

python3 position_pt.py

SDK

v0.1.0