Robpod Studio Docs
  • Get Started
    • Introduction
    • Download
    • Installation
      • Install Platform
      • Install Plugin
    • First Steps
      • Choose Studio Flavor
      • Welcome Screen
      • Create a Project
      • Create a Script
      • User Interface
      • New UI
      • Robpod Studio Assistant
    • License
      • Buy a License
      • Install a License
    • Safety
  • ROBOT
    • Robot Toolbar
      • Connect the Robot
      • Control the Robot
      • Get Positions
      • Move To
      • Run a Script
    • Robot Tool Window
      • Status
      • Teach Pendant Viewer
      • Variables
      • Digital I/O
      • Analog I/O
      • Debug
    • Robot Variables
    • Robot Logs
  • Advanced Scripting
    • Live Auto Completion
    • Templete Completion
    • Param Info
    • Code Inspections
    • Quick Doc
    • Python Scripting
    • Editor Settings
  • Synchronization
    • Upload On Robot
    • Download From Robot
    • Synchronize Project
    • Clean Robot Files
    • Synchronization Settings
  • Simulation
    • Connect a Simulator
    • Simulate a Script
    • Off-Line Programming
    • Simulator Viewer
    • Simulation Commands
    • Simulation Settings
    • Simulation Examples
      • Palletizing
  • HMI Designer
    • Introduction
    • User Interface
    • Installation
    • Design Steps
      • Create new HMI Panel
      • Add HMI Components
      • Edit HMI Components
      • Preview HMI Panel
      • Synchronize HMI Panel
      • Run HMI Program
    • HMI Components
    • HMI Charts
    • Display Conditions
    • HMI Commands
    • HMI Icon Generator
    • Desktop HMI Viewer
    • HMI and UR Polyscope
    • HMI and Doosan Robotics
    • HMI Tutorials
      • Beginner Tutorial
      • UR Polyscope Tutorial
      • Doosan Robotics Task Editor Tutorial
      • Doosan Robotics DRL Tutorial
    • Working Examples
      • Universal Robots
        • Pick and Place Example
        • Polishing Example
        • Machine Tending Example
        • Simple Pallet Example
        • Welding Example
        • Skrewdriving Example
        • Chart Monitoring Example
        • Production Mix Example
        • Pallet App Example
        • Camera QA Example
        • Assembly Example
      • Doosan Robotics
        • Pick and Place Example DR
  • Other
    • Updates
    • License FAQ
    • Customer Portal
  • LEGAL
    • License Agreement
    • Privacy Policy
    • Third Party Licenses
  • Appendix
    • Supported Robots
    • Robot Specific Functions
      • Universal Robots
        • URSim
    • Supported Simulators
    • Network Configuration
    • Security Settings
Powered by GitBook
On this page
  1. HMI Designer
  2. Working Examples
  3. Universal Robots

Polishing Example

PreviousPick and Place ExampleNextMachine Tending Example

Last updated 1 year ago

HMI Panel File

Robot Program File

# variables
global step = 100
global radius = 30

# positions (can be defined also as installation variables to store their value)
global pa = p[0, 0, 0, 0, 0, 0]
global pb = p[0, 0, 0, 0, 0, 0]
global pc = p[0, 0, 0, 0, 0, 0]
global pd = p[0, 0, 0, 0, 0, 0]

# functions
def polish():
    d_ab = point_dist(pa, pb)

    repetitions = floor(d_ab / (step/1000))
    percentage_ab = (step/1000) / d_ab
    percentage_cd = 1 / repetitions

    i = 0
    while i < repetitions:
        p1 = interpolate_pose(pa, pb, i * percentage_ab)
        movel(p1, a=0.1, v=0.2, r=radius/1000)

        p2 = interpolate_pose(pc, pd, i * percentage_cd)
        movel(p2, a=0.1, v=0.2, r=radius/1000)

        p3 = interpolate_pose(pc, pd, (i + 1) * percentage_cd)
        movel(p3, a=0.1, v=0.2, r=radius/1000)

        p4 = interpolate_pose(pa, pb, (i + 1) * percentage_ab)
        movel(p4, a=0.1, v=0.2, r=radius/1000)

        i = i + 2

    end
end
971B
polishing.script
204KB
polishing.hmi