How to send G-code to UR3e

Hello there.

I’m currently working on a UR3e that has to draw/engrave using the Toolpath URcap. I’m unsure how I’m going to be able to send G-code remotely to the robot without using a USB. And how to automatically import the .nc file to the Toolpath URcap for use. Is this possible?

Best regards,

Martin

send via ssh port if using python method such as below. im working through the issue of executing this file. I do not want to send 100 lines of URscript over tcp, or send a script file that executes anywhere from 7-12 gcode paths

def sftp_transfer (self, source_path, destination_path = “”, action = ‘upload’):

    # Create an SSH client

    ssh = paramiko.SSHClient()

    # Automatically add host keys without requiring user confirmation
    ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())

    try:
        # Connect to the SSH server
        ssh.connect(self.robot_ip, port=self.ssh_port, username=self.username, password=self.password)

        # Create an SFTP session
        sftp = ssh.open_sftp()

        if action == 'download':
            # Download file from remote host
            sftp.get(source_path, destination_path)
            print(f"File '{source_path}' downloaded successfully to '{destination_path}'")
        if action == 'upload':
            # Upload file to remote host
            sftp.put(source_path, destination_path)
            print(f"File '{source_path}' uploaded successfully to '{destination_path}'")
        elif action == 'delete':
            # Delete file from remote host
            sftp.remove(source_path)
            print(f"File '{source_path}' deleted successfully")

        # Close the SFTP session
        sftp.close()
    except Exception as e:
        print(f"Error: {e}")
    finally:
        # Close the SSH connection
        ssh.close()