Skip to content

Commit 9635b93

Browse files
committed
update Python examples
1 parent cf7d246 commit 9635b93

File tree

225 files changed

+230
-215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+230
-215
lines changed

.NET/README.md

Lines changed: 1 addition & 0 deletions

LabVIEW/README.md

Lines changed: 1 addition & 0 deletions
File renamed without changes.

Python/Examples/.env

Lines changed: 0 additions & 3 deletions
This file was deleted.

Python/Examples/.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

Python/Examples/test.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

Python/Examples/test2.py

Lines changed: 0 additions & 8 deletions
This file was deleted.
File renamed without changes.

Python/README.md

Lines changed: 1 addition & 0 deletions

Python/Examples/RemoteControl.py renamed to Python/RemoteControl.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1+
from underautomation.universal_robots.connect_parameters import ConnectParameters
12
from underautomation.universal_robots.ur import UR
23

34
##
45
# Create a new robot instance
56
robot = UR()
67

8+
# Setup connection to th robot
9+
param = ConnectParameters("192.168.0.56")
10+
param.dashboard.enable=True
11+
712
# Connect to the robot
8-
robot.connect("192.168.0.1")
13+
robot.connect(param)
14+
15+
# Display a popup on the pendant
16+
robot.dashboard.show_popup("I just remote-controlled my robot!")
917

1018
# Power on the robot arm and release brakes
1119
robot.dashboard.power_on()
@@ -19,7 +27,4 @@
1927

2028
# Get program name and state
2129
state = robot.dashboard.get_program_state()
22-
23-
# Display a popup on the pendant
24-
robot.dashboard.show_popup("I just remote-controlled my robot!")
2530
##

0 commit comments

Comments
 (0)