Discussion

Left ArrowBack to discussions page
matthewd92matthewd92 Posts: 889Founding Pro, Tactile Sensor Beta Testers Handy
edited May 2017 in Programming
I thought that we might want a single thread where everyone can post up any handy little helper functions that they have developed over time that make programming and using the UR robots easier.  If you have any functions that you are willing to share please post the code below along with an example of how to use the code.  If you have any questions about how to use something please feel free to reach out to the author or post a question on here so that everyone can learn from each other.

Comments

  • JoseJose Posts: 11 Apprentice
    Hi,
    where I can find the list of commands like "set speed" , "popup" ... ?
  • matthewd92matthewd92 Posts: 889Founding Pro, Tactile Sensor Beta Testers Handy
    The dashboard server commands can be found in this document https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/dashboard-server-port-29999-15690/

    the other commands thay that I use regularly are sprinkled throughout the UR support website.  
  • JoseJose Posts: 11 Apprentice
    Thanks for your reply.
  • klacourtklacourt Posts: 12 Apprentice
    It appears the close popup command does not work for the "Protective Stop" popup?  I am running 3.5.3.10825 with no luck...
  • klacourtklacourt Posts: 12 Apprentice
    AHH!  Just found "unlock protective stop" is a dashboard command!  My reference must have been old.
  • lakshmip001lakshmip001 Posts: 41Partner Apprentice
    Hi, I am controlling UR5 using PC and sometimes results in an error getinverse(): unable to find solution displayed on UR teach pendant. How can I read popup message from pc and then close the popup.
  • JstewartJstewart Posts: 31 Apprentice
    This function allows you to easily change the speed of the running robot by changing the current value of the speed slider programmatically.
    def runSlow(speed):
    
    if speed == 0:
      speed = 0.001
    end
    socket_open("127.0.0.1",30003)
    socket_send_string("set speed")
    socket_send_string(speed)
    socket_send_byte(10)
    socket_close()
    
    end
    
    
    This function takes a float between 0 and 1 as an argument, one thing to note is if you actually send 0 it pauses the program but I have not found a way to easily recover from this so I am using the if statement to verify that the speed is not 0, if so it sets it to 0.001 which basically stops motion but allows the robot program to continue to run.

    Usage in a program would be

    runSlow(0.2)

    @matthewd92 Is it normal for this to lag when changing the speed? I noticed that whenever i set my waypoints and set the speeds right before them.




Sign In or Register to comment.
Left ArrowBack to discussions page