Use SSH to send URScript (and other files) to the robot
SSH (Secure Shell) is an essential tool that allows you to securely connect to the robot’s control system to execute commands, upload scripts, and perform maintenance tasks. This tutorial will guide you through the process of using SSH with Universal Robots.
Prerequisites
A Universal Robot (UR) with a network connection.
A computer with SSH client software installed (e.g., OpenSSH on Windows, macOS, or Linux).
The IP address of the UR.
Credentials to access the UR (default username: root, default password: easybot).
Step-by-Step Guide
Step 1: Ensure Network Connectivity
Connect the UR to the network: Ensure that your Universal Robot is connected to the same network as your computer. This can be done via Ethernet.
Find the IP address: On the UR teach pendant, go to the settings or network menu to find the robot’s IP address.
Step 2: Open an SSH Client
Windows: Use PowerShell or Command Prompt with OpenSSH installed, or a third-party SSH client like PuTTY.
macOS/Linux: Open the Terminal application, which has SSH built-in.
Step 3: Connect to the Universal Robot
In your SSH client, use the following command to connect to the UR:
ssh root@[robot-ip-address]
Replace [robot-ip-address] with the actual IP address of your UR. For example:
ssh root@192.168.1.2
If you are unable to use SSH to connect to the robot, you may need to enable access on the robot. Navigate to Settings > Security > Secure Shell and ensure that SSH access is enabled.
Step 4: Authenticate
You will be prompted to enter the password. The default password is easybot
unless it has been changed. Enter the password to gain access. If you are successful, you should see Universal Robots A/S Linux image
.
Step 5: Navigate the File System
Once logged in, you can navigate the UR’s file system using standard Linux commands:
ls
- List directory contents.cd [directory]
- Change directory.pwd
- Print working directory.
Step 6: Uploading and Downloading Files
To upload a file from your local machine to the UR, use the scp
(secure copy) command from another terminal window:
scp [local-file] root@[robot-ip-address]:[remote-directory]
For example, to upload a script file:
scp myscript.script root@192.168.1.2:/programs/
To download a file from the UR to your local machine:
scp root@[robot-ip-address]:[remote-file] [local-directory]
For example, to download a log file:
scp root@192.168.1.2:/logs/robot.log /home/user/logs/
Step 7: Executing Commands
You can execute commands directly on the UR via SSH. For instance, to restart the UR controller, you might use:
reboot
Or to view running processes:
ps -aux
Step 8: Secure Your Connection
For enhanced security, consider changing the default password with this command:
passwd
Follow the prompts to set a new password.
Step 9: Disconnect
When you are done, disconnect from the SSH session:
exit
Conclusion
Using SSH with Universal Robots provides a powerful way to manage and interact with your robotic systems remotely. By following this tutorial, you should be able to securely connect to your UR, navigate its file system, upload and download files, execute commands, and perform various maintenance tasks efficiently. This remote access capability is crucial for troubleshooting, updates, and automation in industrial environments.