Universal Robots Forum

Learning URScript

I was wondering if there are any resources out there that would help to learn and feel more comfortable coding in URScript rather then on the teach pendant polyscope.

The best way to learn URscript is probably to read the script manual and try different commands in a program. There are various UR support webpages/links for specific commands and how to use them so if you are looking to implement a specific command you might want to search for it.

For testing, try:

  1. toggling “simulation” switch on pendant (lower right corner of pendant screen), the interface should turn blue and robot won’t physically move but program will execute as it would normally for testing purposes.
  2. hook usb keyboard + mouse to both pendant and control box. You can use mouse to quickly navigate and the keyboard to quickly type commands instead of using touch interface keyboard every time.
  3. use URsim in a virtual machine (virtual robot environment but this has some limitations, force_mode() or move until a collision won’t work)

The URcommunity might know of some actual tutorials but I’ve really learned everything from just doing those things above. With every update to Polyscope (e.g. 5.8 - 5.11) UR seems to add new commands and depreciate others. It would be nice if someone from UR’s software development team did quick tutorials for use of each command or a combination but they probably don’t have the bandwidth. I believe if you’ve purchased a robot you get a free training session from Universal Robots, I’m sure you could go to a URscript session to learn more. Anyways, sorry for the long response but I hope that helps and best of luck!

1 Like

Thanks Michael for you really well written and explained response. Your right when you talk about the tutorials. I was looking for something where they give you an example and that way i could learn and practice before going onto the real thing.

Currently I am learning by using URSim in a virtual machine. There is one with Ubuntu 16 on UR+ community that is for URCaps development, which you can upgrade to Ubuntu 20 and install a text editor to make it easier.
About examples, I usually download examples from UR pages to learn how certain things work (e.g. TCP connection, XML RPC client).
Also something that I do quite often is to create a small program through the teach pendant and then open on the text editor the generated .script file to see how “it looks on the inside”, this is quite useful for IK and motion commands.
For everything else, I tend to google “howto” with Python, since there are barely any results on Google for URScript language and it is similar to Python.
On the matter of tutorials I have found none that are script-oriented. So I am going to follow your topic because I would like to know as well.

1 Like

Hi Jarrah.

We also have an “in-person” script training class that is held at some UR sites around the world. This isn’t useful for you with your location, but I was wondering if a live virtual 4-hr scripts training course would be something you would be interested in us developing, or would you rather just have “self-directed” learning resources?

Your feedback (and that of others) is appreciated.

2 Likes

Here are two things that may help learning:

If you’re typing out your scripts in a text editor and then moving them over to the robot, VSCode has a nice script extension that gives you syntax highlighting and nice formatting.

VSCode also has an extension called SFTP sync that lets you edit in the IDE and automatically sync to the robot file system.

3 Likes

Great advise ill look more into this cheers

Hey Rob

Yes, i was looking at those but didn’t see any in Australia, which i think you have just confirmed. I would love to participate in a live virtual class if that were and option. Personally i think both the live virtual seminar and a self directed learning resource, would both be great tools.

I know that this probably isn’t an easy job and would take a bit of time, but I think if you could do both there would be many people that would watch and participate. Maybe it could work in a way where the self directed tool got you familiar with all the basics and gave a few examples and then the live seminar could expand on that and answer some issue people were having.

Thanks,

Jarrah

Great, thanks Terry. This looks like it could be very useful when i learn a bit more about the basics of the language.